Merge branch 'master' into report-multiple-overload-errors
This commit is contained in:
commit
67b8ca77d9
48
.dockerignore
Normal file
48
.dockerignore
Normal file
|
@ -0,0 +1,48 @@
|
|||
node_modules
|
||||
.node_modules
|
||||
built/*
|
||||
test-args.txt
|
||||
~*.docx
|
||||
\#*\#
|
||||
.\#*
|
||||
src/harness/*.js
|
||||
src/compiler/diagnosticInformationMap.generated.ts
|
||||
src/compiler/diagnosticMessages.generated.json
|
||||
src/parser/diagnosticInformationMap.generated.ts
|
||||
src/parser/diagnosticMessages.generated.json
|
||||
rwc-report.html
|
||||
*.swp
|
||||
build.json
|
||||
*.actual
|
||||
*.config
|
||||
scripts/debug.bat
|
||||
scripts/run.bat
|
||||
scripts/word2md.js
|
||||
scripts/buildProtocol.js
|
||||
scripts/ior.js
|
||||
scripts/authors.js
|
||||
scripts/configurePrerelease.js
|
||||
scripts/open-user-pr.js
|
||||
scripts/open-cherry-pick-pr.js
|
||||
scripts/processDiagnosticMessages.d.ts
|
||||
scripts/processDiagnosticMessages.js
|
||||
scripts/produceLKG.js
|
||||
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
|
||||
scripts/generateLocalizedDiagnosticMessages.js
|
||||
scripts/*.js.map
|
||||
scripts/typings/
|
||||
coverage/
|
||||
internal/
|
||||
**/.DS_Store
|
||||
.settings
|
||||
**/.vs
|
||||
.idea
|
||||
yarn.lock
|
||||
yarn-error.log
|
||||
.parallelperf.*
|
||||
.failed-tests
|
||||
TEST-results.xml
|
||||
package-lock.json
|
||||
tests
|
||||
.vscode
|
||||
.git
|
|
@ -29,3 +29,5 @@ package-lock.json
|
|||
yarn.lock
|
||||
CONTRIBUTING.md
|
||||
TEST-results.xml
|
||||
.dockerignore
|
||||
Dockerfile
|
7
Dockerfile
Normal file
7
Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
# We use this dockerfile to build a packed tarfile which we import in our `docker` tests
|
||||
FROM node:current
|
||||
COPY . /typescript
|
||||
WORKDIR /typescript
|
||||
RUN npm install
|
||||
RUN npm i -g gulp-cli
|
||||
RUN gulp configure-insiders && gulp LKG && gulp clean && npm pack .
|
|
@ -36,9 +36,10 @@ async function main() {
|
|||
Component commits:
|
||||
${logText.trim()}`
|
||||
const logpath = path.join(__dirname, "../", "logmessage.txt");
|
||||
const mergebase = runSequence([["git", ["merge-base", "origin/master", currentSha]]]).trim();
|
||||
runSequence([
|
||||
["git", ["checkout", "-b", "temp-branch"]],
|
||||
["git", ["reset", "origin/master", "--soft"]]
|
||||
["git", ["reset", mergebase, "--soft"]]
|
||||
]);
|
||||
fs.writeFileSync(logpath, logText);
|
||||
runSequence([
|
||||
|
|
|
@ -3265,7 +3265,7 @@ namespace ts {
|
|||
|
||||
function hasVisibleDeclarations(symbol: Symbol, shouldComputeAliasToMakeVisible: boolean): SymbolVisibilityResult | undefined {
|
||||
let aliasesToMakeVisible: LateVisibilityPaintedStatement[] | undefined;
|
||||
if (!every(symbol.declarations, getIsDeclarationVisible)) {
|
||||
if (!every(filter(symbol.declarations, d => d.kind !== SyntaxKind.Identifier), getIsDeclarationVisible)) {
|
||||
return undefined;
|
||||
}
|
||||
return { accessibility: SymbolAccessibility.Accessible, aliasesToMakeVisible };
|
||||
|
@ -5481,7 +5481,7 @@ namespace ts {
|
|||
function getTypeFromObjectBindingPattern(pattern: ObjectBindingPattern, includePatternInType: boolean, reportErrors: boolean): Type {
|
||||
const members = createSymbolTable();
|
||||
let stringIndexInfo: IndexInfo | undefined;
|
||||
let objectFlags = ObjectFlags.ObjectLiteral | ObjectFlags.ContainsObjectLiteral;
|
||||
let objectFlags = ObjectFlags.ObjectLiteral | ObjectFlags.ContainsObjectOrArrayLiteral;
|
||||
forEach(pattern.elements, e => {
|
||||
const name = e.propertyName || <Identifier>e.name;
|
||||
if (e.dotDotDotToken) {
|
||||
|
@ -10097,9 +10097,9 @@ namespace ts {
|
|||
return false;
|
||||
}
|
||||
|
||||
function getPropertyTypeForIndexType(originalObjectType: Type, objectType: Type, indexType: Type, fullIndexType: Type, suppressNoImplicitAnyError: boolean, accessNode: ElementAccessExpression | IndexedAccessTypeNode | PropertyName | BindingName | SyntheticExpression | undefined, accessFlags: AccessFlags) {
|
||||
function getPropertyNameFromIndex(indexType: Type, accessNode: StringLiteral | Identifier | ObjectBindingPattern | ArrayBindingPattern | ComputedPropertyName | NumericLiteral | IndexedAccessTypeNode | ElementAccessExpression | SyntheticExpression | undefined) {
|
||||
const accessExpression = accessNode && accessNode.kind === SyntaxKind.ElementAccessExpression ? accessNode : undefined;
|
||||
const propName = isTypeUsableAsPropertyName(indexType) ?
|
||||
return isTypeUsableAsPropertyName(indexType) ?
|
||||
getPropertyNameFromType(indexType) :
|
||||
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ?
|
||||
getPropertyNameForKnownSymbolName(idText((<PropertyAccessExpression>accessExpression.argumentExpression).name)) :
|
||||
|
@ -10107,6 +10107,11 @@ namespace ts {
|
|||
// late bound names are handled in the first branch, so here we only need to handle normal names
|
||||
getPropertyNameForPropertyNameNode(accessNode) :
|
||||
undefined;
|
||||
}
|
||||
|
||||
function getPropertyTypeForIndexType(originalObjectType: Type, objectType: Type, indexType: Type, fullIndexType: Type, suppressNoImplicitAnyError: boolean, accessNode: ElementAccessExpression | IndexedAccessTypeNode | PropertyName | BindingName | SyntheticExpression | undefined, accessFlags: AccessFlags) {
|
||||
const accessExpression = accessNode && accessNode.kind === SyntaxKind.ElementAccessExpression ? accessNode : undefined;
|
||||
const propName = getPropertyNameFromIndex(indexType, accessNode);
|
||||
if (propName !== undefined) {
|
||||
const prop = getPropertyOfType(objectType, propName);
|
||||
if (prop) {
|
||||
|
@ -10803,7 +10808,7 @@ namespace ts {
|
|||
emptyArray,
|
||||
getIndexInfoWithReadonly(stringIndexInfo, readonly),
|
||||
getIndexInfoWithReadonly(numberIndexInfo, readonly));
|
||||
spread.objectFlags |= ObjectFlags.ObjectLiteral | ObjectFlags.ContainsObjectLiteral | ObjectFlags.ContainsSpread | objectFlags;
|
||||
spread.objectFlags |= ObjectFlags.ObjectLiteral | ObjectFlags.ContainsObjectOrArrayLiteral | ObjectFlags.ContainsSpread | objectFlags;
|
||||
return spread;
|
||||
}
|
||||
|
||||
|
@ -14519,7 +14524,7 @@ namespace ts {
|
|||
if (propType) {
|
||||
return propType;
|
||||
}
|
||||
if (everyType(type, isTupleType) && !everyType(type, t => !(<TupleTypeReference>t).target.hasRestElement)) {
|
||||
if (everyType(type, isTupleType)) {
|
||||
return mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
|
||||
}
|
||||
return undefined;
|
||||
|
@ -15723,12 +15728,16 @@ namespace ts {
|
|||
return !!(getObjectFlags(type) & ObjectFlags.ObjectLiteral);
|
||||
}
|
||||
|
||||
function widenObjectLiteralCandidates(candidates: Type[]): Type[] {
|
||||
function isObjectOrArrayLiteralType(type: Type) {
|
||||
return !!(getObjectFlags(type) & (ObjectFlags.ObjectLiteral | ObjectFlags.ArrayLiteral));
|
||||
}
|
||||
|
||||
function unionObjectAndArrayLiteralCandidates(candidates: Type[]): Type[] {
|
||||
if (candidates.length > 1) {
|
||||
const objectLiterals = filter(candidates, isObjectLiteralType);
|
||||
const objectLiterals = filter(candidates, isObjectOrArrayLiteralType);
|
||||
if (objectLiterals.length) {
|
||||
const objectLiteralsType = getWidenedType(getUnionType(objectLiterals, UnionReduction.Subtype));
|
||||
return concatenate(filter(candidates, t => !isObjectLiteralType(t)), [objectLiteralsType]);
|
||||
const literalsType = getUnionType(objectLiterals, UnionReduction.Subtype);
|
||||
return concatenate(filter(candidates, t => !isObjectOrArrayLiteralType(t)), [literalsType]);
|
||||
}
|
||||
}
|
||||
return candidates;
|
||||
|
@ -15739,8 +15748,8 @@ namespace ts {
|
|||
}
|
||||
|
||||
function getCovariantInference(inference: InferenceInfo, signature: Signature) {
|
||||
// Extract all object literal types and replace them with a single widened and normalized type.
|
||||
const candidates = widenObjectLiteralCandidates(inference.candidates!);
|
||||
// Extract all object and array literal types and replace them with a single widened and normalized type.
|
||||
const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates!);
|
||||
// We widen inferred literal types if
|
||||
// all inferences were made to top-level occurrences of the type parameter, and
|
||||
// the type parameter has no constraint or its constraint includes no primitive or literal types, and
|
||||
|
@ -19226,22 +19235,34 @@ namespace ts {
|
|||
const minLength = elementCount - (hasRestElement ? 1 : 0);
|
||||
// If array literal is actually a destructuring pattern, mark it as an implied type. We do this such
|
||||
// that we get the same behavior for "var [x, y] = []" and "[x, y] = []".
|
||||
let tupleResult: Type | undefined;
|
||||
let tupleResult;
|
||||
if (inDestructuringPattern && minLength > 0) {
|
||||
const type = cloneTypeReference(<TypeReference>createTupleType(elementTypes, minLength, hasRestElement));
|
||||
type.pattern = node;
|
||||
return type;
|
||||
}
|
||||
else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) {
|
||||
return tupleResult;
|
||||
return createArrayLiteralType(tupleResult);
|
||||
}
|
||||
else if (forceTuple) {
|
||||
return createTupleType(elementTypes, minLength, hasRestElement);
|
||||
return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement));
|
||||
}
|
||||
}
|
||||
return createArrayType(elementTypes.length ?
|
||||
return createArrayLiteralType(createArrayType(elementTypes.length ?
|
||||
getUnionType(elementTypes, UnionReduction.Subtype) :
|
||||
strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext);
|
||||
strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext));
|
||||
}
|
||||
|
||||
function createArrayLiteralType(type: ObjectType) {
|
||||
if (!(getObjectFlags(type) & ObjectFlags.Reference)) {
|
||||
return type;
|
||||
}
|
||||
let literalType = (<TypeReference>type).literalType;
|
||||
if (!literalType) {
|
||||
literalType = (<TypeReference>type).literalType = cloneTypeReference(<TypeReference>type);
|
||||
literalType.objectFlags |= ObjectFlags.ArrayLiteral | ObjectFlags.ContainsObjectOrArrayLiteral;
|
||||
}
|
||||
return literalType;
|
||||
}
|
||||
|
||||
function getArrayLiteralTupleTypeIfApplicable(elementTypes: Type[], contextualType: Type | undefined, hasRestElement: boolean, elementCount = elementTypes.length, readonly = false) {
|
||||
|
@ -19526,7 +19547,7 @@ namespace ts {
|
|||
const stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, IndexKind.String) : undefined;
|
||||
const numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, IndexKind.Number) : undefined;
|
||||
const result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
|
||||
result.objectFlags |= objectFlags | ObjectFlags.ObjectLiteral | ObjectFlags.ContainsObjectLiteral;
|
||||
result.objectFlags |= objectFlags | ObjectFlags.ObjectLiteral | ObjectFlags.ContainsObjectOrArrayLiteral;
|
||||
if (isJSObjectLiteral) {
|
||||
result.objectFlags |= ObjectFlags.JSLiteral;
|
||||
}
|
||||
|
@ -19722,7 +19743,7 @@ namespace ts {
|
|||
function createJsxAttributesType() {
|
||||
objectFlags |= freshObjectLiteralFlag;
|
||||
const result = createAnonymousType(attributes.symbol, attributesTable, emptyArray, emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined);
|
||||
result.objectFlags |= objectFlags | ObjectFlags.ObjectLiteral | ObjectFlags.ContainsObjectLiteral;
|
||||
result.objectFlags |= objectFlags | ObjectFlags.ObjectLiteral | ObjectFlags.ContainsObjectOrArrayLiteral;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -21496,7 +21517,8 @@ namespace ts {
|
|||
reorderCandidates(signatures, candidates);
|
||||
if (!candidates.length) {
|
||||
if (reportErrors) {
|
||||
diagnostics.add(createDiagnosticForNode(node, Diagnostics.Call_target_does_not_contain_any_signatures));
|
||||
const errorNode = getCallErrorNode(node);
|
||||
diagnostics.add(createDiagnosticForNode(errorNode, Diagnostics.Call_target_does_not_contain_any_signatures));
|
||||
}
|
||||
return resolveErrorCall(node);
|
||||
}
|
||||
|
@ -21574,6 +21596,7 @@ namespace ts {
|
|||
// If candidate is undefined, it means that no candidates had a suitable arity. In that case,
|
||||
// skip the checkApplicableSignature check.
|
||||
if (reportErrors) {
|
||||
const errorNode = getCallErrorNode(node);
|
||||
if (candidatesForArgumentError) {
|
||||
if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) {
|
||||
const last = candidatesForArgumentError[candidatesForArgumentError.length - 1];
|
||||
|
@ -21608,7 +21631,7 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
else if (candidateForArgumentArityError) {
|
||||
diagnostics.add(getArgumentArityError(node, [candidateForArgumentArityError], args));
|
||||
diagnostics.add(getArgumentArityError(errorNode, [candidateForArgumentArityError], args));
|
||||
}
|
||||
else if (candidateForTypeArgumentError) {
|
||||
checkTypeArguments(candidateForTypeArgumentError, (node as CallExpression | TaggedTemplateExpression | JsxOpeningLikeElement).typeArguments!, /*reportErrors*/ true, fallbackError);
|
||||
|
@ -21616,19 +21639,31 @@ namespace ts {
|
|||
else {
|
||||
const signaturesWithCorrectTypeArgumentArity = filter(signatures, s => hasCorrectTypeArgumentArity(s, typeArguments));
|
||||
if (signaturesWithCorrectTypeArgumentArity.length === 0) {
|
||||
diagnostics.add(getTypeArgumentArityError(node, signatures, typeArguments!));
|
||||
diagnostics.add(getTypeArgumentArityError(errorNode, signatures, typeArguments!));
|
||||
}
|
||||
else if (!isDecorator) {
|
||||
diagnostics.add(getArgumentArityError(node, signaturesWithCorrectTypeArgumentArity, args));
|
||||
diagnostics.add(getArgumentArityError(errorNode, signaturesWithCorrectTypeArgumentArity, args));
|
||||
}
|
||||
else if (fallbackError) {
|
||||
diagnostics.add(createDiagnosticForNode(node, fallbackError));
|
||||
diagnostics.add(createDiagnosticForNode(errorNode, fallbackError));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray);
|
||||
|
||||
function getCallErrorNode(node: CallLikeExpression): Node {
|
||||
if (isCallExpression(node)) {
|
||||
if (isPropertyAccessExpression(node.expression)) {
|
||||
return node.expression.name;
|
||||
}
|
||||
else {
|
||||
return node.expression;
|
||||
}
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
function chooseOverload(candidates: Signature[], relation: Map<RelationComparisonResult>, signatureHelpTrailingComma = false) {
|
||||
candidatesForArgumentError = undefined;
|
||||
candidateForArgumentArityError = undefined;
|
||||
|
@ -25418,7 +25453,7 @@ namespace ts {
|
|||
forEach(node.types, checkSourceElement);
|
||||
}
|
||||
|
||||
function checkIndexedAccessIndexType(type: Type, accessNode: Node) {
|
||||
function checkIndexedAccessIndexType(type: Type, accessNode: IndexedAccessTypeNode | ElementAccessExpression) {
|
||||
if (!(type.flags & TypeFlags.IndexedAccess)) {
|
||||
return type;
|
||||
}
|
||||
|
@ -25434,9 +25469,20 @@ namespace ts {
|
|||
}
|
||||
// Check if we're indexing with a numeric type and if either object or index types
|
||||
// is a generic type with a constraint that has a numeric index signature.
|
||||
if (getIndexInfoOfType(getApparentType(objectType), IndexKind.Number) && isTypeAssignableToKind(indexType, TypeFlags.NumberLike)) {
|
||||
const apparentObjectType = getApparentType(objectType);
|
||||
if (getIndexInfoOfType(apparentObjectType, IndexKind.Number) && isTypeAssignableToKind(indexType, TypeFlags.NumberLike)) {
|
||||
return type;
|
||||
}
|
||||
if (isGenericObjectType(objectType)) {
|
||||
const propertyName = getPropertyNameFromIndex(indexType, accessNode);
|
||||
if (propertyName) {
|
||||
const propertySymbol = forEachType(apparentObjectType, t => getPropertyOfType(t, propertyName));
|
||||
if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & ModifierFlags.NonPublicAccessibilityModifier) {
|
||||
error(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName));
|
||||
return errorType;
|
||||
}
|
||||
}
|
||||
}
|
||||
error(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
|
||||
return errorType;
|
||||
}
|
||||
|
|
|
@ -147,6 +147,12 @@ namespace ts {
|
|||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Enable_incremental_compilation,
|
||||
},
|
||||
{
|
||||
name: "locale",
|
||||
type: "string",
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
|
||||
},
|
||||
];
|
||||
|
||||
/* @internal */
|
||||
|
@ -698,12 +704,6 @@ namespace ts {
|
|||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
|
||||
},
|
||||
{
|
||||
name: "locale",
|
||||
type: "string",
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
|
||||
},
|
||||
{
|
||||
name: "newLine",
|
||||
type: createMapFromTemplate({
|
||||
|
@ -1171,7 +1171,7 @@ namespace ts {
|
|||
export interface ParsedBuildCommand {
|
||||
buildOptions: BuildOptions;
|
||||
projects: string[];
|
||||
errors: ReadonlyArray<Diagnostic>;
|
||||
errors: Diagnostic[];
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
|
|
|
@ -2975,6 +2975,10 @@
|
|||
"category": "Error",
|
||||
"code": 4104
|
||||
},
|
||||
"Private or protected member '{0}' cannot be accessed on a type parameter.": {
|
||||
"category": "Error",
|
||||
"code": 4105
|
||||
},
|
||||
|
||||
"The current host does not support the '{0}' option.": {
|
||||
"category": "Error",
|
||||
|
|
|
@ -725,7 +725,8 @@ namespace ts {
|
|||
fileExists: f => host.fileExists(f),
|
||||
directoryExists: host.directoryExists && (f => host.directoryExists!(f)),
|
||||
useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
|
||||
getProgramBuildInfo: returnUndefined
|
||||
getProgramBuildInfo: returnUndefined,
|
||||
getSourceFileFromReference: returnUndefined,
|
||||
};
|
||||
emitFiles(
|
||||
notImplementedResolver,
|
||||
|
|
|
@ -1487,8 +1487,8 @@ namespace ts {
|
|||
}
|
||||
|
||||
/**
|
||||
* LSHost may load a module from a global cache of typings.
|
||||
* This is the minumum code needed to expose that functionality; the rest is in LSHost.
|
||||
* A host may load a module from a global cache of typings.
|
||||
* This is the minumum code needed to expose that functionality; the rest is in the host.
|
||||
*/
|
||||
/* @internal */
|
||||
export function loadModuleFromGlobalCache(moduleName: string, projectName: string | undefined, compilerOptions: CompilerOptions, host: ModuleResolutionHost, globalCache: string): ResolvedModuleWithFailedLookupLocations {
|
||||
|
|
|
@ -1442,7 +1442,8 @@ namespace ts {
|
|||
},
|
||||
...(host.directoryExists ? { directoryExists: f => host.directoryExists!(f) } : {}),
|
||||
useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
|
||||
getProgramBuildInfo: () => program.getProgramBuildInfo && program.getProgramBuildInfo()
|
||||
getProgramBuildInfo: () => program.getProgramBuildInfo && program.getProgramBuildInfo(),
|
||||
getSourceFileFromReference: (file, ref) => program.getSourceFileFromReference(file, ref),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2127,7 +2128,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
/** This should have similar behavior to 'processSourceFile' without diagnostics or mutation. */
|
||||
function getSourceFileFromReference(referencingFile: SourceFile, ref: FileReference): SourceFile | undefined {
|
||||
function getSourceFileFromReference(referencingFile: SourceFile | UnparsedSource, ref: FileReference): SourceFile | undefined {
|
||||
return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), fileName => filesByName.get(toPath(fileName)) || undefined);
|
||||
}
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
/*@internal*/
|
||||
export const ignoredPaths = ["/node_modules/.", "/.git"];
|
||||
export const ignoredPaths = ["/node_modules/.", "/.git", "/.#"];
|
||||
|
||||
/*@internal*/
|
||||
export interface RecursiveDirectoryWatcherHost {
|
||||
|
|
|
@ -348,7 +348,7 @@ namespace ts {
|
|||
function collectReferences(sourceFile: SourceFile | UnparsedSource, ret: Map<SourceFile>) {
|
||||
if (noResolve || (!isUnparsedSource(sourceFile) && isSourceFileJS(sourceFile))) return ret;
|
||||
forEach(sourceFile.referencedFiles, f => {
|
||||
const elem = tryResolveScriptReference(host, sourceFile, f);
|
||||
const elem = host.getSourceFileFromReference(sourceFile, f);
|
||||
if (elem) {
|
||||
ret.set("" + getOriginalNodeId(elem), elem);
|
||||
}
|
||||
|
@ -1036,19 +1036,25 @@ namespace ts {
|
|||
/*body*/ undefined
|
||||
));
|
||||
if (clean && resolver.isExpandoFunctionDeclaration(input)) {
|
||||
const declarations = mapDefined(resolver.getPropertiesOfContainerFunction(input), p => {
|
||||
const props = resolver.getPropertiesOfContainerFunction(input);
|
||||
const fakespace = createModuleDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, clean.name || createIdentifier("_default"), createModuleBlock([]), NodeFlags.Namespace);
|
||||
fakespace.flags ^= NodeFlags.Synthesized; // unset synthesized so it is usable as an enclosing declaration
|
||||
fakespace.parent = enclosingDeclaration as SourceFile | NamespaceDeclaration;
|
||||
fakespace.locals = createSymbolTable(props);
|
||||
fakespace.symbol = props[0].parent!;
|
||||
const declarations = mapDefined(props, p => {
|
||||
if (!isPropertyAccessExpression(p.valueDeclaration)) {
|
||||
return undefined;
|
||||
}
|
||||
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
|
||||
const type = resolver.createTypeOfDeclaration(p.valueDeclaration, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
|
||||
const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker);
|
||||
getSymbolAccessibilityDiagnostic = oldDiag;
|
||||
const varDecl = createVariableDeclaration(unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined);
|
||||
return createVariableStatement(/*modifiers*/ undefined, createVariableDeclarationList([varDecl]));
|
||||
});
|
||||
const namespaceDecl = createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name!, createModuleBlock(declarations), NodeFlags.Namespace);
|
||||
|
||||
if (!hasModifier(clean, ModifierFlags.ExportDefault)) {
|
||||
if (!hasModifier(clean, ModifierFlags.Default)) {
|
||||
return [clean, namespaceDecl];
|
||||
}
|
||||
|
||||
|
|
|
@ -172,6 +172,7 @@ namespace ts {
|
|||
traceResolution?: boolean;
|
||||
/* @internal */ diagnostics?: boolean;
|
||||
/* @internal */ extendedDiagnostics?: boolean;
|
||||
/* @internal */ locale?: string;
|
||||
|
||||
[option: string]: CompilerOptionsValue | undefined;
|
||||
}
|
||||
|
@ -1461,7 +1462,8 @@ namespace ts {
|
|||
const refStatus = getUpToDateStatus(state, parseConfigFile(state, resolvedRef, resolvedRefPath), resolvedRefPath);
|
||||
|
||||
// Its a circular reference ignore the status of this project
|
||||
if (refStatus.type === UpToDateStatusType.ComputingUpstream) {
|
||||
if (refStatus.type === UpToDateStatusType.ComputingUpstream ||
|
||||
refStatus.type === UpToDateStatusType.ContainerOnly) { // Container only ignore this project
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -2975,7 +2975,7 @@ namespace ts {
|
|||
// For testing purposes only.
|
||||
/* @internal */ structureIsReused?: StructureIsReused;
|
||||
|
||||
/* @internal */ getSourceFileFromReference(referencingFile: SourceFile, ref: FileReference): SourceFile | undefined;
|
||||
/* @internal */ getSourceFileFromReference(referencingFile: SourceFile | UnparsedSource, ref: FileReference): SourceFile | undefined;
|
||||
/* @internal */ getLibFileFromReference(ref: FileReference): SourceFile | undefined;
|
||||
|
||||
/** Given a source file, get the name of the package it was imported from. */
|
||||
|
@ -4089,19 +4089,20 @@ namespace ts {
|
|||
MarkerType = 1 << 13, // Marker type used for variance probing
|
||||
JSLiteral = 1 << 14, // Object type declared in JS - disables errors on read/write of nonexisting members
|
||||
FreshLiteral = 1 << 15, // Fresh object literal
|
||||
ArrayLiteral = 1 << 16, // Originates in an array literal
|
||||
/* @internal */
|
||||
PrimitiveUnion = 1 << 16, // Union of only primitive types
|
||||
PrimitiveUnion = 1 << 17, // Union of only primitive types
|
||||
/* @internal */
|
||||
ContainsWideningType = 1 << 17, // Type is or contains undefined or null widening type
|
||||
ContainsWideningType = 1 << 18, // Type is or contains undefined or null widening type
|
||||
/* @internal */
|
||||
ContainsObjectLiteral = 1 << 18, // Type is or contains object literal type
|
||||
ContainsObjectOrArrayLiteral = 1 << 19, // Type is or contains object literal type
|
||||
/* @internal */
|
||||
NonInferrableType = 1 << 19, // Type is or contains anyFunctionType or silentNeverType
|
||||
NonInferrableType = 1 << 20, // Type is or contains anyFunctionType or silentNeverType
|
||||
ClassOrInterface = Class | Interface,
|
||||
/* @internal */
|
||||
RequiresWidening = ContainsWideningType | ContainsObjectLiteral,
|
||||
RequiresWidening = ContainsWideningType | ContainsObjectOrArrayLiteral,
|
||||
/* @internal */
|
||||
PropagatingFlags = ContainsWideningType | ContainsObjectLiteral | NonInferrableType
|
||||
PropagatingFlags = ContainsWideningType | ContainsObjectOrArrayLiteral | NonInferrableType
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
|
@ -4154,6 +4155,8 @@ namespace ts {
|
|||
export interface TypeReference extends ObjectType {
|
||||
target: GenericType; // Type reference target
|
||||
typeArguments?: ReadonlyArray<Type>; // Type reference type arguments (undefined if none)
|
||||
/* @internal */
|
||||
literalType?: TypeReference; // Clone of type with ObjectFlags.ArrayLiteral set
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
|
@ -5396,6 +5399,7 @@ namespace ts {
|
|||
|
||||
writeFile: WriteFileCallback;
|
||||
getProgramBuildInfo(): ProgramBuildInfo | undefined;
|
||||
getSourceFileFromReference: Program["getSourceFileFromReference"];
|
||||
}
|
||||
|
||||
export interface TransformationContext {
|
||||
|
|
|
@ -2611,13 +2611,6 @@ namespace ts {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
export function tryResolveScriptReference(host: ScriptReferenceHost, sourceFile: SourceFile | UnparsedSource, reference: FileReference) {
|
||||
if (!host.getCompilerOptions().noResolve) {
|
||||
const referenceFileName = isRootedDiskPath(reference.fileName) ? reference.fileName : combinePaths(getDirectoryPath(sourceFile.fileName), reference.fileName);
|
||||
return host.getSourceFile(referenceFileName);
|
||||
}
|
||||
}
|
||||
|
||||
export function getAncestor(node: Node | undefined, kind: SyntaxKind): Node | undefined {
|
||||
while (node) {
|
||||
if (node.kind === kind) {
|
||||
|
|
|
@ -1177,7 +1177,9 @@ Actual: ${stringify(fullActual)}`);
|
|||
public verifyRenameLocations(startRanges: ArrayOrSingle<Range>, options: FourSlashInterface.RenameLocationsOptions) {
|
||||
const { findInStrings = false, findInComments = false, ranges = this.getRanges(), providePrefixAndSuffixTextForRename = true } = ts.isArray(options) ? { findInStrings: false, findInComments: false, ranges: options, providePrefixAndSuffixTextForRename: true } : options;
|
||||
|
||||
for (const startRange of toArray(startRanges)) {
|
||||
const _startRanges = toArray(startRanges);
|
||||
assert(_startRanges.length);
|
||||
for (const startRange of _startRanges) {
|
||||
this.goToRangeStart(startRange);
|
||||
|
||||
const renameInfo = this.languageService.getRenameInfo(this.activeFile.fileName, this.currentCaretPosition);
|
||||
|
@ -2731,6 +2733,7 @@ Actual: ${stringify(fullActual)}`);
|
|||
|
||||
public verifyRangesAreOccurrences(isWriteAccess?: boolean, ranges?: Range[]) {
|
||||
ranges = ranges || this.getRanges();
|
||||
assert(ranges.length);
|
||||
for (const r of ranges) {
|
||||
this.goToRangeStart(r);
|
||||
this.verifyOccurrencesAtPositionListCount(ranges.length);
|
||||
|
@ -2761,6 +2764,7 @@ Actual: ${stringify(fullActual)}`);
|
|||
|
||||
public verifyRangesAreDocumentHighlights(ranges: Range[] | undefined, options: FourSlashInterface.VerifyDocumentHighlightsOptions | undefined) {
|
||||
ranges = ranges || this.getRanges();
|
||||
assert(ranges.length);
|
||||
const fileNames = options && options.filesToSearch || unique(ranges, range => range.fileName);
|
||||
for (const range of ranges) {
|
||||
this.goToRangeStart(range);
|
||||
|
@ -2930,7 +2934,9 @@ Actual: ${stringify(fullActual)}`);
|
|||
}
|
||||
|
||||
public noMoveToNewFile() {
|
||||
for (const range of this.getRanges()) {
|
||||
const ranges = this.getRanges();
|
||||
assert(ranges.length);
|
||||
for (const range of ranges) {
|
||||
for (const refactor of this.getApplicableRefactors(range, { allowTextChangesInNewFiles: true })) {
|
||||
if (refactor.name === "Move to a new file") {
|
||||
ts.Debug.fail("Did not expect to get 'move to a new file' refactor");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "rwc" | "test262" | "user" | "dt";
|
||||
type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "rwc" | "test262" | "user" | "dt" | "docker";
|
||||
type CompilerTestKind = "conformance" | "compiler";
|
||||
type FourslashTestKind = "fourslash" | "fourslash-shims" | "fourslash-shims-pp" | "fourslash-server";
|
||||
|
||||
|
|
|
@ -952,7 +952,7 @@ namespace ts.server {
|
|||
this.externalFiles = this.getExternalFiles();
|
||||
enumerateInsertsAndDeletes<string, string>(this.externalFiles, oldExternalFiles, getStringComparer(!this.useCaseSensitiveFileNames()),
|
||||
// Ensure a ScriptInfo is created for new external files. This is performed indirectly
|
||||
// by the LSHost for files in the program when the program is retrieved above but
|
||||
// by the host for files in the program when the program is retrieved above but
|
||||
// the program doesn't contain external files so this must be done explicitly.
|
||||
inserted => {
|
||||
const scriptInfo = this.projectService.getOrCreateScriptInfoNotOpenedByClient(inserted, this.currentDirectory, this.directoryStructureHost)!;
|
||||
|
|
33
src/services/formatting/README.md
Normal file
33
src/services/formatting/README.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# How does TypeScript formatting work?
|
||||
|
||||
To format code you need to have a formatting context and a `SourceFile`. The formatting context contains
|
||||
all user settings like tab size, newline character, etc.
|
||||
|
||||
The end result of formatting is represented by TextChange objects which hold the new string content, and
|
||||
the text to replace it with.
|
||||
|
||||
```ts
|
||||
export interface TextChange {
|
||||
span: TextSpan; // start, length
|
||||
newText: string;
|
||||
}
|
||||
```
|
||||
|
||||
## Internals
|
||||
|
||||
Most of the exposed APIs internally are `format*` and they all set up and configure `formatSpan` which could be considered the root call for formatting. Span in this case refers to the range of
|
||||
the sourcefile which should be formatted.
|
||||
|
||||
The formatSpan then uses a scanner (either with or without JSX support) which starts at the highest
|
||||
node the covers the span of text and recurses down through the node's children.
|
||||
|
||||
As it recurses, `processNode` is called on the children setting the indentation is decided and passed
|
||||
through into each of that node's children.
|
||||
|
||||
The meat of formatting decisions is made via `processPair`, the pair here being the current node and the previous node. `processPair` which mutates the formatting context to represent the current place in the scanner and requests a set of rules which can be applied to the items via `createRulesMap`.
|
||||
|
||||
There are a lot of rules, which you can find in [rules.ts](./rules.ts) each one has a left and right reference to nodes or token ranges and note of what action should be applied by the formatter.
|
||||
|
||||
### Where is this used?
|
||||
|
||||
The formatter is used mainly from any language service operation that inserts or modifies code. The formatter is not exported publicly, and so all usage can only come through the language server.
|
|
@ -108,7 +108,7 @@ namespace ts.GoToDefinition {
|
|||
export function getReferenceAtPosition(sourceFile: SourceFile, position: number, program: Program): { fileName: string, file: SourceFile } | undefined {
|
||||
const referencePath = findReferenceInPosition(sourceFile.referencedFiles, position);
|
||||
if (referencePath) {
|
||||
const file = tryResolveScriptReference(program, sourceFile, referencePath);
|
||||
const file = program.getSourceFileFromReference(sourceFile, referencePath);
|
||||
return file && { fileName: referencePath.fileName, file };
|
||||
}
|
||||
|
||||
|
|
|
@ -143,6 +143,7 @@ class CompilerTest {
|
|||
this.tsConfigFiles = [];
|
||||
if (testCaseContent.tsConfig) {
|
||||
assert.equal(testCaseContent.tsConfig.fileNames.length, 0, `list of files in tsconfig is not currently supported`);
|
||||
assert.equal(testCaseContent.tsConfig.raw.exclude, undefined, `exclude in tsconfig is not currently supported`);
|
||||
|
||||
tsConfigOptions = ts.cloneCompilerOptions(testCaseContent.tsConfig.options);
|
||||
this.tsConfigFiles.push(this.createHarnessTestFile(testCaseContent.tsConfigFileUnitData!, rootDir, ts.combinePaths(rootDir, tsConfigOptions.configFilePath!)));
|
||||
|
|
|
@ -106,6 +106,81 @@ ${stripAbsoluteImportPaths(result.stderr.toString().replace(/\r\n/g, "\n"))}`;
|
|||
}
|
||||
}
|
||||
|
||||
class DockerfileRunner extends ExternalCompileRunnerBase {
|
||||
readonly testDir = "tests/cases/docker/";
|
||||
kind(): TestRunnerKind {
|
||||
return "docker";
|
||||
}
|
||||
initializeTests(): void {
|
||||
// Read in and evaluate the test list
|
||||
const testList = this.tests && this.tests.length ? this.tests : this.enumerateTestFiles();
|
||||
|
||||
// tslint:disable-next-line:no-this-assignment
|
||||
const cls = this;
|
||||
describe(`${this.kind()} code samples`, function(this: Mocha.ISuiteCallbackContext) {
|
||||
this.timeout(cls.timeout); // 20 minutes
|
||||
before(() => {
|
||||
cls.exec("docker", ["build", ".", "-t", "typescript/typescript"], { cwd: Harness.IO.getWorkspaceRoot() }); // cached because workspace is hashed to determine cacheability
|
||||
});
|
||||
for (const test of testList) {
|
||||
const directory = typeof test === "string" ? test : test.file;
|
||||
const cwd = path.join(Harness.IO.getWorkspaceRoot(), cls.testDir, directory);
|
||||
it(`should build ${directory} successfully`, () => {
|
||||
const imageName = `tstest/${directory}`;
|
||||
cls.exec("docker", ["build", "--no-cache", ".", "-t", imageName], { cwd }); // --no-cache so the latest version of the repos referenced is always fetched
|
||||
const cp: typeof import("child_process") = require("child_process");
|
||||
Harness.Baseline.runBaseline(`${cls.kind()}/${directory}.log`, cls.report(cp.spawnSync(`docker`, ["run", imageName], { cwd, timeout: cls.timeout, shell: true })));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private timeout = 1_200_000; // 20 minutes;
|
||||
private exec(command: string, args: string[], options: { cwd: string, timeout?: number }): void {
|
||||
const cp: typeof import("child_process") = require("child_process");
|
||||
const stdio = isWorker ? "pipe" : "inherit";
|
||||
const res = cp.spawnSync(command, args, { timeout: this.timeout, shell: true, stdio, ...options });
|
||||
if (res.status !== 0) {
|
||||
throw new Error(`${command} ${args.join(" ")} for ${options.cwd} failed: ${res.stderr && res.stderr.toString()}`);
|
||||
}
|
||||
}
|
||||
report(result: ExecResult) {
|
||||
// tslint:disable-next-line:no-null-keyword
|
||||
return result.status === 0 && !result.stdout.length && !result.stderr.length ? null : `Exit Code: ${result.status}
|
||||
Standard output:
|
||||
${sanitizeDockerfileOutput(result.stdout.toString())}
|
||||
|
||||
|
||||
Standard error:
|
||||
${sanitizeDockerfileOutput(result.stderr.toString())}`;
|
||||
}
|
||||
}
|
||||
|
||||
function sanitizeDockerfileOutput(result: string): string {
|
||||
return stripAbsoluteImportPaths(sanitizeTimestamps(stripRushStageNumbers(stripANSIEscapes(normalizeNewlines(result)))));
|
||||
}
|
||||
|
||||
function normalizeNewlines(result: string): string {
|
||||
return result.replace(/\r\n/g, "\n");
|
||||
}
|
||||
|
||||
function stripANSIEscapes(result: string): string {
|
||||
return result.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "");
|
||||
}
|
||||
|
||||
function stripRushStageNumbers(result: string): string {
|
||||
return result.replace(/\d+ of \d+:/g, "XX of XX:");
|
||||
}
|
||||
|
||||
function sanitizeTimestamps(result: string): string {
|
||||
return result.replace(/\[\d?\d:\d\d:\d\d (A|P)M\]/g, "[XX:XX:XX XM]")
|
||||
.replace(/\d+(\.\d+)? seconds?/g, "? seconds")
|
||||
.replace(/\d+(\.\d+)? minutes?/g, "")
|
||||
.replace(/\d+(\.\d+)?s/g, "?s")
|
||||
.replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Import types and some other error messages use absolute paths in errors as they have no context to be written relative to;
|
||||
* This is problematic for error baselines, so we grep for them and strip them out.
|
||||
|
|
|
@ -40,6 +40,8 @@ function createRunner(kind: TestRunnerKind): RunnerBase {
|
|||
return new UserCodeRunner();
|
||||
case "dt":
|
||||
return new DefinitelyTypedRunner();
|
||||
case "docker":
|
||||
return new DockerfileRunner();
|
||||
}
|
||||
return ts.Debug.fail(`Unknown runner kind ${kind}`);
|
||||
}
|
||||
|
@ -172,6 +174,9 @@ function handleTestConfig() {
|
|||
case "dt":
|
||||
runners.push(new DefinitelyTypedRunner());
|
||||
break;
|
||||
case "docker":
|
||||
runners.push(new DockerfileRunner());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -194,6 +199,7 @@ function handleTestConfig() {
|
|||
// CRON-only tests
|
||||
if (process.env.TRAVIS_EVENT_TYPE === "cron") {
|
||||
runners.push(new UserCodeRunner());
|
||||
runners.push(new DockerfileRunner());
|
||||
}
|
||||
}
|
||||
if (runUnitTests === undefined) {
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
"unittests/services/textChanges.ts",
|
||||
"unittests/services/transpile.ts",
|
||||
"unittests/tsbuild/amdModulesWithOut.ts",
|
||||
"unittests/tsbuild/containerOnlyReferenced.ts",
|
||||
"unittests/tsbuild/emptyFiles.ts",
|
||||
"unittests/tsbuild/graphOrdering.ts",
|
||||
"unittests/tsbuild/inferredTypeFromTransitiveModule.ts",
|
||||
|
|
|
@ -486,6 +486,16 @@ namespace ts {
|
|||
});
|
||||
});
|
||||
|
||||
it("parse build with --locale en-us", () => {
|
||||
// --lib es6 0.ts
|
||||
assertParseResult(["--locale", "en-us", "src"],
|
||||
{
|
||||
errors: [],
|
||||
projects: ["src"],
|
||||
buildOptions: { locale: "en-us" }
|
||||
});
|
||||
});
|
||||
|
||||
it("parse build with --tsBuildInfoFile", () => {
|
||||
// --lib es6 0.ts
|
||||
assertParseResult(["--tsBuildInfoFile", "build.tsbuildinfo", "tests"],
|
||||
|
|
48
src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts
Normal file
48
src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts
Normal file
|
@ -0,0 +1,48 @@
|
|||
namespace ts {
|
||||
describe("unittests:: tsbuild:: when containerOnly project is referenced", () => {
|
||||
let projFs: vfs.FileSystem;
|
||||
before(() => {
|
||||
projFs = loadProjectFromDisk("tests/projects/containerOnlyReferenced");
|
||||
});
|
||||
|
||||
after(() => {
|
||||
projFs = undefined!; // Release the contents
|
||||
});
|
||||
|
||||
function outputs(folder: string) {
|
||||
return [
|
||||
`${folder}/index.js`,
|
||||
`${folder}/index.d.ts`,
|
||||
`${folder}/tsconfig.tsbuildinfo`
|
||||
];
|
||||
}
|
||||
|
||||
it("verify that subsequent builds after initial build doesnt build anything", () => {
|
||||
const fs = projFs.shadow();
|
||||
const host = new fakes.SolutionBuilderHost(fs);
|
||||
createSolutionBuilder(host, ["/src"], { verbose: true }).build();
|
||||
host.assertDiagnosticMessages(
|
||||
getExpectedDiagnosticForProjectsInBuild("src/src/folder/tsconfig.json", "src/src/folder2/tsconfig.json", "src/src/tsconfig.json", "src/tests/tsconfig.json", "src/tsconfig.json"),
|
||||
[Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/src/folder/tsconfig.json", "src/src/folder/index.js"],
|
||||
[Diagnostics.Building_project_0, "/src/src/folder/tsconfig.json"],
|
||||
[Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/src/folder2/tsconfig.json", "src/src/folder2/index.js"],
|
||||
[Diagnostics.Building_project_0, "/src/src/folder2/tsconfig.json"],
|
||||
[Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tests/tsconfig.json", "src/tests/index.js"],
|
||||
[Diagnostics.Building_project_0, "/src/tests/tsconfig.json"],
|
||||
);
|
||||
verifyOutputsPresent(fs, [
|
||||
...outputs("/src/src/folder"),
|
||||
...outputs("/src/src/folder2"),
|
||||
...outputs("/src/tests"),
|
||||
]);
|
||||
host.clearDiagnostics();
|
||||
createSolutionBuilder(host, ["/src"], { verbose: true }).build();
|
||||
host.assertDiagnosticMessages(
|
||||
getExpectedDiagnosticForProjectsInBuild("src/src/folder/tsconfig.json", "src/src/folder2/tsconfig.json", "src/src/tsconfig.json", "src/tests/tsconfig.json", "src/tsconfig.json"),
|
||||
[Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, "src/src/folder/tsconfig.json", "src/src/folder/index.ts", "src/src/folder/index.js"],
|
||||
[Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, "src/src/folder2/tsconfig.json", "src/src/folder2/index.ts", "src/src/folder2/index.js"],
|
||||
[Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, "src/tests/tsconfig.json", "src/tests/index.ts", "src/tests/index.js"],
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
|
@ -10,7 +10,6 @@ namespace ts {
|
|||
});
|
||||
|
||||
it("verify that it builds correctly", () => {
|
||||
const projFs = loadProjectFromDisk("tests/projects/projectReferenceWithRootDirInParent");
|
||||
const allExpectedOutputs = [
|
||||
"/src/dist/other/other.js", "/src/dist/other/other.d.ts",
|
||||
"/src/dist/main/a.js", "/src/dist/main/a.d.ts",
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace ts.tscWatch {
|
|||
root.content = `import {x} from "f2"`;
|
||||
host.reloadFS(files);
|
||||
|
||||
// trigger synchronization to make sure that LSHost will try to find 'f2' module on disk
|
||||
// trigger synchronization to make sure that system will try to find 'f2' module on disk
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
|
||||
// ensure file has correct number of errors after edit
|
||||
|
|
|
@ -131,10 +131,10 @@ namespace ts.projectSystem {
|
|||
verifyImportedDiagnostics();
|
||||
callsTrackingHost.verifyNoHostCalls();
|
||||
|
||||
// trigger synchronization to make sure that LSHost will try to find 'f2' module on disk
|
||||
// trigger synchronization to make sure that the host will try to find 'f2' module on disk
|
||||
editContent(`import {x} from "f2"`);
|
||||
try {
|
||||
// trigger synchronization to make sure that LSHost will try to find 'f2' module on disk
|
||||
// trigger synchronization to make sure that the host will try to find 'f2' module on disk
|
||||
verifyImportedDiagnostics();
|
||||
assert.isTrue(false, `should not find file '${imported.path}'`);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace ts.projectSystem {
|
|||
return resolutionTrace;
|
||||
}
|
||||
|
||||
describe("unittests:: tsserver:: resolutionCache:: tsserverProjectSystem extra resolution pass in lshost", () => {
|
||||
describe("unittests:: tsserver:: resolutionCache:: tsserverProjectSystem extra resolution pass in server host", () => {
|
||||
it("can load typings that are proper modules", () => {
|
||||
const file1 = {
|
||||
path: "/a/b/app.js",
|
||||
|
|
|
@ -171,33 +171,37 @@ namespace ts.projectSystem {
|
|||
path: `${projectFolder}/node_modules/.cache/someFile.d.ts`,
|
||||
content: ""
|
||||
};
|
||||
host.ensureFileOrFolder(nodeModulesIgnoredFileFromIgnoreDirectory);
|
||||
host.checkTimeoutQueueLength(0);
|
||||
verifyProject();
|
||||
|
||||
const nodeModulesIgnoredFile: File = {
|
||||
path: `${projectFolder}/node_modules/.cacheFile.ts`,
|
||||
content: ""
|
||||
};
|
||||
host.ensureFileOrFolder(nodeModulesIgnoredFile);
|
||||
host.checkTimeoutQueueLength(0);
|
||||
verifyProject();
|
||||
|
||||
const gitIgnoredFileFromIgnoreDirectory: File = {
|
||||
path: `${projectFolder}/.git/someFile.d.ts`,
|
||||
content: ""
|
||||
};
|
||||
host.ensureFileOrFolder(gitIgnoredFileFromIgnoreDirectory);
|
||||
host.checkTimeoutQueueLength(0);
|
||||
verifyProject();
|
||||
|
||||
const gitIgnoredFile: File = {
|
||||
path: `${projectFolder}/.gitCache.d.ts`,
|
||||
content: ""
|
||||
};
|
||||
host.ensureFileOrFolder(gitIgnoredFile);
|
||||
host.checkTimeoutQueueLength(0);
|
||||
verifyProject();
|
||||
const emacsIgnoredFileFromIgnoreDirectory: File = {
|
||||
path: `${projectFolder}/src/.#field.ts`,
|
||||
content: ""
|
||||
};
|
||||
|
||||
[
|
||||
nodeModulesIgnoredFileFromIgnoreDirectory,
|
||||
nodeModulesIgnoredFile,
|
||||
gitIgnoredFileFromIgnoreDirectory,
|
||||
gitIgnoredFile,
|
||||
emacsIgnoredFileFromIgnoreDirectory
|
||||
].forEach(ignoredEntity => {
|
||||
host.ensureFileOrFolder(ignoredEntity);
|
||||
host.checkTimeoutQueueLength(0);
|
||||
verifyProject();
|
||||
});
|
||||
|
||||
function verifyProject() {
|
||||
checkWatchedDirectories(host, emptyArray, /*recursive*/ true);
|
||||
|
|
|
@ -186,6 +186,10 @@ namespace ts {
|
|||
// Update to pretty if host supports it
|
||||
updateReportDiagnostic(buildOptions);
|
||||
|
||||
if (buildOptions.locale) {
|
||||
validateLocaleAndSetLanguage(buildOptions.locale, sys, errors);
|
||||
}
|
||||
|
||||
if (errors.length > 0) {
|
||||
errors.forEach(reportDiagnostic);
|
||||
return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped);
|
||||
|
|
|
@ -2303,6 +2303,7 @@ declare namespace ts {
|
|||
MarkerType = 8192,
|
||||
JSLiteral = 16384,
|
||||
FreshLiteral = 32768,
|
||||
ArrayLiteral = 65536,
|
||||
ClassOrInterface = 3,
|
||||
}
|
||||
interface ObjectType extends Type {
|
||||
|
|
|
@ -2303,6 +2303,7 @@ declare namespace ts {
|
|||
MarkerType = 8192,
|
||||
JSLiteral = 16384,
|
||||
FreshLiteral = 32768,
|
||||
ArrayLiteral = 65536,
|
||||
ClassOrInterface = 3,
|
||||
}
|
||||
interface ObjectType extends Type {
|
||||
|
|
|
@ -8,12 +8,12 @@ tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts(7,1): error TS2554:
|
|||
function bar(a, b, [c]): void {}
|
||||
|
||||
foo("", 0);
|
||||
~~~~~~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
!!! related TS6211 tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts:1:20: An argument matching this binding pattern was not provided.
|
||||
|
||||
bar("", 0);
|
||||
~~~~~~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
!!! related TS6211 tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts:3:20: An argument matching this binding pattern was not provided.
|
||||
|
65
tests/baselines/reference/arrayLiteralInference.js
Normal file
65
tests/baselines/reference/arrayLiteralInference.js
Normal file
|
@ -0,0 +1,65 @@
|
|||
//// [arrayLiteralInference.ts]
|
||||
// Repro from #31204
|
||||
|
||||
export enum AppType {
|
||||
HeaderDetail = 'HeaderDetail',
|
||||
HeaderMultiDetail = 'HeaderMultiDetail',
|
||||
AdvancedList = 'AdvancedList',
|
||||
Standard = 'Standard',
|
||||
Relationship = 'Relationship',
|
||||
Report = 'Report',
|
||||
Composite = 'Composite',
|
||||
ListOnly = 'ListOnly',
|
||||
ModuleSettings = 'ModuleSettings'
|
||||
}
|
||||
|
||||
export enum AppStyle {
|
||||
Tree,
|
||||
TreeEntity,
|
||||
Standard,
|
||||
MiniApp,
|
||||
PivotTable
|
||||
}
|
||||
|
||||
const appTypeStylesWithError: Map<AppType, Array<AppStyle>> = new Map([
|
||||
[AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]],
|
||||
[AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]],
|
||||
[AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]
|
||||
]);
|
||||
|
||||
// Repro from #31204
|
||||
|
||||
declare function foo<T>(...args: T[]): T[];
|
||||
let b1: { x: boolean }[] = foo({ x: true }, { x: false });
|
||||
let b2: boolean[][] = foo([true], [false]);
|
||||
|
||||
|
||||
//// [arrayLiteralInference.js]
|
||||
// Repro from #31204
|
||||
export var AppType;
|
||||
(function (AppType) {
|
||||
AppType["HeaderDetail"] = "HeaderDetail";
|
||||
AppType["HeaderMultiDetail"] = "HeaderMultiDetail";
|
||||
AppType["AdvancedList"] = "AdvancedList";
|
||||
AppType["Standard"] = "Standard";
|
||||
AppType["Relationship"] = "Relationship";
|
||||
AppType["Report"] = "Report";
|
||||
AppType["Composite"] = "Composite";
|
||||
AppType["ListOnly"] = "ListOnly";
|
||||
AppType["ModuleSettings"] = "ModuleSettings";
|
||||
})(AppType || (AppType = {}));
|
||||
export var AppStyle;
|
||||
(function (AppStyle) {
|
||||
AppStyle[AppStyle["Tree"] = 0] = "Tree";
|
||||
AppStyle[AppStyle["TreeEntity"] = 1] = "TreeEntity";
|
||||
AppStyle[AppStyle["Standard"] = 2] = "Standard";
|
||||
AppStyle[AppStyle["MiniApp"] = 3] = "MiniApp";
|
||||
AppStyle[AppStyle["PivotTable"] = 4] = "PivotTable";
|
||||
})(AppStyle || (AppStyle = {}));
|
||||
const appTypeStylesWithError = new Map([
|
||||
[AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]],
|
||||
[AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]],
|
||||
[AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]
|
||||
]);
|
||||
let b1 = foo({ x: true }, { x: false });
|
||||
let b2 = foo([true], [false]);
|
119
tests/baselines/reference/arrayLiteralInference.symbols
Normal file
119
tests/baselines/reference/arrayLiteralInference.symbols
Normal file
|
@ -0,0 +1,119 @@
|
|||
=== tests/cases/conformance/expressions/arrayLiterals/arrayLiteralInference.ts ===
|
||||
// Repro from #31204
|
||||
|
||||
export enum AppType {
|
||||
>AppType : Symbol(AppType, Decl(arrayLiteralInference.ts, 0, 0))
|
||||
|
||||
HeaderDetail = 'HeaderDetail',
|
||||
>HeaderDetail : Symbol(AppType.HeaderDetail, Decl(arrayLiteralInference.ts, 2, 21))
|
||||
|
||||
HeaderMultiDetail = 'HeaderMultiDetail',
|
||||
>HeaderMultiDetail : Symbol(AppType.HeaderMultiDetail, Decl(arrayLiteralInference.ts, 3, 34))
|
||||
|
||||
AdvancedList = 'AdvancedList',
|
||||
>AdvancedList : Symbol(AppType.AdvancedList, Decl(arrayLiteralInference.ts, 4, 44))
|
||||
|
||||
Standard = 'Standard',
|
||||
>Standard : Symbol(AppType.Standard, Decl(arrayLiteralInference.ts, 5, 34))
|
||||
|
||||
Relationship = 'Relationship',
|
||||
>Relationship : Symbol(AppType.Relationship, Decl(arrayLiteralInference.ts, 6, 26))
|
||||
|
||||
Report = 'Report',
|
||||
>Report : Symbol(AppType.Report, Decl(arrayLiteralInference.ts, 7, 34))
|
||||
|
||||
Composite = 'Composite',
|
||||
>Composite : Symbol(AppType.Composite, Decl(arrayLiteralInference.ts, 8, 22))
|
||||
|
||||
ListOnly = 'ListOnly',
|
||||
>ListOnly : Symbol(AppType.ListOnly, Decl(arrayLiteralInference.ts, 9, 28))
|
||||
|
||||
ModuleSettings = 'ModuleSettings'
|
||||
>ModuleSettings : Symbol(AppType.ModuleSettings, Decl(arrayLiteralInference.ts, 10, 26))
|
||||
}
|
||||
|
||||
export enum AppStyle {
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
|
||||
Tree,
|
||||
>Tree : Symbol(AppStyle.Tree, Decl(arrayLiteralInference.ts, 14, 22))
|
||||
|
||||
TreeEntity,
|
||||
>TreeEntity : Symbol(AppStyle.TreeEntity, Decl(arrayLiteralInference.ts, 15, 9))
|
||||
|
||||
Standard,
|
||||
>Standard : Symbol(AppStyle.Standard, Decl(arrayLiteralInference.ts, 16, 15))
|
||||
|
||||
MiniApp,
|
||||
>MiniApp : Symbol(AppStyle.MiniApp, Decl(arrayLiteralInference.ts, 17, 13))
|
||||
|
||||
PivotTable
|
||||
>PivotTable : Symbol(AppStyle.PivotTable, Decl(arrayLiteralInference.ts, 18, 12))
|
||||
}
|
||||
|
||||
const appTypeStylesWithError: Map<AppType, Array<AppStyle>> = new Map([
|
||||
>appTypeStylesWithError : Symbol(appTypeStylesWithError, Decl(arrayLiteralInference.ts, 22, 5))
|
||||
>Map : Symbol(Map, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
||||
>AppType : Symbol(AppType, Decl(arrayLiteralInference.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
>Map : Symbol(Map, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
||||
|
||||
[AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]],
|
||||
>AppType.Standard : Symbol(AppType.Standard, Decl(arrayLiteralInference.ts, 5, 34))
|
||||
>AppType : Symbol(AppType, Decl(arrayLiteralInference.ts, 0, 0))
|
||||
>Standard : Symbol(AppType.Standard, Decl(arrayLiteralInference.ts, 5, 34))
|
||||
>AppStyle.Standard : Symbol(AppStyle.Standard, Decl(arrayLiteralInference.ts, 16, 15))
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
>Standard : Symbol(AppStyle.Standard, Decl(arrayLiteralInference.ts, 16, 15))
|
||||
>AppStyle.MiniApp : Symbol(AppStyle.MiniApp, Decl(arrayLiteralInference.ts, 17, 13))
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
>MiniApp : Symbol(AppStyle.MiniApp, Decl(arrayLiteralInference.ts, 17, 13))
|
||||
|
||||
[AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]],
|
||||
>AppType.Relationship : Symbol(AppType.Relationship, Decl(arrayLiteralInference.ts, 6, 26))
|
||||
>AppType : Symbol(AppType, Decl(arrayLiteralInference.ts, 0, 0))
|
||||
>Relationship : Symbol(AppType.Relationship, Decl(arrayLiteralInference.ts, 6, 26))
|
||||
>AppStyle.Standard : Symbol(AppStyle.Standard, Decl(arrayLiteralInference.ts, 16, 15))
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
>Standard : Symbol(AppStyle.Standard, Decl(arrayLiteralInference.ts, 16, 15))
|
||||
>AppStyle.Tree : Symbol(AppStyle.Tree, Decl(arrayLiteralInference.ts, 14, 22))
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
>Tree : Symbol(AppStyle.Tree, Decl(arrayLiteralInference.ts, 14, 22))
|
||||
>AppStyle.TreeEntity : Symbol(AppStyle.TreeEntity, Decl(arrayLiteralInference.ts, 15, 9))
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
>TreeEntity : Symbol(AppStyle.TreeEntity, Decl(arrayLiteralInference.ts, 15, 9))
|
||||
|
||||
[AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]
|
||||
>AppType.AdvancedList : Symbol(AppType.AdvancedList, Decl(arrayLiteralInference.ts, 4, 44))
|
||||
>AppType : Symbol(AppType, Decl(arrayLiteralInference.ts, 0, 0))
|
||||
>AdvancedList : Symbol(AppType.AdvancedList, Decl(arrayLiteralInference.ts, 4, 44))
|
||||
>AppStyle.Standard : Symbol(AppStyle.Standard, Decl(arrayLiteralInference.ts, 16, 15))
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
>Standard : Symbol(AppStyle.Standard, Decl(arrayLiteralInference.ts, 16, 15))
|
||||
>AppStyle.MiniApp : Symbol(AppStyle.MiniApp, Decl(arrayLiteralInference.ts, 17, 13))
|
||||
>AppStyle : Symbol(AppStyle, Decl(arrayLiteralInference.ts, 12, 1))
|
||||
>MiniApp : Symbol(AppStyle.MiniApp, Decl(arrayLiteralInference.ts, 17, 13))
|
||||
|
||||
]);
|
||||
|
||||
// Repro from #31204
|
||||
|
||||
declare function foo<T>(...args: T[]): T[];
|
||||
>foo : Symbol(foo, Decl(arrayLiteralInference.ts, 26, 3))
|
||||
>T : Symbol(T, Decl(arrayLiteralInference.ts, 30, 21))
|
||||
>args : Symbol(args, Decl(arrayLiteralInference.ts, 30, 24))
|
||||
>T : Symbol(T, Decl(arrayLiteralInference.ts, 30, 21))
|
||||
>T : Symbol(T, Decl(arrayLiteralInference.ts, 30, 21))
|
||||
|
||||
let b1: { x: boolean }[] = foo({ x: true }, { x: false });
|
||||
>b1 : Symbol(b1, Decl(arrayLiteralInference.ts, 31, 3))
|
||||
>x : Symbol(x, Decl(arrayLiteralInference.ts, 31, 9))
|
||||
>foo : Symbol(foo, Decl(arrayLiteralInference.ts, 26, 3))
|
||||
>x : Symbol(x, Decl(arrayLiteralInference.ts, 31, 32))
|
||||
>x : Symbol(x, Decl(arrayLiteralInference.ts, 31, 45))
|
||||
|
||||
let b2: boolean[][] = foo([true], [false]);
|
||||
>b2 : Symbol(b2, Decl(arrayLiteralInference.ts, 32, 3))
|
||||
>foo : Symbol(foo, Decl(arrayLiteralInference.ts, 26, 3))
|
||||
|
139
tests/baselines/reference/arrayLiteralInference.types
Normal file
139
tests/baselines/reference/arrayLiteralInference.types
Normal file
|
@ -0,0 +1,139 @@
|
|||
=== tests/cases/conformance/expressions/arrayLiterals/arrayLiteralInference.ts ===
|
||||
// Repro from #31204
|
||||
|
||||
export enum AppType {
|
||||
>AppType : AppType
|
||||
|
||||
HeaderDetail = 'HeaderDetail',
|
||||
>HeaderDetail : AppType.HeaderDetail
|
||||
>'HeaderDetail' : "HeaderDetail"
|
||||
|
||||
HeaderMultiDetail = 'HeaderMultiDetail',
|
||||
>HeaderMultiDetail : AppType.HeaderMultiDetail
|
||||
>'HeaderMultiDetail' : "HeaderMultiDetail"
|
||||
|
||||
AdvancedList = 'AdvancedList',
|
||||
>AdvancedList : AppType.AdvancedList
|
||||
>'AdvancedList' : "AdvancedList"
|
||||
|
||||
Standard = 'Standard',
|
||||
>Standard : AppType.Standard
|
||||
>'Standard' : "Standard"
|
||||
|
||||
Relationship = 'Relationship',
|
||||
>Relationship : AppType.Relationship
|
||||
>'Relationship' : "Relationship"
|
||||
|
||||
Report = 'Report',
|
||||
>Report : AppType.Report
|
||||
>'Report' : "Report"
|
||||
|
||||
Composite = 'Composite',
|
||||
>Composite : AppType.Composite
|
||||
>'Composite' : "Composite"
|
||||
|
||||
ListOnly = 'ListOnly',
|
||||
>ListOnly : AppType.ListOnly
|
||||
>'ListOnly' : "ListOnly"
|
||||
|
||||
ModuleSettings = 'ModuleSettings'
|
||||
>ModuleSettings : AppType.ModuleSettings
|
||||
>'ModuleSettings' : "ModuleSettings"
|
||||
}
|
||||
|
||||
export enum AppStyle {
|
||||
>AppStyle : AppStyle
|
||||
|
||||
Tree,
|
||||
>Tree : AppStyle.Tree
|
||||
|
||||
TreeEntity,
|
||||
>TreeEntity : AppStyle.TreeEntity
|
||||
|
||||
Standard,
|
||||
>Standard : AppStyle.Standard
|
||||
|
||||
MiniApp,
|
||||
>MiniApp : AppStyle.MiniApp
|
||||
|
||||
PivotTable
|
||||
>PivotTable : AppStyle.PivotTable
|
||||
}
|
||||
|
||||
const appTypeStylesWithError: Map<AppType, Array<AppStyle>> = new Map([
|
||||
>appTypeStylesWithError : Map<AppType, AppStyle[]>
|
||||
>new Map([ [AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]], [AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]], [AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]]) : Map<AppType.AdvancedList | AppType.Standard | AppType.Relationship, (AppStyle.Standard | AppStyle.MiniApp)[] | (AppStyle.Tree | AppStyle.TreeEntity | AppStyle.Standard)[]>
|
||||
>Map : MapConstructor
|
||||
>[ [AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]], [AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]], [AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]] : ([AppType.Standard, (AppStyle.Standard | AppStyle.MiniApp)[]] | [AppType.Relationship, (AppStyle.Tree | AppStyle.TreeEntity | AppStyle.Standard)[]] | [AppType.AdvancedList, (AppStyle.Standard | AppStyle.MiniApp)[]])[]
|
||||
|
||||
[AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]],
|
||||
>[AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]] : [AppType.Standard, (AppStyle.Standard | AppStyle.MiniApp)[]]
|
||||
>AppType.Standard : AppType.Standard
|
||||
>AppType : typeof AppType
|
||||
>Standard : AppType.Standard
|
||||
>[AppStyle.Standard, AppStyle.MiniApp] : (AppStyle.Standard | AppStyle.MiniApp)[]
|
||||
>AppStyle.Standard : AppStyle.Standard
|
||||
>AppStyle : typeof AppStyle
|
||||
>Standard : AppStyle.Standard
|
||||
>AppStyle.MiniApp : AppStyle.MiniApp
|
||||
>AppStyle : typeof AppStyle
|
||||
>MiniApp : AppStyle.MiniApp
|
||||
|
||||
[AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]],
|
||||
>[AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]] : [AppType.Relationship, (AppStyle.Tree | AppStyle.TreeEntity | AppStyle.Standard)[]]
|
||||
>AppType.Relationship : AppType.Relationship
|
||||
>AppType : typeof AppType
|
||||
>Relationship : AppType.Relationship
|
||||
>[AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity] : (AppStyle.Tree | AppStyle.TreeEntity | AppStyle.Standard)[]
|
||||
>AppStyle.Standard : AppStyle.Standard
|
||||
>AppStyle : typeof AppStyle
|
||||
>Standard : AppStyle.Standard
|
||||
>AppStyle.Tree : AppStyle.Tree
|
||||
>AppStyle : typeof AppStyle
|
||||
>Tree : AppStyle.Tree
|
||||
>AppStyle.TreeEntity : AppStyle.TreeEntity
|
||||
>AppStyle : typeof AppStyle
|
||||
>TreeEntity : AppStyle.TreeEntity
|
||||
|
||||
[AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]
|
||||
>[AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]] : [AppType.AdvancedList, (AppStyle.Standard | AppStyle.MiniApp)[]]
|
||||
>AppType.AdvancedList : AppType.AdvancedList
|
||||
>AppType : typeof AppType
|
||||
>AdvancedList : AppType.AdvancedList
|
||||
>[AppStyle.Standard, AppStyle.MiniApp] : (AppStyle.Standard | AppStyle.MiniApp)[]
|
||||
>AppStyle.Standard : AppStyle.Standard
|
||||
>AppStyle : typeof AppStyle
|
||||
>Standard : AppStyle.Standard
|
||||
>AppStyle.MiniApp : AppStyle.MiniApp
|
||||
>AppStyle : typeof AppStyle
|
||||
>MiniApp : AppStyle.MiniApp
|
||||
|
||||
]);
|
||||
|
||||
// Repro from #31204
|
||||
|
||||
declare function foo<T>(...args: T[]): T[];
|
||||
>foo : <T>(...args: T[]) => T[]
|
||||
>args : T[]
|
||||
|
||||
let b1: { x: boolean }[] = foo({ x: true }, { x: false });
|
||||
>b1 : { x: boolean; }[]
|
||||
>x : boolean
|
||||
>foo({ x: true }, { x: false }) : ({ x: true; } | { x: false; })[]
|
||||
>foo : <T>(...args: T[]) => T[]
|
||||
>{ x: true } : { x: true; }
|
||||
>x : true
|
||||
>true : true
|
||||
>{ x: false } : { x: false; }
|
||||
>x : false
|
||||
>false : false
|
||||
|
||||
let b2: boolean[][] = foo([true], [false]);
|
||||
>b2 : boolean[][]
|
||||
>foo([true], [false]) : (true[] | false[])[]
|
||||
>foo : <T>(...args: T[]) => T[]
|
||||
>[true] : true[]
|
||||
>true : true
|
||||
>[false] : false[]
|
||||
>false : false
|
||||
|
|
@ -30,7 +30,7 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'.
|
|||
}
|
||||
|
||||
class D extends C { constructor(public z: number) { super(this.z) } } // too few params
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2554: Expected 2 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/compiler/baseCheck.ts:1:34: An argument for 'y' was not provided.
|
||||
~~~~
|
||||
|
|
|
@ -33,6 +33,6 @@ tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts(16,1): error T
|
|||
}
|
||||
foo(10);
|
||||
foo(); // not ok - needs number
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts:1:14: An argument for 'a' was not provided.
|
|
@ -33,6 +33,6 @@ tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts(16,1): error T
|
|||
}
|
||||
foo(10);
|
||||
foo(); // not ok - needs number
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts:1:14: An argument for 'a' was not provided.
|
|
@ -29,12 +29,12 @@ tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts(17,1): e
|
|||
}
|
||||
foo(10);
|
||||
foo(); // not ok - needs number
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts:2:14: An argument for 'a' was not provided.
|
||||
}
|
||||
foo(10);
|
||||
foo(); // not ok - needs number
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts:2:14: An argument for 'a' was not provided.
|
|
@ -23,12 +23,12 @@ tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts(17,1): e
|
|||
}
|
||||
foo(10);
|
||||
foo(); // not ok
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts:2:14: An argument for 'a' was not provided.
|
||||
}
|
||||
foo(10);
|
||||
foo(); // not ok - needs number
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts:2:14: An argument for 'a' was not provided.
|
|
@ -19,7 +19,7 @@ tests/cases/conformance/expressions/functionCalls/callOverload.ts(11,10): error
|
|||
!!! error TS2554: Expected 2 arguments, but got 4.
|
||||
withRest('a', ...n); // no error
|
||||
withRest();
|
||||
~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2555: Expected at least 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callOverload.ts:3:27: An argument for 'a' was not provided.
|
||||
withRest(...n);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(16,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(19,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(22,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(16,6): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(19,10): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(22,8): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(35,31): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(36,35): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(37,33): error TS2554: Expected 1 arguments, but got 0.
|
||||
|
@ -28,19 +28,19 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1):
|
|||
|
||||
declare const xAny: X<any>;
|
||||
xAny.f() // error, any still expects an argument
|
||||
~~~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:3:7: An argument for 't' was not provided.
|
||||
|
||||
declare const xUnknown: X<unknown>;
|
||||
xUnknown.f() // error, unknown still expects an argument
|
||||
~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:3:7: An argument for 't' was not provided.
|
||||
|
||||
declare const xNever: X<never>;
|
||||
xNever.f() // error, never still expects an argument
|
||||
~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:3:7: An argument for 't' was not provided.
|
||||
|
||||
|
@ -56,15 +56,15 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1):
|
|||
new MyPromise<void>(resolve => resolve()); // no error
|
||||
new MyPromise<void | number>(resolve => resolve()); // no error
|
||||
new MyPromise<any>(resolve => resolve()); // error, `any` arguments cannot be omitted
|
||||
~~~~~~~~~
|
||||
~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:28:38: An argument for 'value' was not provided.
|
||||
new MyPromise<unknown>(resolve => resolve()); // error, `unknown` arguments cannot be omitted
|
||||
~~~~~~~~~
|
||||
~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:28:38: An argument for 'value' was not provided.
|
||||
new MyPromise<never>(resolve => resolve()); // error, `never` arguments cannot be omitted
|
||||
~~~~~~~~~
|
||||
~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:28:38: An argument for 'value' was not provided.
|
||||
|
||||
|
@ -78,7 +78,7 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1):
|
|||
a(4, "hello"); // ok
|
||||
a(4, "hello", void 0); // ok
|
||||
a(4); // not ok
|
||||
~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 3 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:42:23: An argument for 'y' was not provided.
|
||||
|
||||
|
@ -88,15 +88,15 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1):
|
|||
|
||||
b(4, "hello", void 0, 2); // ok
|
||||
b(4, "hello"); // not ok
|
||||
~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 4 arguments, but got 2.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:50:34: An argument for 'z' was not provided.
|
||||
b(4, "hello", void 0); // not ok
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 4 arguments, but got 3.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:50:43: An argument for 'what' was not provided.
|
||||
b(4); // not ok
|
||||
~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 4 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:50:23: An argument for 'y' was not provided.
|
||||
|
||||
|
@ -117,7 +117,7 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1):
|
|||
...args: TS): void;
|
||||
|
||||
call((x: number, y: number) => x + y) // error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:73:5: An argument for 'args' was not provided.
|
||||
call((x: number, y: number) => x + y, 4, 2) // ok
|
||||
|
|
|
@ -38,7 +38,7 @@ tests/cases/conformance/salsa/second.ts(17,15): error TS2345: Argument of type '
|
|||
class Sql extends Wagon {
|
||||
constructor() {
|
||||
super(); // error: not enough arguments
|
||||
~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/salsa/first.js:5:16: An argument for 'numberOxen' was not provided.
|
||||
this.foonly = 12
|
||||
|
|
|
@ -2,6 +2,8 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS232
|
|||
Types of property 'length' are incompatible.
|
||||
Type '3' is not assignable to type '2'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(15,1): error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
Types of property 'length' are incompatible.
|
||||
Type '3' is not assignable to type '2'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(18,17): error TS2741: Property 'a' is missing in type '{}' but required in type '{ a: string; }'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(19,1): error TS2741: Property '2' is missing in type '[number, string]' but required in type '[number, string, boolean]'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(20,5): error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]'.
|
||||
|
@ -38,6 +40,8 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(25,1): error TS23
|
|||
numStrTuple = numStrBoolTuple;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
!!! error TS2322: Types of property 'length' are incompatible.
|
||||
!!! error TS2322: Type '3' is not assignable to type '2'.
|
||||
|
||||
// error
|
||||
objNumTuple = [ {}, 5];
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
//// [tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts] ////
|
||||
|
||||
//// [foo.ts]
|
||||
export class Foo {}
|
||||
|
||||
//// [index1.ts]
|
||||
import {Foo} from './foo';
|
||||
export default function Example() {}
|
||||
Example.Foo = Foo
|
||||
|
||||
//// [index2.ts]
|
||||
import {Foo} from './foo';
|
||||
export {Foo};
|
||||
export default function Example() {}
|
||||
Example.Foo = Foo
|
||||
|
||||
//// [index3.ts]
|
||||
export class Bar {}
|
||||
export default function Example() {}
|
||||
|
||||
Example.Bar = Bar
|
||||
|
||||
//// [index4.ts]
|
||||
function A() { }
|
||||
|
||||
function B() { }
|
||||
|
||||
export function C() {
|
||||
return null;
|
||||
}
|
||||
|
||||
C.A = A;
|
||||
C.B = B;
|
||||
|
||||
//// [foo.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var Foo = /** @class */ (function () {
|
||||
function Foo() {
|
||||
}
|
||||
return Foo;
|
||||
}());
|
||||
exports.Foo = Foo;
|
||||
//// [index1.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var foo_1 = require("./foo");
|
||||
function Example() { }
|
||||
exports["default"] = Example;
|
||||
Example.Foo = foo_1.Foo;
|
||||
//// [index2.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var foo_1 = require("./foo");
|
||||
exports.Foo = foo_1.Foo;
|
||||
function Example() { }
|
||||
exports["default"] = Example;
|
||||
Example.Foo = foo_1.Foo;
|
||||
//// [index3.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var Bar = /** @class */ (function () {
|
||||
function Bar() {
|
||||
}
|
||||
return Bar;
|
||||
}());
|
||||
exports.Bar = Bar;
|
||||
function Example() { }
|
||||
exports["default"] = Example;
|
||||
Example.Bar = Bar;
|
||||
//// [index4.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
function A() { }
|
||||
function B() { }
|
||||
function C() {
|
||||
return null;
|
||||
}
|
||||
exports.C = C;
|
||||
C.A = A;
|
||||
C.B = B;
|
||||
|
||||
|
||||
//// [foo.d.ts]
|
||||
export declare class Foo {
|
||||
}
|
||||
//// [index1.d.ts]
|
||||
declare function Example(): void;
|
||||
declare namespace Example {
|
||||
var Foo: typeof import("./foo").Foo;
|
||||
}
|
||||
export default Example;
|
||||
//// [index2.d.ts]
|
||||
import { Foo } from './foo';
|
||||
export { Foo };
|
||||
declare function Example(): void;
|
||||
declare namespace Example {
|
||||
var Foo: typeof import("./foo").Foo;
|
||||
}
|
||||
export default Example;
|
||||
//// [index3.d.ts]
|
||||
export declare class Bar {
|
||||
}
|
||||
declare function Example(): void;
|
||||
declare namespace Example {
|
||||
var Bar: typeof import("./index3").Bar;
|
||||
}
|
||||
export default Example;
|
||||
//// [index4.d.ts]
|
||||
export declare function C(): any;
|
||||
export declare namespace C {
|
||||
var A: () => void;
|
||||
var B: () => void;
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
=== tests/cases/compiler/foo.ts ===
|
||||
export class Foo {}
|
||||
>Foo : Symbol(Foo, Decl(foo.ts, 0, 0))
|
||||
|
||||
=== tests/cases/compiler/index1.ts ===
|
||||
import {Foo} from './foo';
|
||||
>Foo : Symbol(Foo, Decl(index1.ts, 0, 8))
|
||||
|
||||
export default function Example() {}
|
||||
>Example : Symbol(Example, Decl(index1.ts, 0, 26), Decl(index1.ts, 1, 36))
|
||||
|
||||
Example.Foo = Foo
|
||||
>Example.Foo : Symbol(Example.Foo, Decl(index1.ts, 1, 36))
|
||||
>Example : Symbol(Example, Decl(index1.ts, 0, 26), Decl(index1.ts, 1, 36))
|
||||
>Foo : Symbol(Example.Foo, Decl(index1.ts, 1, 36))
|
||||
>Foo : Symbol(Foo, Decl(index1.ts, 0, 8))
|
||||
|
||||
=== tests/cases/compiler/index2.ts ===
|
||||
import {Foo} from './foo';
|
||||
>Foo : Symbol(Foo, Decl(index2.ts, 0, 8))
|
||||
|
||||
export {Foo};
|
||||
>Foo : Symbol(Foo, Decl(index2.ts, 1, 8))
|
||||
|
||||
export default function Example() {}
|
||||
>Example : Symbol(Example, Decl(index2.ts, 1, 13), Decl(index2.ts, 2, 36))
|
||||
|
||||
Example.Foo = Foo
|
||||
>Example.Foo : Symbol(Example.Foo, Decl(index2.ts, 2, 36))
|
||||
>Example : Symbol(Example, Decl(index2.ts, 1, 13), Decl(index2.ts, 2, 36))
|
||||
>Foo : Symbol(Example.Foo, Decl(index2.ts, 2, 36))
|
||||
>Foo : Symbol(Foo, Decl(index2.ts, 0, 8))
|
||||
|
||||
=== tests/cases/compiler/index3.ts ===
|
||||
export class Bar {}
|
||||
>Bar : Symbol(Bar, Decl(index3.ts, 0, 0))
|
||||
|
||||
export default function Example() {}
|
||||
>Example : Symbol(Example, Decl(index3.ts, 0, 19), Decl(index3.ts, 1, 36))
|
||||
|
||||
Example.Bar = Bar
|
||||
>Example.Bar : Symbol(Example.Bar, Decl(index3.ts, 1, 36))
|
||||
>Example : Symbol(Example, Decl(index3.ts, 0, 19), Decl(index3.ts, 1, 36))
|
||||
>Bar : Symbol(Example.Bar, Decl(index3.ts, 1, 36))
|
||||
>Bar : Symbol(Bar, Decl(index3.ts, 0, 0))
|
||||
|
||||
=== tests/cases/compiler/index4.ts ===
|
||||
function A() { }
|
||||
>A : Symbol(A, Decl(index4.ts, 0, 0))
|
||||
|
||||
function B() { }
|
||||
>B : Symbol(B, Decl(index4.ts, 0, 17))
|
||||
|
||||
export function C() {
|
||||
>C : Symbol(C, Decl(index4.ts, 2, 16), Decl(index4.ts, 6, 1))
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
C.A = A;
|
||||
>C.A : Symbol(C.A, Decl(index4.ts, 6, 1))
|
||||
>C : Symbol(C, Decl(index4.ts, 2, 16), Decl(index4.ts, 6, 1))
|
||||
>A : Symbol(C.A, Decl(index4.ts, 6, 1))
|
||||
>A : Symbol(A, Decl(index4.ts, 0, 0))
|
||||
|
||||
C.B = B;
|
||||
>C.B : Symbol(C.B, Decl(index4.ts, 8, 8))
|
||||
>C : Symbol(C, Decl(index4.ts, 2, 16), Decl(index4.ts, 6, 1))
|
||||
>B : Symbol(C.B, Decl(index4.ts, 8, 8))
|
||||
>B : Symbol(B, Decl(index4.ts, 0, 17))
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
=== tests/cases/compiler/foo.ts ===
|
||||
export class Foo {}
|
||||
>Foo : Foo
|
||||
|
||||
=== tests/cases/compiler/index1.ts ===
|
||||
import {Foo} from './foo';
|
||||
>Foo : typeof Foo
|
||||
|
||||
export default function Example() {}
|
||||
>Example : typeof Example
|
||||
|
||||
Example.Foo = Foo
|
||||
>Example.Foo = Foo : typeof Foo
|
||||
>Example.Foo : typeof Foo
|
||||
>Example : typeof Example
|
||||
>Foo : typeof Foo
|
||||
>Foo : typeof Foo
|
||||
|
||||
=== tests/cases/compiler/index2.ts ===
|
||||
import {Foo} from './foo';
|
||||
>Foo : typeof Foo
|
||||
|
||||
export {Foo};
|
||||
>Foo : typeof Foo
|
||||
|
||||
export default function Example() {}
|
||||
>Example : typeof Example
|
||||
|
||||
Example.Foo = Foo
|
||||
>Example.Foo = Foo : typeof Foo
|
||||
>Example.Foo : typeof Foo
|
||||
>Example : typeof Example
|
||||
>Foo : typeof Foo
|
||||
>Foo : typeof Foo
|
||||
|
||||
=== tests/cases/compiler/index3.ts ===
|
||||
export class Bar {}
|
||||
>Bar : Bar
|
||||
|
||||
export default function Example() {}
|
||||
>Example : typeof Example
|
||||
|
||||
Example.Bar = Bar
|
||||
>Example.Bar = Bar : typeof Bar
|
||||
>Example.Bar : typeof Bar
|
||||
>Example : typeof Example
|
||||
>Bar : typeof Bar
|
||||
>Bar : typeof Bar
|
||||
|
||||
=== tests/cases/compiler/index4.ts ===
|
||||
function A() { }
|
||||
>A : () => void
|
||||
|
||||
function B() { }
|
||||
>B : () => void
|
||||
|
||||
export function C() {
|
||||
>C : typeof C
|
||||
|
||||
return null;
|
||||
>null : null
|
||||
}
|
||||
|
||||
C.A = A;
|
||||
>C.A = A : () => void
|
||||
>C.A : () => void
|
||||
>C : typeof C
|
||||
>A : () => void
|
||||
>A : () => void
|
||||
|
||||
C.B = B;
|
||||
>C.B = B : () => void
|
||||
>C.B : () => void
|
||||
>C : typeof C
|
||||
>B : () => void
|
||||
>B : () => void
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
//// [declarationEmitExpandoWithGenericConstraint.ts]
|
||||
export interface Point {
|
||||
readonly x: number;
|
||||
readonly y: number;
|
||||
}
|
||||
|
||||
export interface Rect<p extends Point> {
|
||||
readonly a: p;
|
||||
readonly b: p;
|
||||
}
|
||||
|
||||
export const Point = (x: number, y: number): Point => ({ x, y });
|
||||
export const Rect = <p extends Point>(a: p, b: p): Rect<p> => ({ a, b });
|
||||
|
||||
Point.zero = (): Point => Point(0, 0);
|
||||
|
||||
//// [declarationEmitExpandoWithGenericConstraint.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.Point = function (x, y) { return ({ x: x, y: y }); };
|
||||
exports.Rect = function (a, b) { return ({ a: a, b: b }); };
|
||||
exports.Point.zero = function () { return exports.Point(0, 0); };
|
||||
|
||||
|
||||
//// [declarationEmitExpandoWithGenericConstraint.d.ts]
|
||||
export interface Point {
|
||||
readonly x: number;
|
||||
readonly y: number;
|
||||
}
|
||||
export interface Rect<p extends Point> {
|
||||
readonly a: p;
|
||||
readonly b: p;
|
||||
}
|
||||
export declare const Point: {
|
||||
(x: number, y: number): Point;
|
||||
zero(): Point;
|
||||
};
|
||||
export declare const Rect: <p extends Point>(a: p, b: p) => Rect<p>;
|
|
@ -0,0 +1,53 @@
|
|||
=== tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts ===
|
||||
export interface Point {
|
||||
>Point : Symbol(Point, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 0), Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 12), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
|
||||
readonly x: number;
|
||||
>x : Symbol(Point.x, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 24))
|
||||
|
||||
readonly y: number;
|
||||
>y : Symbol(Point.y, Decl(declarationEmitExpandoWithGenericConstraint.ts, 1, 23))
|
||||
}
|
||||
|
||||
export interface Rect<p extends Point> {
|
||||
>Rect : Symbol(Rect, Decl(declarationEmitExpandoWithGenericConstraint.ts, 3, 1), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 12))
|
||||
>p : Symbol(p, Decl(declarationEmitExpandoWithGenericConstraint.ts, 5, 22))
|
||||
>Point : Symbol(Point, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 0), Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 12), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
|
||||
readonly a: p;
|
||||
>a : Symbol(Rect.a, Decl(declarationEmitExpandoWithGenericConstraint.ts, 5, 40))
|
||||
>p : Symbol(p, Decl(declarationEmitExpandoWithGenericConstraint.ts, 5, 22))
|
||||
|
||||
readonly b: p;
|
||||
>b : Symbol(Rect.b, Decl(declarationEmitExpandoWithGenericConstraint.ts, 6, 18))
|
||||
>p : Symbol(p, Decl(declarationEmitExpandoWithGenericConstraint.ts, 5, 22))
|
||||
}
|
||||
|
||||
export const Point = (x: number, y: number): Point => ({ x, y });
|
||||
>Point : Symbol(Point, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 0), Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 12), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
>x : Symbol(x, Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 22))
|
||||
>y : Symbol(y, Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 32))
|
||||
>Point : Symbol(Point, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 0), Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 12), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
>x : Symbol(x, Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 56))
|
||||
>y : Symbol(y, Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 59))
|
||||
|
||||
export const Rect = <p extends Point>(a: p, b: p): Rect<p> => ({ a, b });
|
||||
>Rect : Symbol(Rect, Decl(declarationEmitExpandoWithGenericConstraint.ts, 3, 1), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 12))
|
||||
>p : Symbol(p, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 21))
|
||||
>Point : Symbol(Point, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 0), Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 12), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
>a : Symbol(a, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 38))
|
||||
>p : Symbol(p, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 21))
|
||||
>b : Symbol(b, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 43))
|
||||
>p : Symbol(p, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 21))
|
||||
>Rect : Symbol(Rect, Decl(declarationEmitExpandoWithGenericConstraint.ts, 3, 1), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 12))
|
||||
>p : Symbol(p, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 21))
|
||||
>a : Symbol(a, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 64))
|
||||
>b : Symbol(b, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 67))
|
||||
|
||||
Point.zero = (): Point => Point(0, 0);
|
||||
>Point.zero : Symbol(Point.zero, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
>Point : Symbol(Point, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 0), Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 12), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
>zero : Symbol(Point.zero, Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
>Point : Symbol(Point, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 0), Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 12), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
>Point : Symbol(Point, Decl(declarationEmitExpandoWithGenericConstraint.ts, 0, 0), Decl(declarationEmitExpandoWithGenericConstraint.ts, 10, 12), Decl(declarationEmitExpandoWithGenericConstraint.ts, 11, 73))
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
=== tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts ===
|
||||
export interface Point {
|
||||
readonly x: number;
|
||||
>x : number
|
||||
|
||||
readonly y: number;
|
||||
>y : number
|
||||
}
|
||||
|
||||
export interface Rect<p extends Point> {
|
||||
readonly a: p;
|
||||
>a : p
|
||||
|
||||
readonly b: p;
|
||||
>b : p
|
||||
}
|
||||
|
||||
export const Point = (x: number, y: number): Point => ({ x, y });
|
||||
>Point : { (x: number, y: number): Point; zero(): Point; }
|
||||
>(x: number, y: number): Point => ({ x, y }) : { (x: number, y: number): Point; zero(): Point; }
|
||||
>x : number
|
||||
>y : number
|
||||
>({ x, y }) : { x: number; y: number; }
|
||||
>{ x, y } : { x: number; y: number; }
|
||||
>x : number
|
||||
>y : number
|
||||
|
||||
export const Rect = <p extends Point>(a: p, b: p): Rect<p> => ({ a, b });
|
||||
>Rect : <p extends Point>(a: p, b: p) => Rect<p>
|
||||
><p extends Point>(a: p, b: p): Rect<p> => ({ a, b }) : <p extends Point>(a: p, b: p) => Rect<p>
|
||||
>a : p
|
||||
>b : p
|
||||
>({ a, b }) : { a: p; b: p; }
|
||||
>{ a, b } : { a: p; b: p; }
|
||||
>a : p
|
||||
>b : p
|
||||
|
||||
Point.zero = (): Point => Point(0, 0);
|
||||
>Point.zero = (): Point => Point(0, 0) : () => Point
|
||||
>Point.zero : () => Point
|
||||
>Point : { (x: number, y: number): Point; zero(): Point; }
|
||||
>zero : () => Point
|
||||
>(): Point => Point(0, 0) : () => Point
|
||||
>Point(0, 0) : Point
|
||||
>Point : { (x: number, y: number): Point; zero(): Point; }
|
||||
>0 : 0
|
||||
>0 : 0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/derivedTypeCallingBaseImplWithOptionalParams.ts(13,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/compiler/derivedTypeCallingBaseImplWithOptionalParams.ts(13,3): error TS2554: Expected 1 arguments, but got 0.
|
||||
|
||||
|
||||
==== tests/cases/compiler/derivedTypeCallingBaseImplWithOptionalParams.ts (1 errors) ====
|
||||
|
@ -15,6 +15,6 @@ tests/cases/compiler/derivedTypeCallingBaseImplWithOptionalParams.ts(13,1): erro
|
|||
|
||||
var y: MyClass = new MyClass();
|
||||
y.myMethod(); // error
|
||||
~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/derivedTypeCallingBaseImplWithOptionalParams.ts:5:14: An argument for 'myList' was not provided.
|
|
@ -1,9 +1,10 @@
|
|||
tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(31,8): error TS2339: Property 'x' does not exist on type 'Number'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(32,9): error TS2339: Property 'x' does not exist on type 'Number'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(33,9): error TS2537: Type 'Number' has no matching index signature for type 'string'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(40,1): error TS2532: Object is possibly 'undefined'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts (3 errors) ====
|
||||
==== tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts (4 errors) ====
|
||||
function f1(obj: { a?: string }) {
|
||||
if (obj.a) {
|
||||
obj = {};
|
||||
|
@ -44,4 +45,12 @@ tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts(33,9): err
|
|||
~~~~~~~~
|
||||
!!! error TS2537: Type 'Number' has no matching index signature for type 'string'.
|
||||
}
|
||||
|
||||
// Repro from #31770
|
||||
|
||||
type KeyValue = [string, string?];
|
||||
let [key, value]: KeyValue = ["foo"];
|
||||
value.toUpperCase(); // Error
|
||||
~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
|
|
@ -33,6 +33,12 @@ function f4() {
|
|||
({ ["x"]: x } = 0); // Error
|
||||
({ ["x" + ""]: x } = 0); // Errpr
|
||||
}
|
||||
|
||||
// Repro from #31770
|
||||
|
||||
type KeyValue = [string, string?];
|
||||
let [key, value]: KeyValue = ["foo"];
|
||||
value.toUpperCase(); // Error
|
||||
|
||||
|
||||
//// [destructuringControlFlow.js]
|
||||
|
@ -69,3 +75,5 @@ function f4() {
|
|||
(x = 0["x"]); // Error
|
||||
(_a = "x" + "", x = 0[_a]); // Errpr
|
||||
}
|
||||
var _a = ["foo"], key = _a[0], value = _a[1];
|
||||
value.toUpperCase(); // Error
|
||||
|
|
|
@ -122,3 +122,16 @@ function f4() {
|
|||
>x : Symbol(x, Decl(destructuringControlFlow.ts, 29, 7))
|
||||
}
|
||||
|
||||
// Repro from #31770
|
||||
|
||||
type KeyValue = [string, string?];
|
||||
>KeyValue : Symbol(KeyValue, Decl(destructuringControlFlow.ts, 33, 1))
|
||||
|
||||
let [key, value]: KeyValue = ["foo"];
|
||||
>key : Symbol(key, Decl(destructuringControlFlow.ts, 38, 5))
|
||||
>value : Symbol(value, Decl(destructuringControlFlow.ts, 38, 9))
|
||||
>KeyValue : Symbol(KeyValue, Decl(destructuringControlFlow.ts, 33, 1))
|
||||
|
||||
value.toUpperCase(); // Error
|
||||
>value : Symbol(value, Decl(destructuringControlFlow.ts, 38, 9))
|
||||
|
||||
|
|
|
@ -158,3 +158,20 @@ function f4() {
|
|||
>0 : 0
|
||||
}
|
||||
|
||||
// Repro from #31770
|
||||
|
||||
type KeyValue = [string, string?];
|
||||
>KeyValue : [string, (string | undefined)?]
|
||||
|
||||
let [key, value]: KeyValue = ["foo"];
|
||||
>key : string
|
||||
>value : string | undefined
|
||||
>["foo"] : [string]
|
||||
>"foo" : "foo"
|
||||
|
||||
value.toUpperCase(); // Error
|
||||
>value.toUpperCase() : any
|
||||
>value.toUpperCase : any
|
||||
>value : undefined
|
||||
>toUpperCase : any
|
||||
|
||||
|
|
98
tests/baselines/reference/docker/azure-sdk.log
Normal file
98
tests/baselines/reference/docker/azure-sdk.log
Normal file
|
@ -0,0 +1,98 @@
|
|||
Exit Code: 1
|
||||
Standard output:
|
||||
|
||||
|
||||
Rush Multi-Project Build Tool 5.7.3 - https://rushjs.io
|
||||
|
||||
|
||||
Starting "rush rebuild"
|
||||
|
||||
Executing a maximum of 1 simultaneous processes...
|
||||
|
||||
[@azure/cosmos] started
|
||||
XX of XX: [@azure/cosmos] completed successfully in ? seconds
|
||||
[@azure/service-bus] started
|
||||
Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md
|
||||
[@azure/storage-blob] started
|
||||
XX of XX: [@azure/storage-blob] completed successfully in ? seconds
|
||||
[@azure/storage-datalake] started
|
||||
XX of XX: [@azure/storage-datalake] completed successfully in ? seconds
|
||||
[@azure/storage-file] started
|
||||
XX of XX: [@azure/storage-file] completed successfully in ? seconds
|
||||
[@azure/storage-queue] started
|
||||
XX of XX: [@azure/storage-queue] completed successfully in ? seconds
|
||||
[@azure/template] started
|
||||
XX of XX: [@azure/template] completed successfully in ? seconds
|
||||
[@azure/abort-controller] started
|
||||
XX of XX: [@azure/abort-controller] completed successfully in ? seconds
|
||||
[@azure/core-http] started
|
||||
XX of XX: [@azure/core-http] completed successfully in ? seconds
|
||||
[@azure/core-paging] started
|
||||
XX of XX: [@azure/core-paging] completed successfully in ? seconds
|
||||
[@azure/event-processor-host] started
|
||||
XX of XX: [@azure/event-processor-host] completed successfully in ? seconds
|
||||
[testhub] started
|
||||
XX of XX: [testhub] completed successfully in ? seconds
|
||||
[@azure/identity] started
|
||||
XX of XX: [@azure/identity] completed successfully in ? seconds
|
||||
[@azure/keyvault-certificates] started
|
||||
XX of XX: [@azure/keyvault-certificates] completed successfully in ? seconds
|
||||
[@azure/keyvault-keys] started
|
||||
XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds
|
||||
[@azure/keyvault-secrets] started
|
||||
XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds
|
||||
[@azure/core-amqp] started
|
||||
|
||||
SUCCESS (15)
|
||||
================================
|
||||
@azure/abort-controller (? seconds)
|
||||
@azure/core-http (? seconds)
|
||||
@azure/core-paging (? seconds)
|
||||
@azure/cosmos (? seconds)
|
||||
@azure/event-processor-host (? seconds)
|
||||
@azure/identity (? seconds)
|
||||
@azure/keyvault-certificates (? seconds)
|
||||
@azure/keyvault-keys (? seconds)
|
||||
@azure/keyvault-secrets (? seconds)
|
||||
@azure/storage-blob (? seconds)
|
||||
@azure/storage-datalake (? seconds)
|
||||
@azure/storage-file (? seconds)
|
||||
@azure/storage-queue (? seconds)
|
||||
@azure/template (? seconds)
|
||||
testhub (? seconds)
|
||||
================================
|
||||
|
||||
SUCCESS WITH WARNINGS (1)
|
||||
================================
|
||||
@azure/service-bus (? seconds)
|
||||
Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md
|
||||
================================
|
||||
|
||||
BLOCKED (1)
|
||||
================================
|
||||
@azure/event-hubs
|
||||
================================
|
||||
|
||||
FAILURE (1)
|
||||
================================
|
||||
@azure/core-amqp (? seconds)
|
||||
>>> @azure/core-amqp
|
||||
tsc -p . && rollup -c 2>&1
|
||||
src/errors.ts(586,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'typeof ConditionErrorNameMapper'.
|
||||
src/errors.ts(607,34): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'typeof SystemErrorConditionMapper'.
|
||||
src/errors.ts(608,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'typeof ConditionErrorNameMapper'.
|
||||
================================
|
||||
|
||||
|
||||
Error: Project(s) failed to build
|
||||
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.
|
||||
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]!
|
||||
[@azure/core-amqp] Returned error code: 2
|
418
tests/baselines/reference/docker/office-ui-fabric.log
Normal file
418
tests/baselines/reference/docker/office-ui-fabric.log
Normal file
|
@ -0,0 +1,418 @@
|
|||
Exit Code: 1
|
||||
Standard output:
|
||||
|
||||
|
||||
Rush Multi-Project Build Tool 5.6.0 - https://rushjs.io
|
||||
|
||||
|
||||
Starting "rush rebuild"
|
||||
|
||||
Executing a maximum of 1 simultaneous processes...
|
||||
|
||||
[@uifabric/prettier-rules] started
|
||||
XX of XX: [@uifabric/prettier-rules] completed successfully in ? seconds
|
||||
[@uifabric/tslint-rules] started
|
||||
XX of XX: [@uifabric/tslint-rules] completed successfully in ? seconds
|
||||
[@uifabric/codepen-loader] started
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
[@uifabric/build] started
|
||||
XX of XX: [@uifabric/build] completed successfully in ? seconds
|
||||
[@uifabric/migration] started
|
||||
XX of XX: [@uifabric/migration] completed successfully in ? seconds
|
||||
[@uifabric/set-version] started
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
[@uifabric/merge-styles] started
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
[@uifabric/jest-serializer-merge-styles] started
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
[@uifabric/test-utilities] started
|
||||
XX of XX: [@uifabric/test-utilities] completed successfully in ? seconds
|
||||
[@uifabric/utilities] started
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
[@uifabric/styling] started
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
[@uifabric/file-type-icons] started
|
||||
XX of XX: [@uifabric/file-type-icons] completed successfully in ? seconds
|
||||
[@uifabric/foundation] started
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
● createFactory › passes componentProps without userProps
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:205:73)
|
||||
|
||||
● createFactory › passes userProp string as child
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:210:76)
|
||||
|
||||
● createFactory › passes userProp integer as child
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:220:76)
|
||||
|
||||
● createFactory › passes userProp string as defaultProp
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:225:92)
|
||||
|
||||
● createFactory › passes userProp integer as defaultProp
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:235:92)
|
||||
|
||||
● createFactory › merges userProps over componentProps
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:245:84)
|
||||
|
||||
● createFactory › renders div and userProp integer as children
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:255:86)
|
||||
|
||||
● createFactory › renders div and userProp string as children
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:266:86)
|
||||
|
||||
● createFactory › renders userProp span function without component props
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:288:61)
|
||||
|
||||
● createFactory › renders userProp span function with component props
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:301:61)
|
||||
|
||||
● createFactory › renders userProp span component with component props
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:314:61)
|
||||
|
||||
● createFactory › passes props and type arguments to userProp function
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at Object.<anonymous> (src/slots.test.tsx:334:43)
|
||||
|
||||
● getSlots › creates slots and passes merged props to them
|
||||
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at _renderSlot (src/slots.tsx:221:100)
|
||||
at Object.slot [as testSlot1] (src/slots.tsx:142:16)
|
||||
at Object.<anonymous> (src/slots.test.tsx:399:24)
|
||||
|
||||
[XX:XX:XX XM] x Error detected while running 'jest'
|
||||
[XX:XX:XX XM] x ------------------------------------
|
||||
[XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node /office-ui-fabric-react/common/temp/node_modules/jest/bin/jest.js --config /office-ui-fabric-react/packages/foundation/jest.config.js --passWithNoTests --colors
|
||||
at ChildProcess.<anonymous> (/office-ui-fabric-react/common/temp/node_modules/.registry.npmjs.org/just-scripts-utils/0.8.1/node_modules/just-scripts-utils/lib/exec.js:70:31)
|
||||
at ChildProcess.emit (events.js:200:13)
|
||||
at ChildProcess.EventEmitter.emit (domain.js:494:23)
|
||||
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
|
||||
[XX:XX:XX XM] x ------------------------------------
|
||||
[XX:XX:XX XM] x finished 'validate' in ?s with errors
|
||||
[XX:XX:XX XM] x finished 'build' in ?s with errors
|
||||
[XX:XX:XX XM] x Error previously detected. See above for error messages.
|
||||
[@uifabric/icons] started
|
||||
XX of XX: [@uifabric/icons] completed successfully in ? seconds
|
||||
[@uifabric/webpack-utils] started
|
||||
XX of XX: [@uifabric/webpack-utils] completed successfully in ? seconds
|
||||
|
||||
SUCCESS (8)
|
||||
================================
|
||||
@uifabric/build (? seconds)
|
||||
@uifabric/file-type-icons (? seconds)
|
||||
@uifabric/icons (? seconds)
|
||||
@uifabric/migration (? seconds)
|
||||
@uifabric/prettier-rules (? seconds)
|
||||
@uifabric/test-utilities (? seconds)
|
||||
@uifabric/tslint-rules (? seconds)
|
||||
@uifabric/webpack-utils (? seconds)
|
||||
================================
|
||||
|
||||
SUCCESS WITH WARNINGS (6)
|
||||
================================
|
||||
@uifabric/codepen-loader (? seconds)
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
|
||||
@uifabric/jest-serializer-merge-styles (? seconds)
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
|
||||
@uifabric/merge-styles (? seconds)
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
|
||||
@uifabric/set-version (? seconds)
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
|
||||
@uifabric/styling (? seconds)
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
|
||||
@uifabric/utilities (? seconds)
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
================================
|
||||
|
||||
BLOCKED (26)
|
||||
================================
|
||||
@uifabric/api-docs
|
||||
@uifabric/azure-themes
|
||||
@uifabric/charting
|
||||
@uifabric/date-time
|
||||
@uifabric/example-app-base
|
||||
@uifabric/experiments
|
||||
@uifabric/fabric-website
|
||||
@uifabric/fabric-website-resources
|
||||
@uifabric/fluent-theme
|
||||
@uifabric/foundation-scenarios
|
||||
@uifabric/lists
|
||||
@uifabric/pr-deploy-site
|
||||
@uifabric/react-cards
|
||||
@uifabric/theme-samples
|
||||
@uifabric/tsx-editor
|
||||
@uifabric/variants
|
||||
a11y-tests
|
||||
dom-tests
|
||||
office-ui-fabric-react
|
||||
perf-test
|
||||
server-rendered-app
|
||||
ssr-tests
|
||||
test-bundles
|
||||
theming-designer
|
||||
todo-app
|
||||
vr-tests
|
||||
================================
|
||||
|
||||
FAILURE (1)
|
||||
================================
|
||||
@uifabric/foundation (? seconds)
|
||||
ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
|
||||
● createFactory › passes componentProps without userProps
|
||||
RangeError: Invalid array length
|
||||
|
||||
189 | for (const props of allProps) {
|
||||
190 | classNames.push(props && props.className);
|
||||
> 191 | assign(finalProps, ...(props as any));
|
||||
| ^
|
||||
192 | }
|
||||
193 |
|
||||
[...179 lines omitted...]
|
||||
193 |
|
||||
194 | finalProps.className = mergeStyles(defaultStyles, classNames);
|
||||
|
||||
at Object.__spreadArrays (../../common/temp/node_modules/.registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:182:22)
|
||||
at _constructFinalProps (src/slots.tsx:191:11)
|
||||
at result (src/slots.tsx:88:24)
|
||||
at _renderSlot (src/slots.tsx:221:100)
|
||||
at Object.slot [as testSlot1] (src/slots.tsx:142:16)
|
||||
at Object.<anonymous> (src/slots.test.tsx:399:24)
|
||||
[XX:XX:XX XM] x Error detected while running 'jest'
|
||||
[XX:XX:XX XM] x ------------------------------------
|
||||
[XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node /office-ui-fabric-react/common/temp/node_modules/jest/bin/jest.js --config /office-ui-fabric-react/packages/foundation/jest.config.js --passWithNoTests --colors
|
||||
at ChildProcess.<anonymous> (/office-ui-fabric-react/common/temp/node_modules/.registry.npmjs.org/just-scripts-utils/0.8.1/node_modules/just-scripts-utils/lib/exec.js:70:31)
|
||||
at ChildProcess.emit (events.js:200:13)
|
||||
at ChildProcess.EventEmitter.emit (domain.js:494:23)
|
||||
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
|
||||
[XX:XX:XX XM] x ------------------------------------
|
||||
[XX:XX:XX XM] x finished 'validate' in ?s with errors
|
||||
[XX:XX:XX XM] x finished 'build' in ?s with errors
|
||||
[XX:XX:XX XM] x Error previously detected. See above for error messages.
|
||||
================================
|
||||
|
||||
|
||||
Error: Project(s) failed to build
|
||||
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.
|
||||
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
|
||||
XX of XX: [@uifabric/jest-serializer-merge-styles] completed with warnings in ? seconds
|
||||
XX of XX: [@uifabric/utilities] completed with warnings in ? seconds
|
||||
XX of XX: [@uifabric/styling] completed with warnings in ? seconds
|
||||
|
||||
XX of XX: [@uifabric/foundation] failed to build!
|
||||
XX of XX: [@uifabric/experiments] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/fabric-website] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/pr-deploy-site] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/react-cards] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [theming-designer] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [vr-tests] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [dom-tests] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [perf-test] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [test-bundles] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [office-ui-fabric-react] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/api-docs] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/fabric-website-resources] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [a11y-tests] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [ssr-tests] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/azure-themes] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/charting] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/date-time] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/example-app-base] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/foundation-scenarios] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/lists] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/fluent-theme] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/tsx-editor] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/theme-samples] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [@uifabric/variants] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [server-rendered-app] blocked by [@uifabric/foundation]!
|
||||
XX of XX: [todo-app] blocked by [@uifabric/foundation]!
|
||||
[@uifabric/foundation] Returned error code: 1
|
|
@ -8,7 +8,7 @@ tests/cases/compiler/functionCall11.ts(6,15): error TS2554: Expected 1-2 argumen
|
|||
foo('foo', 1);
|
||||
foo('foo');
|
||||
foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1-2 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionCall11.ts:1:14: An argument for 'a' was not provided.
|
||||
foo(1, 'bar');
|
||||
|
|
|
@ -8,7 +8,7 @@ tests/cases/compiler/functionCall12.ts(7,15): error TS2345: Argument of type '3'
|
|||
foo('foo', 1);
|
||||
foo('foo');
|
||||
foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1-3 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionCall12.ts:1:14: An argument for 'a' was not provided.
|
||||
foo(1, 'bar');
|
||||
|
|
|
@ -7,7 +7,7 @@ tests/cases/compiler/functionCall13.ts(5,5): error TS2345: Argument of type '1'
|
|||
foo('foo', 1);
|
||||
foo('foo');
|
||||
foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2555: Expected at least 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionCall13.ts:1:14: An argument for 'a' was not provided.
|
||||
foo(1, 'bar');
|
||||
|
|
|
@ -11,7 +11,7 @@ tests/cases/compiler/functionCall16.ts(6,5): error TS2345: Argument of type '1'
|
|||
foo('foo');
|
||||
foo('foo', 'bar');
|
||||
foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2555: Expected at least 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionCall16.ts:1:14: An argument for 'a' was not provided.
|
||||
foo(1, 'bar');
|
||||
|
|
|
@ -11,7 +11,7 @@ tests/cases/compiler/functionCall17.ts(6,12): error TS2345: Argument of type '1'
|
|||
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'string'.
|
||||
foo('foo');
|
||||
foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2555: Expected at least 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionCall17.ts:1:14: An argument for 'a' was not provided.
|
||||
foo(1, 'bar');
|
||||
|
|
|
@ -6,7 +6,7 @@ tests/cases/compiler/functionCall18.ts(4,1): error TS2554: Expected 2 arguments,
|
|||
declare function foo<T>(a: T, b: T);
|
||||
declare function foo(a: {});
|
||||
foo<string>("hello");
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 2 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/compiler/functionCall18.ts:2:31: An argument for 'b' was not provided.
|
||||
|
|
@ -13,7 +13,7 @@ tests/cases/compiler/functionCall6.ts(5,1): error TS2554: Expected 1 arguments,
|
|||
~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 2.
|
||||
foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionCall6.ts:1:14: An argument for 'a' was not provided.
|
||||
|
|
@ -15,7 +15,7 @@ tests/cases/compiler/functionCall7.ts(7,1): error TS2554: Expected 1 arguments,
|
|||
~
|
||||
!!! error TS2345: Argument of type '4' is not assignable to parameter of type 'c1'.
|
||||
foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionCall7.ts:2:14: An argument for 'a' was not provided.
|
||||
|
|
@ -6,7 +6,7 @@ tests/cases/compiler/functionOverloads29.ts(4,9): error TS2554: Expected 1 argum
|
|||
function foo(bar:number):number;
|
||||
function foo(bar:any):any{ return bar }
|
||||
var x = foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionOverloads29.ts:1:14: An argument for 'bar' was not provided.
|
||||
|
|
@ -6,7 +6,7 @@ tests/cases/compiler/functionOverloads34.ts(4,9): error TS2554: Expected 1 argum
|
|||
function foo(bar:{a:boolean;}):number;
|
||||
function foo(bar:{a:any;}):any{ return bar }
|
||||
var x = foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionOverloads34.ts:1:14: An argument for 'bar' was not provided.
|
||||
|
|
@ -6,7 +6,7 @@ tests/cases/compiler/functionOverloads37.ts(4,9): error TS2554: Expected 1 argum
|
|||
function foo(bar:{a:boolean;}[]):number;
|
||||
function foo(bar:{a:any;}[]):any{ return bar }
|
||||
var x = foo();
|
||||
~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionOverloads37.ts:1:14: An argument for 'bar' was not provided.
|
||||
|
|
@ -11,11 +11,11 @@ tests/cases/compiler/functionParameterArityMismatch.ts(14,22): error TS2554: Exp
|
|||
declare function f1(a: number);
|
||||
declare function f1(a: number, b: number, c: number);
|
||||
f1();
|
||||
~~~~
|
||||
~~
|
||||
!!! error TS2554: Expected 1-3 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/functionParameterArityMismatch.ts:1:21: An argument for 'a' was not provided.
|
||||
f1(1, 2);
|
||||
~~~~~~~~
|
||||
~~
|
||||
!!! error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 3 arguments.
|
||||
f1(1, 2, 3, 4);
|
||||
~
|
||||
|
@ -26,13 +26,13 @@ tests/cases/compiler/functionParameterArityMismatch.ts(14,22): error TS2554: Exp
|
|||
declare function f2(a: number, b: number, c: number, d: number);
|
||||
declare function f2(a: number, b: number, c: number, d: number, e: number, f: number);
|
||||
f2(1);
|
||||
~~~~~
|
||||
~~
|
||||
!!! error TS2575: No overload expects 1 arguments, but overloads do exist that expect either 0 or 2 arguments.
|
||||
f2(1, 2, 3);
|
||||
~~~~~~~~~~~
|
||||
~~
|
||||
!!! error TS2575: No overload expects 3 arguments, but overloads do exist that expect either 2 or 4 arguments.
|
||||
f2(1, 2, 3, 4, 5);
|
||||
~~~~~~~~~~~~~~~~~
|
||||
~~
|
||||
!!! error TS2575: No overload expects 5 arguments, but overloads do exist that expect either 4 or 6 arguments.
|
||||
f2(1, 2, 3, 4, 5, 6, 7);
|
||||
~
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/genericFunctionsWithOptionalParameters2.ts(7,1): error TS2554: Expected 1-3 arguments, but got 0.
|
||||
tests/cases/compiler/genericFunctionsWithOptionalParameters2.ts(7,7): error TS2554: Expected 1-3 arguments, but got 0.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericFunctionsWithOptionalParameters2.ts (1 errors) ====
|
||||
|
@ -9,7 +9,7 @@ tests/cases/compiler/genericFunctionsWithOptionalParameters2.ts(7,1): error TS25
|
|||
var utils: Utils;
|
||||
|
||||
utils.fold(); // error
|
||||
~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 1-3 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/genericFunctionsWithOptionalParameters2.ts:2:15: An argument for 'c' was not provided.
|
||||
utils.fold(null); // no error
|
||||
|
|
|
@ -10,7 +10,7 @@ tests/cases/conformance/types/rest/genericRestArity.ts(8,45): error TS2554: Expe
|
|||
...args: TS): void;
|
||||
|
||||
call((x: number, y: number) => x + y);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/conformance/types/rest/genericRestArity.ts:5:5: An argument for 'args' was not provided.
|
||||
call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7);
|
||||
|
|
|
@ -10,7 +10,7 @@ tests/cases/conformance/types/rest/genericRestArityStrict.ts(8,45): error TS2554
|
|||
...args: TS): void;
|
||||
|
||||
call((x: number, y: number) => x + y);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/conformance/types/rest/genericRestArityStrict.ts:5:5: An argument for 'args' was not provided.
|
||||
call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7);
|
||||
|
|
|
@ -87,7 +87,7 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345
|
|||
declare function foo<T extends any[]>(cb: (...args: T) => void): void;
|
||||
|
||||
foo<CoolArray<any>>(); // Error
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/types/rest/genericRestParameters3.ts:27:39: An argument for 'cb' was not provided.
|
||||
foo<CoolArray<any>>(100); // Error
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(9,24): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
|
||||
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(9,32): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
|
||||
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(10,27): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
|
||||
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(11,27): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
|
||||
|
||||
|
||||
==== tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts (4 errors) ====
|
||||
class A {
|
||||
private a: number;
|
||||
}
|
||||
|
||||
class B {
|
||||
private a: string;
|
||||
}
|
||||
|
||||
type X<T extends A> = [T["a"], (T | B)["a"]];
|
||||
~~~~~~
|
||||
!!! error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
|
||||
type Y<T extends A | B> = T["a"];
|
||||
~~~~~~
|
||||
!!! error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
|
||||
type Z<T extends A & B> = T["a"];
|
||||
~~~~~~
|
||||
!!! error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
//// [indexedAccessPrivateMemberOfGenericConstraint.ts]
|
||||
class A {
|
||||
private a: number;
|
||||
}
|
||||
|
||||
class B {
|
||||
private a: string;
|
||||
}
|
||||
|
||||
type X<T extends A> = [T["a"], (T | B)["a"]];
|
||||
type Y<T extends A | B> = T["a"];
|
||||
type Z<T extends A & B> = T["a"];
|
||||
|
||||
|
||||
//// [indexedAccessPrivateMemberOfGenericConstraint.js]
|
||||
var A = /** @class */ (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
var B = /** @class */ (function () {
|
||||
function B() {
|
||||
}
|
||||
return B;
|
||||
}());
|
|
@ -0,0 +1,37 @@
|
|||
=== tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts ===
|
||||
class A {
|
||||
>A : Symbol(A, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 0, 0))
|
||||
|
||||
private a: number;
|
||||
>a : Symbol(A.a, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 0, 9))
|
||||
}
|
||||
|
||||
class B {
|
||||
>B : Symbol(B, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 2, 1))
|
||||
|
||||
private a: string;
|
||||
>a : Symbol(B.a, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 4, 9))
|
||||
}
|
||||
|
||||
type X<T extends A> = [T["a"], (T | B)["a"]];
|
||||
>X : Symbol(X, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 6, 1))
|
||||
>T : Symbol(T, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 8, 7))
|
||||
>A : Symbol(A, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 8, 7))
|
||||
>T : Symbol(T, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 8, 7))
|
||||
>B : Symbol(B, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 2, 1))
|
||||
|
||||
type Y<T extends A | B> = T["a"];
|
||||
>Y : Symbol(Y, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 8, 45))
|
||||
>T : Symbol(T, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 9, 7))
|
||||
>A : Symbol(A, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 2, 1))
|
||||
>T : Symbol(T, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 9, 7))
|
||||
|
||||
type Z<T extends A & B> = T["a"];
|
||||
>Z : Symbol(Z, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 9, 33))
|
||||
>T : Symbol(T, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 10, 7))
|
||||
>A : Symbol(A, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 2, 1))
|
||||
>T : Symbol(T, Decl(indexedAccessPrivateMemberOfGenericConstraint.ts, 10, 7))
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
=== tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts ===
|
||||
class A {
|
||||
>A : A
|
||||
|
||||
private a: number;
|
||||
>a : number
|
||||
}
|
||||
|
||||
class B {
|
||||
>B : B
|
||||
|
||||
private a: string;
|
||||
>a : string
|
||||
}
|
||||
|
||||
type X<T extends A> = [T["a"], (T | B)["a"]];
|
||||
>X : [T["a"], (B | T)["a"]]
|
||||
|
||||
type Y<T extends A | B> = T["a"];
|
||||
>Y : T["a"]
|
||||
|
||||
type Z<T extends A & B> = T["a"];
|
||||
>Z : T["a"]
|
||||
|
|
@ -4,5 +4,5 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern25.ts(2,1): error
|
|||
==== tests/cases/conformance/es6/destructuring/iterableArrayPattern25.ts (1 errors) ====
|
||||
function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]) { }
|
||||
takeFirstTwoEntries(new Map([["", 0], ["hello", 1]]));
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 2 arguments, but got 1.
|
|
@ -14,15 +14,15 @@ tests/cases/compiler/bar.ts(3,1): error TS2554: Expected 3 arguments, but got 2.
|
|||
|
||||
==== tests/cases/compiler/bar.ts (3 errors) ====
|
||||
f(); // Error
|
||||
~~~
|
||||
~
|
||||
!!! error TS2554: Expected 3 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/foo.js:6:12: An argument for 'a' was not provided.
|
||||
f(1); // Error
|
||||
~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 3 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/compiler/foo.js:6:15: An argument for 'b' was not provided.
|
||||
f(1, 2); // Error
|
||||
~~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
!!! related TS6210 tests/cases/compiler/foo.js:6:18: An argument for 'c' was not provided.
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@ tests/cases/conformance/jsdoc/a.js(13,1): error TS2554: Expected 1 arguments, bu
|
|||
}
|
||||
|
||||
f() // should error
|
||||
~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/jsdoc/a.js:1:21: An argument for '0' was not provided.
|
||||
g() // should error
|
||||
~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/jsdoc/a.js:5:12: An argument for 's' was not provided.
|
||||
h()
|
||||
~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/jsdoc/a.js:8:12: An argument for 's' was not provided.
|
||||
|
|
@ -8,8 +8,7 @@
|
|||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "bin"
|
||||
},
|
||||
"exclude": [ "node_modules" ]
|
||||
}
|
||||
}
|
||||
==== /index.ts (1 errors) ====
|
||||
/// <reference path="/typings/index.d.ts" />
|
||||
|
|
16
tests/baselines/reference/methodChainError.errors.txt
Normal file
16
tests/baselines/reference/methodChainError.errors.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
tests/cases/compiler/methodChainError.ts(9,6): error TS2554: Expected 1 arguments, but got 0.
|
||||
|
||||
|
||||
==== tests/cases/compiler/methodChainError.ts (1 errors) ====
|
||||
class Builder {
|
||||
method(param: string): Builder {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
new Builder()
|
||||
.method("a")
|
||||
.method();
|
||||
~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/methodChainError.ts:2:12: An argument for 'param' was not provided.
|
23
tests/baselines/reference/methodChainError.js
Normal file
23
tests/baselines/reference/methodChainError.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
//// [methodChainError.ts]
|
||||
class Builder {
|
||||
method(param: string): Builder {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
new Builder()
|
||||
.method("a")
|
||||
.method();
|
||||
|
||||
//// [methodChainError.js]
|
||||
var Builder = /** @class */ (function () {
|
||||
function Builder() {
|
||||
}
|
||||
Builder.prototype.method = function (param) {
|
||||
return this;
|
||||
};
|
||||
return Builder;
|
||||
}());
|
||||
new Builder()
|
||||
.method("a")
|
||||
.method();
|
25
tests/baselines/reference/methodChainError.symbols
Normal file
25
tests/baselines/reference/methodChainError.symbols
Normal file
|
@ -0,0 +1,25 @@
|
|||
=== tests/cases/compiler/methodChainError.ts ===
|
||||
class Builder {
|
||||
>Builder : Symbol(Builder, Decl(methodChainError.ts, 0, 0))
|
||||
|
||||
method(param: string): Builder {
|
||||
>method : Symbol(Builder.method, Decl(methodChainError.ts, 0, 15))
|
||||
>param : Symbol(param, Decl(methodChainError.ts, 1, 11))
|
||||
>Builder : Symbol(Builder, Decl(methodChainError.ts, 0, 0))
|
||||
|
||||
return this;
|
||||
>this : Symbol(Builder, Decl(methodChainError.ts, 0, 0))
|
||||
}
|
||||
}
|
||||
|
||||
new Builder()
|
||||
>new Builder() .method("a") .method : Symbol(Builder.method, Decl(methodChainError.ts, 0, 15))
|
||||
>new Builder() .method : Symbol(Builder.method, Decl(methodChainError.ts, 0, 15))
|
||||
>Builder : Symbol(Builder, Decl(methodChainError.ts, 0, 0))
|
||||
|
||||
.method("a")
|
||||
>method : Symbol(Builder.method, Decl(methodChainError.ts, 0, 15))
|
||||
|
||||
.method();
|
||||
>method : Symbol(Builder.method, Decl(methodChainError.ts, 0, 15))
|
||||
|
28
tests/baselines/reference/methodChainError.types
Normal file
28
tests/baselines/reference/methodChainError.types
Normal file
|
@ -0,0 +1,28 @@
|
|||
=== tests/cases/compiler/methodChainError.ts ===
|
||||
class Builder {
|
||||
>Builder : Builder
|
||||
|
||||
method(param: string): Builder {
|
||||
>method : (param: string) => Builder
|
||||
>param : string
|
||||
|
||||
return this;
|
||||
>this : this
|
||||
}
|
||||
}
|
||||
|
||||
new Builder()
|
||||
>new Builder() .method("a") .method() : Builder
|
||||
>new Builder() .method("a") .method : (param: string) => Builder
|
||||
>new Builder() .method("a") : Builder
|
||||
>new Builder() .method : (param: string) => Builder
|
||||
>new Builder() : Builder
|
||||
>Builder : typeof Builder
|
||||
|
||||
.method("a")
|
||||
>method : (param: string) => Builder
|
||||
>"a" : "a"
|
||||
|
||||
.method();
|
||||
>method : (param: string) => Builder
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/salsa/a.js(4,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/salsa/a.js(4,6): error TS2554: Expected 1 arguments, but got 0.
|
||||
|
||||
|
||||
==== tests/cases/conformance/salsa/a.js (1 errors) ====
|
||||
|
@ -6,7 +6,7 @@ tests/cases/conformance/salsa/a.js(4,1): error TS2554: Expected 1 arguments, but
|
|||
var mod1 = require('./mod1')
|
||||
mod1()
|
||||
mod1.f() // error, not enough arguments
|
||||
~~~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 /.src/tests/cases/conformance/salsa/mod1.js:4:30: An argument for 'a' was not provided.
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts
|
|||
Type 'string' is not assignable to type 'undefined'.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(18,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ a: number; b: number; } | { a: string; b?: undefined; } | { a?: undefined; b?: undefined; }'.
|
||||
Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: number; }'.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(48,20): error TS2322: Type '2' is not assignable to type '1'.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(49,14): error TS2322: Type '2' is not assignable to type '1'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts (5 errors) ====
|
||||
==== tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts (7 errors) ====
|
||||
// Object literals in unions are normalized upon widening
|
||||
let a1 = [{ a: 0 }, { a: 1, b: "x" }, { a: 2, b: "y", c: true }][0];
|
||||
a1.a; // number
|
||||
|
@ -78,5 +80,11 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts
|
|||
let e1 = f({ a: 1, b: 2 }, { a: "abc" }, {});
|
||||
let e2 = f({}, { a: "abc" }, { a: 1, b: 2 });
|
||||
let e3 = f(data, { a: 2 });
|
||||
~
|
||||
!!! error TS2322: Type '2' is not assignable to type '1'.
|
||||
!!! related TS6500 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:43:21: The expected type comes from property 'a' which is declared here on type '{ a: 1; b: "abc"; c: true; }'
|
||||
let e4 = f({ a: 2 }, data);
|
||||
~
|
||||
!!! error TS2322: Type '2' is not assignable to type '1'.
|
||||
!!! related TS6500 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:43:21: The expected type comes from property 'a' which is declared here on type '{ a: 1; b: "abc"; c: true; }'
|
||||
|
|
@ -227,9 +227,5 @@ declare let e2: {
|
|||
a: number;
|
||||
b: number;
|
||||
};
|
||||
declare let e3: {
|
||||
a: number;
|
||||
};
|
||||
declare let e4: {
|
||||
a: number;
|
||||
};
|
||||
declare let e3: any;
|
||||
declare let e4: any;
|
||||
|
|
|
@ -304,8 +304,8 @@ let e2 = f({}, { a: "abc" }, { a: 1, b: 2 });
|
|||
>2 : 2
|
||||
|
||||
let e3 = f(data, { a: 2 });
|
||||
>e3 : { a: number; }
|
||||
>f(data, { a: 2 }) : { a: number; }
|
||||
>e3 : any
|
||||
>f(data, { a: 2 }) : any
|
||||
>f : <T>(...items: T[]) => T
|
||||
>data : { a: 1; b: "abc"; c: true; }
|
||||
>{ a: 2 } : { a: number; }
|
||||
|
@ -313,8 +313,8 @@ let e3 = f(data, { a: 2 });
|
|||
>2 : 2
|
||||
|
||||
let e4 = f({ a: 2 }, data);
|
||||
>e4 : { a: number; }
|
||||
>f({ a: 2 }, data) : { a: number; }
|
||||
>e4 : any
|
||||
>f({ a: 2 }, data) : any
|
||||
>f : <T>(...items: T[]) => T
|
||||
>{ a: 2 } : { a: number; }
|
||||
>a : number
|
||||
|
|
|
@ -4,8 +4,8 @@ tests/cases/compiler/optionalParamArgsTest.ts(98,11): error TS2554: Expected 0 a
|
|||
tests/cases/compiler/optionalParamArgsTest.ts(99,11): error TS2554: Expected 0 arguments, but got 1.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(100,4): error TS2554: Expected 0 arguments, but got 1.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(101,4): error TS2554: Expected 0 arguments, but got 1.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(102,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(103,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(102,6): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(103,6): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(104,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(105,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(106,13): error TS2554: Expected 1 arguments, but got 2.
|
||||
|
@ -16,8 +16,8 @@ tests/cases/compiler/optionalParamArgsTest.ts(110,15): error TS2554: Expected 0-
|
|||
tests/cases/compiler/optionalParamArgsTest.ts(111,15): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(112,8): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(113,8): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(114,1): error TS2554: Expected 1-2 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(115,1): error TS2554: Expected 1-2 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(114,6): error TS2554: Expected 1-2 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(115,6): error TS2554: Expected 1-2 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(116,1): error TS2554: Expected 1-2 arguments, but got 0.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(117,1): error TS2554: Expected 1-2 arguments, but got 0.
|
||||
|
||||
|
@ -137,19 +137,19 @@ tests/cases/compiler/optionalParamArgsTest.ts(117,1): error TS2554: Expected 1-2
|
|||
~
|
||||
!!! error TS2554: Expected 0 arguments, but got 1.
|
||||
c1o1.C1M2();
|
||||
~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/optionalParamArgsTest.ts:23:17: An argument for 'C1M2A1' was not provided.
|
||||
i1o1.C1M2();
|
||||
~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/optionalParamArgsTest.ts:11:10: An argument for 'C1M2A1' was not provided.
|
||||
F2();
|
||||
~~~~
|
||||
~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/optionalParamArgsTest.ts:45:13: An argument for 'F2A1' was not provided.
|
||||
L2();
|
||||
~~~~
|
||||
~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/optionalParamArgsTest.ts:50:20: An argument for 'L2A1' was not provided.
|
||||
c1o1.C1M2(1,2);
|
||||
|
@ -177,19 +177,19 @@ tests/cases/compiler/optionalParamArgsTest.ts(117,1): error TS2554: Expected 1-2
|
|||
~
|
||||
!!! error TS2554: Expected 0-2 arguments, but got 3.
|
||||
c1o1.C1M4();
|
||||
~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 1-2 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/optionalParamArgsTest.ts:29:17: An argument for 'C1M4A1' was not provided.
|
||||
i1o1.C1M4();
|
||||
~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 1-2 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/optionalParamArgsTest.ts:13:10: An argument for 'C1M4A1' was not provided.
|
||||
F4();
|
||||
~~~~
|
||||
~~
|
||||
!!! error TS2554: Expected 1-2 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/optionalParamArgsTest.ts:47:13: An argument for 'F4A1' was not provided.
|
||||
L4();
|
||||
~~~~
|
||||
~~
|
||||
!!! error TS2554: Expected 1-2 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/optionalParamArgsTest.ts:52:20: An argument for 'L4A1' was not provided.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
tests/cases/compiler/overload1.ts(27,5): error TS2322: Type 'C' is not assignable to type 'string'.
|
||||
tests/cases/compiler/overload1.ts(29,1): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/overload1.ts(31,11): error TS2554: Expected 1-2 arguments, but got 3.
|
||||
tests/cases/compiler/overload1.ts(32,3): error TS2554: Expected 1-2 arguments, but got 0.
|
||||
tests/cases/compiler/overload1.ts(32,5): error TS2554: Expected 1-2 arguments, but got 0.
|
||||
tests/cases/compiler/overload1.ts(33,1): error TS2322: Type 'C' is not assignable to type 'string'.
|
||||
tests/cases/compiler/overload1.ts(34,3): error TS2755: No suitable overload for this call.
|
||||
|
||||
|
@ -45,7 +45,7 @@ tests/cases/compiler/overload1.ts(34,3): error TS2755: No suitable overload for
|
|||
~
|
||||
!!! error TS2554: Expected 1-2 arguments, but got 3.
|
||||
z=x.g(); // no match
|
||||
~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1-2 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/overload1.ts:17:11: An argument for 'n' was not provided.
|
||||
z=x.g(new O.B()); // ambiguous (up and down conversion)
|
||||
|
|
|
@ -17,7 +17,7 @@ tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts(9,1): error TS2554:
|
|||
|
||||
declare function f<A, B = {}>(arg: number): void;
|
||||
f<number>(); // wrong number of arguments (#25683)
|
||||
~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts:8:31: An argument for 'arg' was not provided.
|
||||
|
|
@ -14,7 +14,7 @@ tests/cases/compiler/requiredInitializedParameter1.ts(16,1): error TS2554: Expec
|
|||
f4(0, 1, 2);
|
||||
|
||||
f1(0, 1);
|
||||
~~~~~~~~
|
||||
~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
!!! related TS6210 tests/cases/compiler/requiredInitializedParameter1.ts:1:23: An argument for 'c' was not provided.
|
||||
f2(0, 1);
|
||||
|
@ -22,7 +22,7 @@ tests/cases/compiler/requiredInitializedParameter1.ts(16,1): error TS2554: Expec
|
|||
f4(0, 1);
|
||||
|
||||
f1(0);
|
||||
~~~~~
|
||||
~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/compiler/requiredInitializedParameter1.ts:1:16: An argument for 'b' was not provided.
|
||||
f2(0);
|
||||
|
|
|
@ -6,7 +6,7 @@ tests/cases/compiler/restParamsWithNonRestParams.ts(4,1): error TS2555: Expected
|
|||
foo(); // ok
|
||||
function foo2(a:string, ...b:number[]){}
|
||||
foo2(); // should be an error
|
||||
~~~~~~
|
||||
~~~~
|
||||
!!! error TS2555: Expected at least 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/compiler/restParamsWithNonRestParams.ts:3:15: An argument for 'a' was not provided.
|
||||
function foo3(a?:string, ...b:number[]){}
|
||||
|
|
|
@ -10,6 +10,6 @@ tests/cases/compiler/spreadOfParamsFromGeneratorMakesRequiredParams.ts(6,1): err
|
|||
): any;
|
||||
|
||||
call(function* (a: 'a') { }); // error, 2nd argument required
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 2 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/compiler/spreadOfParamsFromGeneratorMakesRequiredParams.ts:3:5: An argument for 'args' was not provided.
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/conformance/functions/strictBindCallApply1.ts(11,11): error TS2755: No suitable overload for this call.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(17,11): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(17,15): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(18,35): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(19,44): error TS2554: Expected 3 arguments, but got 4.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(22,32): error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'.
|
||||
|
@ -10,7 +10,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(24,32): error TS2345:
|
|||
Type '3' is not assignable to type '2'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(41,11): error TS2755: No suitable overload for this call.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(42,11): error TS2755: No suitable overload for this call.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(48,11): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(48,17): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(49,29): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(50,38): error TS2554: Expected 3 arguments, but got 4.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(51,22): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
|
||||
|
@ -19,7 +19,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(55,31): error TS2322:
|
|||
tests/cases/conformance/functions/strictBindCallApply1.ts(56,26): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(57,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(62,11): error TS2755: No suitable overload for this call.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(65,1): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(65,3): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(66,15): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(67,24): error TS2554: Expected 3 arguments, but got 4.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(70,12): error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'.
|
||||
|
@ -54,7 +54,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345:
|
|||
|
||||
let c00 = foo.call(undefined, 10, "hello");
|
||||
let c01 = foo.call(undefined, 10); // Error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
let c02 = foo.call(undefined, 10, 20); // Error
|
||||
~~
|
||||
|
@ -118,7 +118,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345:
|
|||
|
||||
let c10 = c.foo.call(c, 10, "hello");
|
||||
let c11 = c.foo.call(c, 10); // Error
|
||||
~~~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
let c12 = c.foo.call(c, 10, 20); // Error
|
||||
~~
|
||||
|
@ -160,7 +160,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345:
|
|||
|
||||
C.call(c, 10, "hello");
|
||||
C.call(c, 10); // Error
|
||||
~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
C.call(c, 10, 20); // Error
|
||||
~~
|
||||
|
|
|
@ -10,7 +10,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(62,97): er
|
|||
Object literal may only specify known properties, and 'explicitStructural' does not exist in type '{ y: string; f: (this: { y: number; }, x: number) => number; }'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(63,110): error TS2322: Type '{ wrongName: number; explicitStructural: (this: { y: number; }, x: number) => number; }' is not assignable to type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }'.
|
||||
Object literal may only specify known properties, and 'explicitStructural' does not exist in type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(65,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(65,4): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(66,6): error TS2345: Argument of type '"wrong type"' is not assignable to parameter of type 'number'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(67,10): error TS2554: Expected 1 arguments, but got 2.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(68,1): error TS2684: The 'this' context of type '{ y: string; f: (this: { y: number; }, x: number) => number; }' is not assignable to method's 'this' of type '{ y: number; }'.
|
||||
|
@ -18,16 +18,16 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(68,1): err
|
|||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(69,1): error TS2684: The 'this' context of type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }' is not assignable to method's 'this' of type '{ y: number; }'.
|
||||
Property 'y' is missing in type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }' but required in type '{ y: number; }'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(72,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(72,3): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(73,13): error TS2345: Argument of type '"wrong type"' is not assignable to parameter of type 'number'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(74,17): error TS2554: Expected 1 arguments, but got 2.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(75,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(75,3): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(76,16): error TS2345: Argument of type '"wrong type 2"' is not assignable to parameter of type 'number'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(77,20): error TS2554: Expected 1 arguments, but got 2.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(78,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(78,3): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(79,16): error TS2345: Argument of type '"wrong type 2"' is not assignable to parameter of type 'number'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(80,20): error TS2554: Expected 1 arguments, but got 2.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(81,1): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(81,3): error TS2554: Expected 1 arguments, but got 0.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(82,20): error TS2345: Argument of type '"wrong type 3"' is not assignable to parameter of type 'number'.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(83,24): error TS2554: Expected 1 arguments, but got 2.
|
||||
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(86,5): error TS2322: Type '(this: { y: number; }, x: number) => number' is not assignable to type '(this: void, x: number) => number'.
|
||||
|
@ -182,7 +182,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e
|
|||
!!! error TS2322: Object literal may only specify known properties, and 'explicitStructural' does not exist in type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }'.
|
||||
|
||||
ok.f(); // not enough arguments
|
||||
~~~~~~
|
||||
~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:61:46: An argument for 'x' was not provided.
|
||||
ok.f('wrong type');
|
||||
|
@ -204,7 +204,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e
|
|||
|
||||
let c = new C();
|
||||
c.explicitC(); // not enough arguments
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:9:24: An argument for 'm' was not provided.
|
||||
c.explicitC('wrong type');
|
||||
|
@ -214,7 +214,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e
|
|||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 2.
|
||||
c.explicitThis(); // not enough arguments
|
||||
~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:3:30: An argument for 'm' was not provided.
|
||||
c.explicitThis('wrong type 2');
|
||||
|
@ -224,7 +224,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e
|
|||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 2.
|
||||
c.implicitThis(); // not enough arguments
|
||||
~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:6:18: An argument for 'm' was not provided.
|
||||
c.implicitThis('wrong type 2');
|
||||
|
@ -234,7 +234,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e
|
|||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 2.
|
||||
c.explicitProperty(); // not enough arguments
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 1 arguments, but got 0.
|
||||
!!! related TS6210 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:12:41: An argument for 'm' was not provided.
|
||||
c.explicitProperty('wrong type 3');
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue