mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into safeNavigation
This commit is contained in:
@@ -57,3 +57,4 @@ internal/
|
||||
!tests/cases/projects/NodeModulesSearch/**/*
|
||||
!tests/baselines/reference/project/nodeModules*/**/*
|
||||
.idea
|
||||
yarn.lock
|
||||
+6
-10
@@ -21,10 +21,6 @@ declare module "gulp-typescript" {
|
||||
import * as insert from "gulp-insert";
|
||||
import * as sourcemaps from "gulp-sourcemaps";
|
||||
import Q = require("q");
|
||||
declare global {
|
||||
// `del` further depends on `Promise` (and is also not included), so we just, patch the global scope's Promise to Q's (which we already include in our deps because gulp depends on it)
|
||||
type Promise<T> = Q.Promise<T>;
|
||||
}
|
||||
import del = require("del");
|
||||
import mkdirP = require("mkdirp");
|
||||
import minimist = require("minimist");
|
||||
@@ -394,7 +390,7 @@ gulp.task(builtLocalCompiler, false, [servicesFile], () => {
|
||||
.pipe(localCompilerProject())
|
||||
.pipe(prependCopyright())
|
||||
.pipe(sourcemaps.write("."))
|
||||
.pipe(gulp.dest("."));
|
||||
.pipe(gulp.dest("src/compiler"));
|
||||
});
|
||||
|
||||
gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => {
|
||||
@@ -426,7 +422,7 @@ gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => {
|
||||
file.path = nodeStandaloneDefinitionsFile;
|
||||
return content.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
|
||||
}))
|
||||
]).pipe(gulp.dest("."));
|
||||
]).pipe(gulp.dest("src/services"));
|
||||
});
|
||||
|
||||
// cancellationToken.js
|
||||
@@ -452,7 +448,7 @@ gulp.task(typingsInstallerJs, false, [servicesFile], () => {
|
||||
.pipe(cancellationTokenProject())
|
||||
.pipe(prependCopyright())
|
||||
.pipe(sourcemaps.write("."))
|
||||
.pipe(gulp.dest("."));
|
||||
.pipe(gulp.dest("src/server/typingsInstaller"));
|
||||
});
|
||||
|
||||
const serverFile = path.join(builtLocalDirectory, "tsserver.js");
|
||||
@@ -465,7 +461,7 @@ gulp.task(serverFile, false, [servicesFile, typingsInstallerJs, cancellationToke
|
||||
.pipe(serverProject())
|
||||
.pipe(prependCopyright())
|
||||
.pipe(sourcemaps.write("."))
|
||||
.pipe(gulp.dest("."));
|
||||
.pipe(gulp.dest("src/server"));
|
||||
});
|
||||
|
||||
const tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js");
|
||||
@@ -560,7 +556,7 @@ gulp.task(run, false, [servicesFile], () => {
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(testProject())
|
||||
.pipe(sourcemaps.write(".", { includeContent: false, sourceRoot: "../../" }))
|
||||
.pipe(gulp.dest("."));
|
||||
.pipe(gulp.dest("src/harness"));
|
||||
});
|
||||
|
||||
const internalTests = "internal/";
|
||||
@@ -782,7 +778,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
|
||||
});
|
||||
}))
|
||||
.pipe(sourcemaps.write(".", { includeContent: false }))
|
||||
.pipe(gulp.dest("."));
|
||||
.pipe(gulp.dest("src/harness"));
|
||||
});
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -587,7 +587,7 @@ var watchGuardFile = path.join(builtLocalDirectory, "watchGuard.js");
|
||||
compileFile(watchGuardFile, watchGuardSources, [builtLocalDirectory].concat(watchGuardSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { outDir: builtLocalDirectory, noOutFile: false });
|
||||
|
||||
var serverFile = path.join(builtLocalDirectory, "tsserver.js");
|
||||
compileFile(serverFile, serverSources, [builtLocalDirectory, copyright, cancellationTokenFile, typingsInstallerFile, watchGuardFile].concat(serverSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { types: ["node"], preserveConstEnums: true });
|
||||
compileFile(serverFile, serverSources, [builtLocalDirectory, copyright, cancellationTokenFile, typingsInstallerFile, watchGuardFile].concat(serverSources).concat(servicesSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { types: ["node"], preserveConstEnums: true });
|
||||
var tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js");
|
||||
var tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts");
|
||||
compileFile(
|
||||
|
||||
Vendored
+1
@@ -1742,6 +1742,7 @@ declare namespace ts.server.protocol {
|
||||
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
|
||||
insertSpaceBeforeFunctionParenthesis?: boolean;
|
||||
|
||||
@@ -670,6 +670,12 @@ namespace ts {
|
||||
case SyntaxKind.CallExpression:
|
||||
bindCallExpressionFlow(<CallExpression>node);
|
||||
break;
|
||||
case SyntaxKind.JSDocComment:
|
||||
bindJSDocComment(<JSDoc>node);
|
||||
break;
|
||||
case SyntaxKind.JSDocTypedefTag:
|
||||
bindJSDocTypedefTag(<JSDocTypedefTag>node);
|
||||
break;
|
||||
default:
|
||||
bindEachChild(node);
|
||||
break;
|
||||
@@ -1335,6 +1341,26 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function bindJSDocComment(node: JSDoc) {
|
||||
forEachChild(node, n => {
|
||||
if (n.kind !== SyntaxKind.JSDocTypedefTag) {
|
||||
bind(n);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function bindJSDocTypedefTag(node: JSDocTypedefTag) {
|
||||
forEachChild(node, n => {
|
||||
// if the node has a fullName "A.B.C", that means symbol "C" was already bound
|
||||
// when we visit "fullName"; so when we visit the name "C" as the next child of
|
||||
// the jsDocTypedefTag, we should skip binding it.
|
||||
if (node.fullName && n === node.name && node.fullName.kind !== SyntaxKind.Identifier) {
|
||||
return;
|
||||
}
|
||||
bind(n);
|
||||
});
|
||||
}
|
||||
|
||||
function bindCallExpressionFlow(node: CallExpression) {
|
||||
// If the target of the call expression is a function expression or arrow function we have
|
||||
// an immediately invoked function expression (IIFE). Initialize the flowNode property to
|
||||
@@ -1874,6 +1900,18 @@ namespace ts {
|
||||
}
|
||||
node.parent = parent;
|
||||
const saveInStrictMode = inStrictMode;
|
||||
|
||||
// Even though in the AST the jsdoc @typedef node belongs to the current node,
|
||||
// its symbol might be in the same scope with the current node's symbol. Consider:
|
||||
//
|
||||
// /** @typedef {string | number} MyType */
|
||||
// function foo();
|
||||
//
|
||||
// Here the current node is "foo", which is a container, but the scope of "MyType" should
|
||||
// not be inside "foo". Therefore we always bind @typedef before bind the parent node,
|
||||
// and skip binding this tag later when binding all the other jsdoc tags.
|
||||
bindJSDocTypedefTagIfAny(node);
|
||||
|
||||
// First we bind declaration nodes to a symbol if possible. We'll both create a symbol
|
||||
// and then potentially add the symbol to an appropriate symbol table. Possible
|
||||
// destination symbol tables are:
|
||||
@@ -1908,6 +1946,27 @@ namespace ts {
|
||||
inStrictMode = saveInStrictMode;
|
||||
}
|
||||
|
||||
function bindJSDocTypedefTagIfAny(node: Node) {
|
||||
if (!node.jsDoc) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const jsDoc of node.jsDoc) {
|
||||
if (!jsDoc.tags) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (const tag of jsDoc.tags) {
|
||||
if (tag.kind === SyntaxKind.JSDocTypedefTag) {
|
||||
const savedParent = parent;
|
||||
parent = jsDoc;
|
||||
bind(tag);
|
||||
parent = savedParent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateStrictModeStatementList(statements: NodeArray<Statement>) {
|
||||
if (!inStrictMode) {
|
||||
for (const statement of statements) {
|
||||
|
||||
+65
-27
@@ -197,6 +197,8 @@ namespace ts {
|
||||
const evolvingArrayTypes: EvolvingArrayType[] = [];
|
||||
|
||||
const unknownSymbol = createSymbol(SymbolFlags.Property, "unknown");
|
||||
const untypedModuleSymbol = createSymbol(SymbolFlags.ValueModule, "<untyped>");
|
||||
untypedModuleSymbol.exports = createMap<Symbol>();
|
||||
const resolvingSymbol = createSymbol(0, "__resolving__");
|
||||
|
||||
const anyType = createIntrinsicType(TypeFlags.Any, "any");
|
||||
@@ -1233,7 +1235,7 @@ namespace ts {
|
||||
|
||||
if (moduleSymbol) {
|
||||
let exportDefaultSymbol: Symbol;
|
||||
if (isShorthandAmbientModuleSymbol(moduleSymbol)) {
|
||||
if (isUntypedOrShorthandAmbientModuleSymbol(moduleSymbol)) {
|
||||
exportDefaultSymbol = moduleSymbol;
|
||||
}
|
||||
else {
|
||||
@@ -1313,7 +1315,7 @@ namespace ts {
|
||||
if (targetSymbol) {
|
||||
const name = specifier.propertyName || specifier.name;
|
||||
if (name.text) {
|
||||
if (isShorthandAmbientModuleSymbol(moduleSymbol)) {
|
||||
if (isUntypedOrShorthandAmbientModuleSymbol(moduleSymbol)) {
|
||||
return moduleSymbol;
|
||||
}
|
||||
|
||||
@@ -1566,15 +1568,19 @@ namespace ts {
|
||||
if (isForAugmentation) {
|
||||
const diag = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;
|
||||
error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
|
||||
return undefined;
|
||||
}
|
||||
else if (compilerOptions.noImplicitAny && moduleNotFoundError) {
|
||||
error(errorNode,
|
||||
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
|
||||
moduleReference,
|
||||
resolvedModule.resolvedFileName);
|
||||
return undefined;
|
||||
}
|
||||
// Failed imports and untyped modules are both treated in an untyped manner; only difference is whether we give a diagnostic first.
|
||||
return undefined;
|
||||
// Unlike a failed import, an untyped module produces a dummy symbol.
|
||||
// This is checked for by `isUntypedOrShorthandAmbientModuleSymbol`.
|
||||
// This must be different than `unknownSymbol` because `getBaseConstructorTypeOfClass` won't fail for `unknownSymbol`.
|
||||
return untypedModuleSymbol;
|
||||
}
|
||||
|
||||
if (moduleNotFoundError) {
|
||||
@@ -3759,7 +3765,7 @@ namespace ts {
|
||||
function getTypeOfFuncClassEnumModule(symbol: Symbol): Type {
|
||||
const links = getSymbolLinks(symbol);
|
||||
if (!links.type) {
|
||||
if (symbol.flags & SymbolFlags.Module && isShorthandAmbientModuleSymbol(symbol)) {
|
||||
if (symbol.flags & SymbolFlags.Module && isUntypedOrShorthandAmbientModuleSymbol(symbol)) {
|
||||
links.type = anyType;
|
||||
}
|
||||
else {
|
||||
@@ -3958,7 +3964,7 @@ namespace ts {
|
||||
}
|
||||
if (type.flags & TypeFlags.TypeVariable) {
|
||||
const constraint = getBaseConstraintOfType(<TypeVariable>type);
|
||||
return isValidBaseType(constraint) && isMixinConstructorType(constraint);
|
||||
return constraint && isValidBaseType(constraint) && isMixinConstructorType(constraint);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -5903,15 +5909,52 @@ namespace ts {
|
||||
return getTypeFromNonGenericTypeReference(node, symbol);
|
||||
}
|
||||
|
||||
function getPrimitiveTypeFromJSDocTypeReference(node: JSDocTypeReference): Type {
|
||||
if (isIdentifier(node.name)) {
|
||||
switch (node.name.text) {
|
||||
case "String":
|
||||
return stringType;
|
||||
case "Number":
|
||||
return numberType;
|
||||
case "Boolean":
|
||||
return booleanType;
|
||||
case "Void":
|
||||
return voidType;
|
||||
case "Undefined":
|
||||
return undefinedType;
|
||||
case "Null":
|
||||
return nullType;
|
||||
case "Object":
|
||||
return anyType;
|
||||
case "Function":
|
||||
return anyFunctionType;
|
||||
case "Array":
|
||||
case "array":
|
||||
return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
|
||||
case "Promise":
|
||||
case "promise":
|
||||
return !node.typeArguments || !node.typeArguments.length ? createPromiseType(anyType) : undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getTypeFromJSDocNullableTypeNode(node: JSDocNullableType) {
|
||||
const type = getTypeFromTypeNode(node.type);
|
||||
return strictNullChecks ? getUnionType([type, nullType]) : type;
|
||||
}
|
||||
|
||||
function getTypeFromTypeReference(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference): Type {
|
||||
const links = getNodeLinks(node);
|
||||
if (!links.resolvedType) {
|
||||
let symbol: Symbol;
|
||||
let type: Type;
|
||||
if (node.kind === SyntaxKind.JSDocTypeReference) {
|
||||
const typeReferenceName = getTypeReferenceName(node);
|
||||
symbol = resolveTypeReferenceName(typeReferenceName);
|
||||
type = getTypeReferenceType(node, symbol);
|
||||
type = getPrimitiveTypeFromJSDocTypeReference(<JSDocTypeReference>node);
|
||||
if (!type) {
|
||||
const typeReferenceName = getTypeReferenceName(node);
|
||||
symbol = resolveTypeReferenceName(typeReferenceName);
|
||||
type = getTypeReferenceType(node, symbol);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// We only support expressions that are simple qualified names. For other expressions this produces undefined.
|
||||
@@ -6818,12 +6861,6 @@ namespace ts {
|
||||
return neverType;
|
||||
case SyntaxKind.ObjectKeyword:
|
||||
return nonPrimitiveType;
|
||||
case SyntaxKind.JSDocNullKeyword:
|
||||
return nullType;
|
||||
case SyntaxKind.JSDocUndefinedKeyword:
|
||||
return undefinedType;
|
||||
case SyntaxKind.JSDocNeverKeyword:
|
||||
return neverType;
|
||||
case SyntaxKind.ThisType:
|
||||
case SyntaxKind.ThisKeyword:
|
||||
return getTypeFromThisTypeNode(node);
|
||||
@@ -6850,8 +6887,9 @@ namespace ts {
|
||||
return getTypeFromUnionTypeNode(<UnionTypeNode>node);
|
||||
case SyntaxKind.IntersectionType:
|
||||
return getTypeFromIntersectionTypeNode(<IntersectionTypeNode>node);
|
||||
case SyntaxKind.ParenthesizedType:
|
||||
case SyntaxKind.JSDocNullableType:
|
||||
return getTypeFromJSDocNullableTypeNode(<JSDocNullableType>node);
|
||||
case SyntaxKind.ParenthesizedType:
|
||||
case SyntaxKind.JSDocNonNullableType:
|
||||
case SyntaxKind.JSDocConstructorType:
|
||||
case SyntaxKind.JSDocThisType:
|
||||
@@ -11583,7 +11621,7 @@ namespace ts {
|
||||
if (isBindingPattern(declaration.parent)) {
|
||||
const parentDeclaration = declaration.parent.parent;
|
||||
const name = declaration.propertyName || declaration.name;
|
||||
if (isVariableLike(parentDeclaration) &&
|
||||
if (parentDeclaration.kind !== SyntaxKind.BindingElement &&
|
||||
parentDeclaration.type &&
|
||||
!isBindingPattern(name)) {
|
||||
const text = getTextOfPropertyName(name);
|
||||
@@ -12791,11 +12829,6 @@ namespace ts {
|
||||
// Props is of type 'any' or unknown
|
||||
return attributesType;
|
||||
}
|
||||
else if (attributesType.flags & TypeFlags.Union) {
|
||||
// Props cannot be a union type
|
||||
error(openingLikeElement.tagName, Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType));
|
||||
return anyType;
|
||||
}
|
||||
else {
|
||||
// Normal case -- add in IntrinsicClassElements<T> and IntrinsicElements
|
||||
let apparentAttributesType = attributesType;
|
||||
@@ -14836,7 +14869,6 @@ namespace ts {
|
||||
|
||||
function checkMetaProperty(node: MetaProperty) {
|
||||
checkGrammarMetaProperty(node);
|
||||
Debug.assert(node.keywordToken === SyntaxKind.NewKeyword && node.name.text === "target", "Unrecognized meta-property.");
|
||||
const container = getNewTargetContainer(node);
|
||||
if (!container) {
|
||||
error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target");
|
||||
@@ -15965,12 +15997,16 @@ namespace ts {
|
||||
checkAssignmentOperator(rightType);
|
||||
return getRegularTypeOfObjectLiteral(rightType);
|
||||
case SyntaxKind.CommaToken:
|
||||
if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left)) {
|
||||
if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) {
|
||||
error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
|
||||
}
|
||||
return rightType;
|
||||
}
|
||||
|
||||
function isEvalNode(node: Expression) {
|
||||
return node.kind === SyntaxKind.Identifier && (node as Identifier).text === "eval";
|
||||
}
|
||||
|
||||
// Return true if there was no error, false if there was an error.
|
||||
function checkForDisallowedESSymbolOperand(operator: SyntaxKind): boolean {
|
||||
const offendingSymbolOperand =
|
||||
@@ -20966,7 +21002,9 @@ namespace ts {
|
||||
return getSymbolOfNode(entityName.parent);
|
||||
}
|
||||
|
||||
if (isInJavaScriptFile(entityName) && entityName.parent.kind === SyntaxKind.PropertyAccessExpression) {
|
||||
if (isInJavaScriptFile(entityName) &&
|
||||
entityName.parent.kind === SyntaxKind.PropertyAccessExpression &&
|
||||
entityName.parent === (entityName.parent.parent as BinaryExpression).left) {
|
||||
// Check if this is a special property assignment
|
||||
const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName);
|
||||
if (specialPropertyAssignmentSymbol) {
|
||||
@@ -21347,7 +21385,7 @@ namespace ts {
|
||||
|
||||
function moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean {
|
||||
let moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression);
|
||||
if (!moduleSymbol || isShorthandAmbientModuleSymbol(moduleSymbol)) {
|
||||
if (!moduleSymbol || isUntypedOrShorthandAmbientModuleSymbol(moduleSymbol)) {
|
||||
// If the module is not found or is shorthand, assume that it may export a value.
|
||||
return true;
|
||||
}
|
||||
@@ -23063,7 +23101,7 @@ namespace ts {
|
||||
function checkGrammarMetaProperty(node: MetaProperty) {
|
||||
if (node.keywordToken === SyntaxKind.NewKeyword) {
|
||||
if (node.name.text !== "target") {
|
||||
return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_0, node.name.text, tokenToString(node.keywordToken), "target");
|
||||
return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, tokenToString(node.keywordToken), "target");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
"category": "Error",
|
||||
"code": 1113
|
||||
},
|
||||
"Duplicate label '{0}'": {
|
||||
"Duplicate label '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 1114
|
||||
},
|
||||
@@ -451,7 +451,7 @@
|
||||
"category": "Error",
|
||||
"code": 1148
|
||||
},
|
||||
"File name '{0}' differs from already included file name '{1}' only in casing": {
|
||||
"File name '{0}' differs from already included file name '{1}' only in casing.": {
|
||||
"category": "Error",
|
||||
"code": 1149
|
||||
},
|
||||
@@ -459,7 +459,7 @@
|
||||
"category": "Error",
|
||||
"code": 1150
|
||||
},
|
||||
"'const' declarations must be initialized": {
|
||||
"'const' declarations must be initialized.": {
|
||||
"category": "Error",
|
||||
"code": 1155
|
||||
},
|
||||
@@ -655,11 +655,11 @@
|
||||
"category": "Error",
|
||||
"code": 1210
|
||||
},
|
||||
"A class declaration without the 'default' modifier must have a name": {
|
||||
"A class declaration without the 'default' modifier must have a name.": {
|
||||
"category": "Error",
|
||||
"code": 1211
|
||||
},
|
||||
"Identifier expected. '{0}' is a reserved word in strict mode": {
|
||||
"Identifier expected. '{0}' is a reserved word in strict mode.": {
|
||||
"category": "Error",
|
||||
"code": 1212
|
||||
},
|
||||
@@ -1115,7 +1115,7 @@
|
||||
"category": "Error",
|
||||
"code": 2360
|
||||
},
|
||||
"The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter": {
|
||||
"The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.": {
|
||||
"category": "Error",
|
||||
"code": 2361
|
||||
},
|
||||
@@ -1139,7 +1139,7 @@
|
||||
"category": "Error",
|
||||
"code": 2366
|
||||
},
|
||||
"Type parameter name cannot be '{0}'": {
|
||||
"Type parameter name cannot be '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2368
|
||||
},
|
||||
@@ -1299,7 +1299,7 @@
|
||||
"category": "Error",
|
||||
"code": 2408
|
||||
},
|
||||
"Return type of constructor signature must be assignable to the instance type of the class": {
|
||||
"Return type of constructor signature must be assignable to the instance type of the class.": {
|
||||
"category": "Error",
|
||||
"code": 2409
|
||||
},
|
||||
@@ -1319,7 +1319,7 @@
|
||||
"category": "Error",
|
||||
"code": 2413
|
||||
},
|
||||
"Class name cannot be '{0}'": {
|
||||
"Class name cannot be '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2414
|
||||
},
|
||||
@@ -1355,7 +1355,7 @@
|
||||
"category": "Error",
|
||||
"code": 2426
|
||||
},
|
||||
"Interface name cannot be '{0}'": {
|
||||
"Interface name cannot be '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2427
|
||||
},
|
||||
@@ -1367,7 +1367,7 @@
|
||||
"category": "Error",
|
||||
"code": 2430
|
||||
},
|
||||
"Enum name cannot be '{0}'": {
|
||||
"Enum name cannot be '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2431
|
||||
},
|
||||
@@ -1375,11 +1375,11 @@
|
||||
"category": "Error",
|
||||
"code": 2432
|
||||
},
|
||||
"A namespace declaration cannot be in a different file from a class or function with which it is merged": {
|
||||
"A namespace declaration cannot be in a different file from a class or function with which it is merged.": {
|
||||
"category": "Error",
|
||||
"code": 2433
|
||||
},
|
||||
"A namespace declaration cannot be located prior to a class or function with which it is merged": {
|
||||
"A namespace declaration cannot be located prior to a class or function with which it is merged.": {
|
||||
"category": "Error",
|
||||
"code": 2434
|
||||
},
|
||||
@@ -1391,11 +1391,11 @@
|
||||
"category": "Error",
|
||||
"code": 2436
|
||||
},
|
||||
"Module '{0}' is hidden by a local declaration with the same name": {
|
||||
"Module '{0}' is hidden by a local declaration with the same name.": {
|
||||
"category": "Error",
|
||||
"code": 2437
|
||||
},
|
||||
"Import name cannot be '{0}'": {
|
||||
"Import name cannot be '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2438
|
||||
},
|
||||
@@ -1403,7 +1403,7 @@
|
||||
"category": "Error",
|
||||
"code": 2439
|
||||
},
|
||||
"Import declaration conflicts with local declaration of '{0}'": {
|
||||
"Import declaration conflicts with local declaration of '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2440
|
||||
},
|
||||
@@ -1463,7 +1463,7 @@
|
||||
"category": "Error",
|
||||
"code": 2456
|
||||
},
|
||||
"Type alias name cannot be '{0}'": {
|
||||
"Type alias name cannot be '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2457
|
||||
},
|
||||
@@ -1483,7 +1483,7 @@
|
||||
"category": "Error",
|
||||
"code": 2461
|
||||
},
|
||||
"A rest element must be last in a destructuring pattern": {
|
||||
"A rest element must be last in a destructuring pattern.": {
|
||||
"category": "Error",
|
||||
"code": 2462
|
||||
},
|
||||
@@ -1567,7 +1567,7 @@
|
||||
"category": "Error",
|
||||
"code": 2483
|
||||
},
|
||||
"Export declaration conflicts with exported declaration of '{0}'": {
|
||||
"Export declaration conflicts with exported declaration of '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2484
|
||||
},
|
||||
@@ -1591,7 +1591,7 @@
|
||||
"category": "Error",
|
||||
"code": 2491
|
||||
},
|
||||
"Cannot redeclare identifier '{0}' in catch clause": {
|
||||
"Cannot redeclare identifier '{0}' in catch clause.": {
|
||||
"category": "Error",
|
||||
"code": 2492
|
||||
},
|
||||
@@ -1835,7 +1835,7 @@
|
||||
"category": "Error",
|
||||
"code": 2602
|
||||
},
|
||||
"Property '{0}' in type '{1}' is not assignable to type '{2}'": {
|
||||
"Property '{0}' in type '{1}' is not assignable to type '{2}'.": {
|
||||
"category": "Error",
|
||||
"code": 2603
|
||||
},
|
||||
@@ -1851,11 +1851,11 @@
|
||||
"category": "Error",
|
||||
"code": 2606
|
||||
},
|
||||
"JSX element class does not support attributes because it does not have a '{0}' property": {
|
||||
"JSX element class does not support attributes because it does not have a '{0}' property.": {
|
||||
"category": "Error",
|
||||
"code": 2607
|
||||
},
|
||||
"The global type 'JSX.{0}' may not have more than one property": {
|
||||
"The global type 'JSX.{0}' may not have more than one property.": {
|
||||
"category": "Error",
|
||||
"code": 2608
|
||||
},
|
||||
@@ -1867,7 +1867,7 @@
|
||||
"category": "Error",
|
||||
"code": 2649
|
||||
},
|
||||
"Cannot emit namespaced JSX elements in React": {
|
||||
"Cannot emit namespaced JSX elements in React.": {
|
||||
"category": "Error",
|
||||
"code": 2650
|
||||
},
|
||||
@@ -1891,11 +1891,11 @@
|
||||
"category": "Error",
|
||||
"code": 2656
|
||||
},
|
||||
"JSX expressions must have one parent element": {
|
||||
"JSX expressions must have one parent element.": {
|
||||
"category": "Error",
|
||||
"code": 2657
|
||||
},
|
||||
"Type '{0}' provides no match for the signature '{1}'": {
|
||||
"Type '{0}' provides no match for the signature '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2658
|
||||
},
|
||||
@@ -2075,11 +2075,11 @@
|
||||
"category": "Error",
|
||||
"code": 2702
|
||||
},
|
||||
"The operand of a delete operator must be a property reference": {
|
||||
"The operand of a delete operator must be a property reference.": {
|
||||
"category": "Error",
|
||||
"code": 2703
|
||||
},
|
||||
"The operand of a delete operator cannot be a read-only property": {
|
||||
"The operand of a delete operator cannot be a read-only property.": {
|
||||
"category": "Error",
|
||||
"code": 2704
|
||||
},
|
||||
@@ -2413,7 +2413,7 @@
|
||||
"category": "Error",
|
||||
"code": 5011
|
||||
},
|
||||
"Cannot read file '{0}': {1}": {
|
||||
"Cannot read file '{0}': {1}.": {
|
||||
"category": "Error",
|
||||
"code": 5012
|
||||
},
|
||||
@@ -2433,7 +2433,7 @@
|
||||
"category": "Error",
|
||||
"code": 5024
|
||||
},
|
||||
"Could not write file '{0}': {1}": {
|
||||
"Could not write file '{0}': {1}.": {
|
||||
"category": "Error",
|
||||
"code": 5033
|
||||
},
|
||||
@@ -2469,11 +2469,11 @@
|
||||
"category": "Error",
|
||||
"code": 5056
|
||||
},
|
||||
"Cannot find a tsconfig.json file at the specified directory: '{0}'": {
|
||||
"Cannot find a tsconfig.json file at the specified directory: '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 5057
|
||||
},
|
||||
"The specified path does not exist: '{0}'": {
|
||||
"The specified path does not exist: '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 5058
|
||||
},
|
||||
@@ -2485,11 +2485,11 @@
|
||||
"category": "Error",
|
||||
"code": 5060
|
||||
},
|
||||
"Pattern '{0}' can have at most one '*' character": {
|
||||
"Pattern '{0}' can have at most one '*' character.": {
|
||||
"category": "Error",
|
||||
"code": 5061
|
||||
},
|
||||
"Substitution '{0}' in pattern '{1}' in can have at most one '*' character": {
|
||||
"Substitution '{0}' in pattern '{1}' in can have at most one '*' character.": {
|
||||
"category": "Error",
|
||||
"code": 5062
|
||||
},
|
||||
@@ -2561,11 +2561,11 @@
|
||||
"category": "Message",
|
||||
"code": 6012
|
||||
},
|
||||
"Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'": {
|
||||
"Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'.": {
|
||||
"category": "Message",
|
||||
"code": 6015
|
||||
},
|
||||
"Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'": {
|
||||
"Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'.": {
|
||||
"category": "Message",
|
||||
"code": 6016
|
||||
},
|
||||
@@ -2577,7 +2577,7 @@
|
||||
"category": "Message",
|
||||
"code": 6019
|
||||
},
|
||||
"Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'": {
|
||||
"Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.": {
|
||||
"category": "Message",
|
||||
"code": 6020
|
||||
},
|
||||
@@ -2657,7 +2657,7 @@
|
||||
"category": "Error",
|
||||
"code": 6045
|
||||
},
|
||||
"Argument for '{0}' option must be: {1}": {
|
||||
"Argument for '{0}' option must be: {1}.": {
|
||||
"category": "Error",
|
||||
"code": 6046
|
||||
},
|
||||
@@ -2741,7 +2741,7 @@
|
||||
"category": "Message",
|
||||
"code": 6072
|
||||
},
|
||||
"Stylize errors and messages using color and context. (experimental)": {
|
||||
"Stylize errors and messages using color and context (experimental).": {
|
||||
"category": "Message",
|
||||
"code": 6073
|
||||
},
|
||||
@@ -2769,7 +2769,7 @@
|
||||
"category": "Message",
|
||||
"code": 6079
|
||||
},
|
||||
"Specify JSX code generation: 'preserve', 'react-native', or 'react'": {
|
||||
"Specify JSX code generation: 'preserve', 'react-native', or 'react'.": {
|
||||
"category": "Message",
|
||||
"code": 6080
|
||||
},
|
||||
@@ -2785,7 +2785,7 @@
|
||||
"category": "Message",
|
||||
"code": 6083
|
||||
},
|
||||
"Specify the object invoked for createElement and __spread when targeting 'react' JSX emit": {
|
||||
"Specify the object invoked for createElement and __spread when targeting 'react' JSX emit.": {
|
||||
"category": "Message",
|
||||
"code": 6084
|
||||
},
|
||||
@@ -2873,27 +2873,27 @@
|
||||
"category": "Message",
|
||||
"code": 6105
|
||||
},
|
||||
"'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'": {
|
||||
"'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'.": {
|
||||
"category": "Message",
|
||||
"code": 6106
|
||||
},
|
||||
"'rootDirs' option is set, using it to resolve relative module name '{0}'": {
|
||||
"'rootDirs' option is set, using it to resolve relative module name '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 6107
|
||||
},
|
||||
"Longest matching prefix for '{0}' is '{1}'": {
|
||||
"Longest matching prefix for '{0}' is '{1}'.": {
|
||||
"category": "Message",
|
||||
"code": 6108
|
||||
},
|
||||
"Loading '{0}' from the root dir '{1}', candidate location '{2}'": {
|
||||
"Loading '{0}' from the root dir '{1}', candidate location '{2}'.": {
|
||||
"category": "Message",
|
||||
"code": 6109
|
||||
},
|
||||
"Trying other entries in 'rootDirs'": {
|
||||
"Trying other entries in 'rootDirs'.": {
|
||||
"category": "Message",
|
||||
"code": 6110
|
||||
},
|
||||
"Module resolution using 'rootDirs' has failed": {
|
||||
"Module resolution using 'rootDirs' has failed.": {
|
||||
"category": "Message",
|
||||
"code": 6111
|
||||
},
|
||||
@@ -2933,7 +2933,7 @@
|
||||
"category": "Message",
|
||||
"code": 6120
|
||||
},
|
||||
"Resolving with primary search path '{0}'": {
|
||||
"Resolving with primary search path '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 6121
|
||||
},
|
||||
@@ -2949,7 +2949,7 @@
|
||||
"category": "Message",
|
||||
"code": 6124
|
||||
},
|
||||
"Looking up in 'node_modules' folder, initial location '{0}'": {
|
||||
"Looking up in 'node_modules' folder, initial location '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 6125
|
||||
},
|
||||
@@ -2969,7 +2969,7 @@
|
||||
"category": "Error",
|
||||
"code": 6129
|
||||
},
|
||||
"Resolving real path for '{0}', result '{1}'": {
|
||||
"Resolving real path for '{0}', result '{1}'.": {
|
||||
"category": "Message",
|
||||
"code": 6130
|
||||
},
|
||||
@@ -2977,7 +2977,7 @@
|
||||
"category": "Error",
|
||||
"code": 6131
|
||||
},
|
||||
"File name '{0}' has a '{1}' extension - stripping it": {
|
||||
"File name '{0}' has a '{1}' extension - stripping it.": {
|
||||
"category": "Message",
|
||||
"code": 6132
|
||||
},
|
||||
@@ -2993,7 +2993,7 @@
|
||||
"category": "Message",
|
||||
"code": 6135
|
||||
},
|
||||
"The maximum dependency depth to search under node_modules and load JavaScript files": {
|
||||
"The maximum dependency depth to search under node_modules and load JavaScript files.": {
|
||||
"category": "Message",
|
||||
"code": 6136
|
||||
},
|
||||
@@ -3009,7 +3009,7 @@
|
||||
"category": "Error",
|
||||
"code": 6140
|
||||
},
|
||||
"Parse in strict mode and emit \"use strict\" for each source file": {
|
||||
"Parse in strict mode and emit \"use strict\" for each source file.": {
|
||||
"category": "Message",
|
||||
"code": 6141
|
||||
},
|
||||
@@ -3117,7 +3117,7 @@
|
||||
"category": "Error",
|
||||
"code": 7025
|
||||
},
|
||||
"JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists": {
|
||||
"JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists.": {
|
||||
"category": "Error",
|
||||
"code": 7026
|
||||
},
|
||||
@@ -3245,7 +3245,7 @@
|
||||
"category": "Error",
|
||||
"code": 17004
|
||||
},
|
||||
"A constructor cannot contain a 'super' call when its class extends 'null'": {
|
||||
"A constructor cannot contain a 'super' call when its class extends 'null'.": {
|
||||
"category": "Error",
|
||||
"code": 17005
|
||||
},
|
||||
@@ -3273,7 +3273,7 @@
|
||||
"category": "Error",
|
||||
"code": 17011
|
||||
},
|
||||
"'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{0}'?": {
|
||||
"'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?": {
|
||||
"category": "Error",
|
||||
"code": 17012
|
||||
},
|
||||
@@ -3311,7 +3311,7 @@
|
||||
"category": "Message",
|
||||
"code": 90003
|
||||
},
|
||||
"Remove declaration for: {0}": {
|
||||
"Remove declaration for: '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 90004
|
||||
},
|
||||
@@ -3327,7 +3327,7 @@
|
||||
"category": "Message",
|
||||
"code": 90008
|
||||
},
|
||||
"Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig": {
|
||||
"Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.": {
|
||||
"category": "Error",
|
||||
"code": 90009
|
||||
},
|
||||
@@ -3335,23 +3335,23 @@
|
||||
"category": "Error",
|
||||
"code": 90010
|
||||
},
|
||||
"Import {0} from {1}": {
|
||||
"Import {0} from {1}.": {
|
||||
"category": "Message",
|
||||
"code": 90013
|
||||
},
|
||||
"Change {0} to {1}": {
|
||||
"Change {0} to {1}.": {
|
||||
"category": "Message",
|
||||
"code": 90014
|
||||
},
|
||||
"Add {0} to existing import declaration from {1}": {
|
||||
"Add {0} to existing import declaration from {1}.": {
|
||||
"category": "Message",
|
||||
"code": 90015
|
||||
},
|
||||
"Add declaration for missing property '{0}'": {
|
||||
"Add declaration for missing property '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 90016
|
||||
},
|
||||
"Add index signature for missing property '{0}'": {
|
||||
"Add index signature for missing property '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 90017
|
||||
},
|
||||
|
||||
@@ -1761,7 +1761,6 @@ namespace ts {
|
||||
else {
|
||||
pushNameGenerationScope();
|
||||
write("{");
|
||||
increaseIndent();
|
||||
emitBlockStatements(node);
|
||||
write("}");
|
||||
popNameGenerationScope();
|
||||
|
||||
@@ -1189,7 +1189,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function createModuleBlock(statements: Statement[]) {
|
||||
const node = <ModuleBlock>createSynthesizedNode(SyntaxKind.CaseBlock);
|
||||
const node = <ModuleBlock>createSynthesizedNode(SyntaxKind.ModuleBlock);
|
||||
node.statements = createNodeArray(statements);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -1942,7 +1942,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function substituteExpressionIdentifier(node: Identifier) {
|
||||
if (renamedCatchVariables && renamedCatchVariables.has(node.text)) {
|
||||
if (!isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(node.text)) {
|
||||
const original = getOriginalNode(node);
|
||||
if (isIdentifier(original) && original.parent) {
|
||||
const declaration = resolver.getReferencedValueDeclaration(original);
|
||||
@@ -2108,17 +2108,24 @@ namespace ts {
|
||||
function beginCatchBlock(variable: VariableDeclaration): void {
|
||||
Debug.assert(peekBlockKind() === CodeBlockKind.Exception);
|
||||
|
||||
const text = (<Identifier>variable.name).text;
|
||||
const name = declareLocal(text);
|
||||
|
||||
if (!renamedCatchVariables) {
|
||||
renamedCatchVariables = createMap<boolean>();
|
||||
renamedCatchVariableDeclarations = [];
|
||||
context.enableSubstitution(SyntaxKind.Identifier);
|
||||
// generated identifiers should already be unique within a file
|
||||
let name: Identifier;
|
||||
if (isGeneratedIdentifier(variable.name)) {
|
||||
name = variable.name;
|
||||
hoistVariableDeclaration(variable.name);
|
||||
}
|
||||
else {
|
||||
const text = (<Identifier>variable.name).text;
|
||||
name = declareLocal(text);
|
||||
if (!renamedCatchVariables) {
|
||||
renamedCatchVariables = createMap<boolean>();
|
||||
renamedCatchVariableDeclarations = [];
|
||||
context.enableSubstitution(SyntaxKind.Identifier);
|
||||
}
|
||||
|
||||
renamedCatchVariables.set(text, true);
|
||||
renamedCatchVariableDeclarations[getOriginalNodeId(variable)] = name;
|
||||
renamedCatchVariables.set(text, true);
|
||||
renamedCatchVariableDeclarations[getOriginalNodeId(variable)] = name;
|
||||
}
|
||||
|
||||
const exception = <ExceptionBlock>peekBlock();
|
||||
Debug.assert(exception.state < ExceptionBlockState.Catch);
|
||||
|
||||
+40
-7
@@ -382,9 +382,6 @@
|
||||
JSDocPropertyTag,
|
||||
JSDocTypeLiteral,
|
||||
JSDocLiteralType,
|
||||
JSDocNullKeyword,
|
||||
JSDocUndefinedKeyword,
|
||||
JSDocNeverKeyword,
|
||||
|
||||
// Synthesized list
|
||||
SyntaxList,
|
||||
@@ -424,9 +421,9 @@
|
||||
LastBinaryOperator = CaretEqualsToken,
|
||||
FirstNode = QualifiedName,
|
||||
FirstJSDocNode = JSDocTypeExpression,
|
||||
LastJSDocNode = JSDocNeverKeyword,
|
||||
LastJSDocNode = JSDocLiteralType,
|
||||
FirstJSDocTagNode = JSDocComment,
|
||||
LastJSDocTagNode = JSDocNeverKeyword
|
||||
LastJSDocTagNode = JSDocLiteralType
|
||||
}
|
||||
|
||||
export const enum NodeFlags {
|
||||
@@ -626,6 +623,7 @@
|
||||
|
||||
export interface TypeParameterDeclaration extends Declaration {
|
||||
kind: SyntaxKind.TypeParameter;
|
||||
parent?: DeclarationWithTypeParameters;
|
||||
name: Identifier;
|
||||
constraint?: TypeNode;
|
||||
default?: TypeNode;
|
||||
@@ -653,7 +651,7 @@
|
||||
|
||||
export interface VariableDeclaration extends Declaration {
|
||||
kind: SyntaxKind.VariableDeclaration;
|
||||
parent?: VariableDeclarationList;
|
||||
parent?: VariableDeclarationList | CatchClause;
|
||||
name: BindingName; // Declared variable name
|
||||
type?: TypeNode; // Optional type annotation
|
||||
initializer?: Expression; // Optional initializer
|
||||
@@ -661,11 +659,13 @@
|
||||
|
||||
export interface VariableDeclarationList extends Node {
|
||||
kind: SyntaxKind.VariableDeclarationList;
|
||||
parent?: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
|
||||
declarations: NodeArray<VariableDeclaration>;
|
||||
}
|
||||
|
||||
export interface ParameterDeclaration extends Declaration {
|
||||
kind: SyntaxKind.Parameter;
|
||||
parent?: SignatureDeclaration;
|
||||
dotDotDotToken?: DotDotDotToken; // Present on rest parameter
|
||||
name: BindingName; // Declared parameter name
|
||||
questionToken?: QuestionToken; // Present on optional parameter
|
||||
@@ -675,6 +675,7 @@
|
||||
|
||||
export interface BindingElement extends Declaration {
|
||||
kind: SyntaxKind.BindingElement;
|
||||
parent?: BindingPattern;
|
||||
propertyName?: PropertyName; // Binding property name (in object binding pattern)
|
||||
dotDotDotToken?: DotDotDotToken; // Present on rest element (in object binding pattern)
|
||||
name: BindingName; // Declared binding element name
|
||||
@@ -756,11 +757,13 @@
|
||||
|
||||
export interface ObjectBindingPattern extends Node {
|
||||
kind: SyntaxKind.ObjectBindingPattern;
|
||||
parent?: VariableDeclaration | ParameterDeclaration | BindingElement;
|
||||
elements: NodeArray<BindingElement>;
|
||||
}
|
||||
|
||||
export interface ArrayBindingPattern extends Node {
|
||||
kind: SyntaxKind.ArrayBindingPattern;
|
||||
parent?: VariableDeclaration | ParameterDeclaration | BindingElement;
|
||||
elements: NodeArray<ArrayBindingElement>;
|
||||
}
|
||||
|
||||
@@ -1333,14 +1336,17 @@
|
||||
|
||||
export interface TemplateHead extends LiteralLikeNode {
|
||||
kind: SyntaxKind.TemplateHead;
|
||||
parent?: TemplateExpression;
|
||||
}
|
||||
|
||||
export interface TemplateMiddle extends LiteralLikeNode {
|
||||
kind: SyntaxKind.TemplateMiddle;
|
||||
parent?: TemplateSpan;
|
||||
}
|
||||
|
||||
export interface TemplateTail extends LiteralLikeNode {
|
||||
kind: SyntaxKind.TemplateTail;
|
||||
parent?: TemplateSpan;
|
||||
}
|
||||
|
||||
export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
|
||||
@@ -1355,6 +1361,7 @@
|
||||
// The template literal must have kind TemplateMiddleLiteral or TemplateTailLiteral.
|
||||
export interface TemplateSpan extends Node {
|
||||
kind: SyntaxKind.TemplateSpan;
|
||||
parent?: TemplateExpression;
|
||||
expression: Expression;
|
||||
literal: TemplateMiddle | TemplateTail;
|
||||
}
|
||||
@@ -1442,6 +1449,7 @@
|
||||
|
||||
export interface ExpressionWithTypeArguments extends TypeNode {
|
||||
kind: SyntaxKind.ExpressionWithTypeArguments;
|
||||
parent?: HeritageClause;
|
||||
expression: LeftHandSideExpression;
|
||||
typeArguments?: NodeArray<TypeNode>;
|
||||
}
|
||||
@@ -1509,6 +1517,7 @@
|
||||
/// The opening element of a <Tag>...</Tag> JsxElement
|
||||
export interface JsxOpeningElement extends Expression {
|
||||
kind: SyntaxKind.JsxOpeningElement;
|
||||
parent?: JsxElement;
|
||||
tagName: JsxTagNameExpression;
|
||||
attributes: JsxAttributes;
|
||||
}
|
||||
@@ -1522,6 +1531,7 @@
|
||||
|
||||
export interface JsxAttribute extends ObjectLiteralElement {
|
||||
kind: SyntaxKind.JsxAttribute;
|
||||
parent?: JsxOpeningLikeElement;
|
||||
name: Identifier;
|
||||
/// JSX attribute initializers are optional; <X y /> is sugar for <X y={true} />
|
||||
initializer?: StringLiteral | JsxExpression;
|
||||
@@ -1529,22 +1539,26 @@
|
||||
|
||||
export interface JsxSpreadAttribute extends ObjectLiteralElement {
|
||||
kind: SyntaxKind.JsxSpreadAttribute;
|
||||
parent?: JsxOpeningLikeElement;
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
export interface JsxClosingElement extends Node {
|
||||
kind: SyntaxKind.JsxClosingElement;
|
||||
parent?: JsxElement;
|
||||
tagName: JsxTagNameExpression;
|
||||
}
|
||||
|
||||
export interface JsxExpression extends Expression {
|
||||
kind: SyntaxKind.JsxExpression;
|
||||
parent?: JsxElement | JsxAttributeLike;
|
||||
dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
|
||||
expression?: Expression;
|
||||
}
|
||||
|
||||
export interface JsxText extends Node {
|
||||
kind: SyntaxKind.JsxText;
|
||||
parent?: JsxElement;
|
||||
}
|
||||
|
||||
export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement;
|
||||
@@ -1686,17 +1700,20 @@
|
||||
|
||||
export interface CaseBlock extends Node {
|
||||
kind: SyntaxKind.CaseBlock;
|
||||
parent?: SwitchStatement;
|
||||
clauses: NodeArray<CaseOrDefaultClause>;
|
||||
}
|
||||
|
||||
export interface CaseClause extends Node {
|
||||
kind: SyntaxKind.CaseClause;
|
||||
parent?: CaseBlock;
|
||||
expression: Expression;
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
|
||||
export interface DefaultClause extends Node {
|
||||
kind: SyntaxKind.DefaultClause;
|
||||
parent?: CaseBlock;
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
|
||||
@@ -1722,6 +1739,7 @@
|
||||
|
||||
export interface CatchClause extends Node {
|
||||
kind: SyntaxKind.CatchClause;
|
||||
parent?: TryStatement;
|
||||
variableDeclaration: VariableDeclaration;
|
||||
block: Block;
|
||||
}
|
||||
@@ -1765,6 +1783,7 @@
|
||||
|
||||
export interface HeritageClause extends Node {
|
||||
kind: SyntaxKind.HeritageClause;
|
||||
parent?: InterfaceDeclaration | ClassDeclaration | ClassExpression;
|
||||
token: SyntaxKind;
|
||||
types?: NodeArray<ExpressionWithTypeArguments>;
|
||||
}
|
||||
@@ -1778,6 +1797,7 @@
|
||||
|
||||
export interface EnumMember extends Declaration {
|
||||
kind: SyntaxKind.EnumMember;
|
||||
parent?: EnumDeclaration;
|
||||
// This does include ComputedPropertyName, but the parser will give an error
|
||||
// if it parses a ComputedPropertyName in an EnumMember
|
||||
name: PropertyName;
|
||||
@@ -1796,7 +1816,8 @@
|
||||
|
||||
export interface ModuleDeclaration extends DeclarationStatement {
|
||||
kind: SyntaxKind.ModuleDeclaration;
|
||||
name: Identifier | StringLiteral;
|
||||
parent?: ModuleBody | SourceFile;
|
||||
name: ModuleName;
|
||||
body?: ModuleBody | JSDocNamespaceDeclaration | Identifier;
|
||||
}
|
||||
|
||||
@@ -1816,6 +1837,7 @@
|
||||
|
||||
export interface ModuleBlock extends Node, Statement {
|
||||
kind: SyntaxKind.ModuleBlock;
|
||||
parent?: ModuleDeclaration;
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
|
||||
@@ -1823,6 +1845,7 @@
|
||||
|
||||
export interface ImportEqualsDeclaration extends DeclarationStatement {
|
||||
kind: SyntaxKind.ImportEqualsDeclaration;
|
||||
parent?: SourceFile | ModuleBlock;
|
||||
name: Identifier;
|
||||
|
||||
// 'EntityName' for an internal module reference, 'ExternalModuleReference' for an external
|
||||
@@ -1832,6 +1855,7 @@
|
||||
|
||||
export interface ExternalModuleReference extends Node {
|
||||
kind: SyntaxKind.ExternalModuleReference;
|
||||
parent?: ImportEqualsDeclaration;
|
||||
expression?: Expression;
|
||||
}
|
||||
|
||||
@@ -1841,6 +1865,7 @@
|
||||
// ImportClause information is shown at its declaration below.
|
||||
export interface ImportDeclaration extends Statement {
|
||||
kind: SyntaxKind.ImportDeclaration;
|
||||
parent?: SourceFile | ModuleBlock;
|
||||
importClause?: ImportClause;
|
||||
moduleSpecifier: Expression;
|
||||
}
|
||||
@@ -1855,12 +1880,14 @@
|
||||
// import d, { a, b as x } from "mod" => name = d, namedBinding: NamedImports = { elements: [{ name: a }, { name: x, propertyName: b}]}
|
||||
export interface ImportClause extends Declaration {
|
||||
kind: SyntaxKind.ImportClause;
|
||||
parent?: ImportDeclaration;
|
||||
name?: Identifier; // Default binding
|
||||
namedBindings?: NamedImportBindings;
|
||||
}
|
||||
|
||||
export interface NamespaceImport extends Declaration {
|
||||
kind: SyntaxKind.NamespaceImport;
|
||||
parent?: ImportClause;
|
||||
name: Identifier;
|
||||
}
|
||||
|
||||
@@ -1872,17 +1899,20 @@
|
||||
|
||||
export interface ExportDeclaration extends DeclarationStatement {
|
||||
kind: SyntaxKind.ExportDeclaration;
|
||||
parent?: SourceFile | ModuleBlock;
|
||||
exportClause?: NamedExports;
|
||||
moduleSpecifier?: Expression;
|
||||
}
|
||||
|
||||
export interface NamedImports extends Node {
|
||||
kind: SyntaxKind.NamedImports;
|
||||
parent?: ImportClause;
|
||||
elements: NodeArray<ImportSpecifier>;
|
||||
}
|
||||
|
||||
export interface NamedExports extends Node {
|
||||
kind: SyntaxKind.NamedExports;
|
||||
parent?: ExportDeclaration;
|
||||
elements: NodeArray<ExportSpecifier>;
|
||||
}
|
||||
|
||||
@@ -1890,12 +1920,14 @@
|
||||
|
||||
export interface ImportSpecifier extends Declaration {
|
||||
kind: SyntaxKind.ImportSpecifier;
|
||||
parent?: NamedImports;
|
||||
propertyName?: Identifier; // Name preceding "as" keyword (or undefined when "as" is absent)
|
||||
name: Identifier; // Declared name
|
||||
}
|
||||
|
||||
export interface ExportSpecifier extends Declaration {
|
||||
kind: SyntaxKind.ExportSpecifier;
|
||||
parent?: NamedExports;
|
||||
propertyName?: Identifier; // Name preceding "as" keyword (or undefined when "as" is absent)
|
||||
name: Identifier; // Declared name
|
||||
}
|
||||
@@ -1904,6 +1936,7 @@
|
||||
|
||||
export interface ExportAssignment extends DeclarationStatement {
|
||||
kind: SyntaxKind.ExportAssignment;
|
||||
parent?: SourceFile;
|
||||
isExportEquals?: boolean;
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
@@ -435,8 +435,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
/** Given a symbol for a module, checks that it is either an untyped import or a shorthand ambient module. */
|
||||
export function isShorthandAmbientModuleSymbol(moduleSymbol: Symbol): boolean {
|
||||
return isShorthandAmbientModule(moduleSymbol.valueDeclaration);
|
||||
export function isUntypedOrShorthandAmbientModuleSymbol(moduleSymbol: Symbol): boolean {
|
||||
return !moduleSymbol.declarations || isShorthandAmbientModule(moduleSymbol.valueDeclaration);
|
||||
}
|
||||
|
||||
function isShorthandAmbientModule(node: Node): boolean {
|
||||
@@ -1557,7 +1557,10 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
else {
|
||||
result.push(...filter((doc as JSDoc).tags, tag => tag.kind === kind));
|
||||
const tags = (doc as JSDoc).tags;
|
||||
if (tags) {
|
||||
result.push(...filter(tags, tag => tag.kind === kind));
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace ts {
|
||||
assertParseResult(["--lib", "es5,invalidOption", "0.ts"],
|
||||
{
|
||||
errors: [{
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace ts {
|
||||
start: undefined,
|
||||
length: undefined,
|
||||
}, {
|
||||
messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'",
|
||||
messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace ts {
|
||||
start: undefined,
|
||||
length: undefined,
|
||||
}, {
|
||||
messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'",
|
||||
messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace ts {
|
||||
start: undefined,
|
||||
length: undefined,
|
||||
}, {
|
||||
messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'",
|
||||
messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace ts {
|
||||
start: undefined,
|
||||
length: undefined,
|
||||
}, {
|
||||
messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'",
|
||||
messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace ts {
|
||||
start: undefined,
|
||||
length: undefined,
|
||||
}, {
|
||||
messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic'",
|
||||
messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace ts {
|
||||
assertParseResult(["--lib", "es5,", "es7", "0.ts"],
|
||||
{
|
||||
errors: [{
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@@ -283,7 +283,7 @@ namespace ts {
|
||||
assertParseResult(["--lib", "es5, ", "es7", "0.ts"],
|
||||
{
|
||||
errors: [{
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'",
|
||||
messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@@ -122,7 +122,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'",
|
||||
messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@@ -150,7 +150,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'",
|
||||
messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@@ -176,7 +176,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'",
|
||||
messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@@ -202,7 +202,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic'",
|
||||
messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@@ -233,7 +233,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@@ -264,7 +264,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@@ -295,7 +295,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@@ -326,7 +326,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
|
||||
@@ -2218,6 +2218,7 @@ namespace ts.server.protocol {
|
||||
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
|
||||
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
|
||||
insertSpaceBeforeFunctionParenthesis?: boolean;
|
||||
|
||||
@@ -370,8 +370,8 @@ namespace ts.BreakpointResolver {
|
||||
}
|
||||
|
||||
function textSpanFromVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan {
|
||||
const declarations = variableDeclaration.parent.declarations;
|
||||
if (declarations && declarations[0] === variableDeclaration) {
|
||||
if (variableDeclaration.parent.kind === SyntaxKind.VariableDeclarationList &&
|
||||
variableDeclaration.parent.declarations[0] === variableDeclaration) {
|
||||
// First declaration - include let keyword
|
||||
return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);
|
||||
}
|
||||
@@ -400,8 +400,8 @@ namespace ts.BreakpointResolver {
|
||||
return textSpanFromVariableDeclaration(variableDeclaration);
|
||||
}
|
||||
|
||||
const declarations = variableDeclaration.parent.declarations;
|
||||
if (declarations && declarations[0] !== variableDeclaration) {
|
||||
if (variableDeclaration.parent.kind === SyntaxKind.VariableDeclarationList &&
|
||||
variableDeclaration.parent.declarations[0] !== variableDeclaration) {
|
||||
// If we cannot set breakpoint on this declaration, set it on previous one
|
||||
// Because the variable declaration may be binding pattern and
|
||||
// we would like to set breakpoint in last binding element if that's the case,
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace ts.FindAllReferences {
|
||||
return { symbol };
|
||||
}
|
||||
|
||||
if (ts.isShorthandAmbientModuleSymbol(aliasedSymbol)) {
|
||||
if (ts.isUntypedOrShorthandAmbientModuleSymbol(aliasedSymbol)) {
|
||||
return { symbol, shorthandModuleSymbol: aliasedSymbol };
|
||||
}
|
||||
|
||||
|
||||
@@ -198,7 +198,11 @@ namespace ts.GoToDefinition {
|
||||
return false;
|
||||
}
|
||||
|
||||
function tryAddSignature(signatureDeclarations: Declaration[], selectConstructors: boolean, symbolKind: string, symbolName: string, containerName: string, result: DefinitionInfo[]) {
|
||||
function tryAddSignature(signatureDeclarations: Declaration[] | undefined, selectConstructors: boolean, symbolKind: string, symbolName: string, containerName: string, result: DefinitionInfo[]) {
|
||||
if (!signatureDeclarations) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const declarations: Declaration[] = [];
|
||||
let definition: Declaration | undefined;
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace ts {
|
||||
getDeclaration(): SignatureDeclaration {
|
||||
return this.declaration;
|
||||
}
|
||||
getTypeParameters(): Type[] {
|
||||
getTypeParameters(): TypeParameter[] {
|
||||
return this.typeParameters;
|
||||
}
|
||||
getParameters(): Symbol[] {
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ts {
|
||||
|
||||
export interface Signature {
|
||||
getDeclaration(): SignatureDeclaration;
|
||||
getTypeParameters(): Type[];
|
||||
getTypeParameters(): TypeParameter[];
|
||||
getParameters(): Symbol[];
|
||||
getReturnType(): Type;
|
||||
getDocumentationComment(): SymbolDisplayPart[];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ====
|
||||
@@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro
|
||||
module X.Y {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
export var Origin = new Point(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ====
|
||||
@@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro
|
||||
module X.Y {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
export var Origin = new Point(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/ClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any'
|
||||
tests/cases/compiler/ClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ClassDeclaration24.ts (1 errors) ====
|
||||
class any {
|
||||
~~~
|
||||
!!! error TS2414: Class name cannot be 'any'
|
||||
!!! error TS2414: Class name cannot be 'any'.
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error TS1155: 'const' declarations must be initialized.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts (2 errors) ====
|
||||
@@ -10,6 +10,6 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error
|
||||
!!! error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
const v;
|
||||
~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'.
|
||||
|
||||
@@ -14,7 +14,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error T
|
||||
module A {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
export var Origin = { x: 0, y: 0 };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/InterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string'
|
||||
tests/cases/compiler/InterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/InterfaceDeclaration8.ts (1 errors) ====
|
||||
interface string {
|
||||
~~~~~~
|
||||
!!! error TS2427: Interface name cannot be 'string'
|
||||
!!! error TS2427: Interface name cannot be 'string'.
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
|
||||
module X.Y {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
export var Origin = new Point(0, 0);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ====
|
||||
module A {
|
||||
~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
export var Instance = new A();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
|
||||
module A {
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
export var Origin = { x: 0, y: 0 };
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): erro
|
||||
|
||||
export module Point {
|
||||
~~~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
export var Origin = { x: 0, y: 0 };
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode.
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,1): error TS2304: Cannot find name 'let'.
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@ tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,
|
||||
"use strict";
|
||||
let
|
||||
~~~
|
||||
!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode
|
||||
!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'let'.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1155: 'const' declarations must be initialized.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts (1 errors) ====
|
||||
const a
|
||||
~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1155: 'const' declarations must be initialized.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts (1 errors) ====
|
||||
const a: number
|
||||
~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode.
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS2304: Cannot find name 'yield'.
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,7): error TS2304: Cannot find name 'foo'.
|
||||
|
||||
@@ -7,7 +7,7 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,7): erro
|
||||
"use strict";
|
||||
yield(foo);
|
||||
~~~~~
|
||||
!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode
|
||||
!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode.
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'yield'.
|
||||
~~~
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts(1,16): error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character
|
||||
tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts(1,16): error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character.
|
||||
|
||||
|
||||
==== tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts (1 errors) ====
|
||||
declare module "too*many*asterisks" { }
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character
|
||||
!!! error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
|
||||
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(10,1): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
|
||||
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode.
|
||||
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(10,1): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode.
|
||||
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(11,1): error TS2304: Cannot find name 'I'.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInt
|
||||
|
||||
var interface: number;
|
||||
~~~~~~~~~
|
||||
!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
|
||||
!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode.
|
||||
|
||||
// 'interface' is a strict mode reserved word, and so it would be permissible
|
||||
// to allow 'interface' and the name of the interface to be on separate lines;
|
||||
@@ -17,7 +17,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInt
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
~~~~~~~~~
|
||||
!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
|
||||
!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode.
|
||||
I // This should be the identifier 'I'
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'I'.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(28,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
Type 'S2' provides no match for the signature 'new (x: number): void'
|
||||
Type 'S2' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(29,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(30,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Type '(x: string) => number' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => number' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(31,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Type '(x: string) => string' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => string' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(32,1): error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
Type 'S2' provides no match for the signature 'new (x: number): void'
|
||||
Type 'S2' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(33,1): error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(34,1): error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
Type '(x: string) => number' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => number' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
Type '(x: string) => string' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => string' provides no match for the signature 'new (x: number): void'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts (8 errors) ====
|
||||
@@ -47,33 +47,33 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void'.
|
||||
|
||||
@@ -9,11 +9,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
@@ -21,11 +21,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
@@ -83,13 +83,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
@@ -103,13 +103,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'
|
||||
!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
|
||||
@@ -15,19 +15,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
Type '(a: any) => any' provides no match for the signature 'new (a: number): number'
|
||||
Type '(a: any) => any' provides no match for the signature 'new (a: number): number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' provides no match for the signature '(a: any): any'
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' provides no match for the signature '(a: any): any'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
Type '(a: any) => any' provides no match for the signature 'new <T extends Derived>(a: T): T'
|
||||
Type '(a: any) => any' provides no match for the signature 'new <T extends Derived>(a: T): T'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts (6 errors) ====
|
||||
@@ -128,13 +128,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'
|
||||
!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'.
|
||||
b16 = a16; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
!!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: number): number'
|
||||
!!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: number): number'.
|
||||
|
||||
var b17: new <T>(x: (a: T) => T) => any[];
|
||||
a17 = b17; // error
|
||||
@@ -142,13 +142,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
!!! error TS2322: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' provides no match for the signature '(a: any): any'
|
||||
!!! error TS2322: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' provides no match for the signature '(a: any): any'.
|
||||
b17 = a17; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
!!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new <T extends Derived>(a: T): T'
|
||||
!!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new <T extends Derived>(a: T): T'.
|
||||
}
|
||||
|
||||
module WithGenericSignaturesInBaseType {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tstring>(a: Tstring): Tstring'
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tstring>(a: Tstring): Tstring'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability24.ts (1 errors) ====
|
||||
@@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'inte
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tstring>(a: Tstring): Tstring'
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tstring>(a: Tstring): Tstring'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tstring>(a: Tstring): Tstring'
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tstring>(a: Tstring): Tstring'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability33.ts (1 errors) ====
|
||||
@@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'inte
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tstring>(a: Tstring): Tstring'
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tstring>(a: Tstring): Tstring'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tnumber>(a: Tnumber): Tnumber'
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tnumber>(a: Tnumber): Tnumber'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability34.ts (1 errors) ====
|
||||
@@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'inte
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tnumber>(a: Tnumber): Tnumber'
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature '<Tnumber>(a: Tnumber): Tnumber'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature 'new <Tnumber>(param: Tnumber): any'
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature 'new <Tnumber>(param: Tnumber): any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability37.ts (1 errors) ====
|
||||
@@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'inte
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature 'new <Tnumber>(param: Tnumber): any'
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature 'new <Tnumber>(param: Tnumber): any'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature 'new <Tstring>(param: Tstring): any'
|
||||
Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature 'new <Tstring>(param: Tstring): any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability38.ts (1 errors) ====
|
||||
@@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'inte
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature 'new <Tstring>(param: Tstring): any'
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' provides no match for the signature 'new <Tstring>(param: Tstring): any'.
|
||||
@@ -4,9 +4,9 @@ tests/cases/compiler/augmentedTypesModules.ts(8,8): error TS2300: Duplicate iden
|
||||
tests/cases/compiler/augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'.
|
||||
tests/cases/compiler/augmentedTypesModules.ts(16,8): error TS2300: Duplicate identifier 'm1d'.
|
||||
tests/cases/compiler/augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'.
|
||||
tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/compiler/augmentedTypesModules.ts (9 errors) ====
|
||||
@@ -48,12 +48,12 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace d
|
||||
|
||||
module m2a { var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
function m2a() { }; // error since the module is instantiated
|
||||
|
||||
module m2b { export var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
function m2b() { }; // error since the module is instantiated
|
||||
|
||||
// should be errors to have function first
|
||||
@@ -78,7 +78,7 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace d
|
||||
|
||||
module m3a { var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
class m3a { foo() { } } // error, class isn't ambient or declared before the module
|
||||
|
||||
class m3b { foo() { } }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/compiler/augmentedTypesModules2.ts (3 errors) ====
|
||||
@@ -10,12 +10,12 @@ tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace
|
||||
|
||||
module m2a { var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
function m2a() { }; // error since the module is instantiated
|
||||
|
||||
module m2b { export var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
function m2b() { }; // error since the module is instantiated
|
||||
|
||||
function m2c() { };
|
||||
@@ -23,7 +23,7 @@ tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace
|
||||
|
||||
module m2cc { export var y = 2; }
|
||||
~~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
function m2cc() { }; // error to have module first
|
||||
|
||||
module m2d { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/compiler/augmentedTypesModules3.ts (1 errors) ====
|
||||
@@ -8,5 +8,5 @@ tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace d
|
||||
|
||||
module m3a { var y = 2; }
|
||||
~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
class m3a { foo() { } } // error, class isn't ambient or declared before the module
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(7,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(11,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(7,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(11,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts (2 errors) ====
|
||||
@@ -11,13 +11,13 @@ tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(11,12): e
|
||||
async function bar1() {
|
||||
delete await 42; // OK
|
||||
~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
|
||||
async function bar2() {
|
||||
delete await 42; // OK
|
||||
~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
|
||||
async function bar3() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(3,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(7,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(3,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(7,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts (2 errors) ====
|
||||
@@ -7,13 +7,13 @@ tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(7,12): er
|
||||
async function bar1() {
|
||||
delete await 42;
|
||||
~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
|
||||
async function bar2() {
|
||||
delete await 42;
|
||||
~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
|
||||
async function bar3() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(7,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(11,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(7,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(11,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts (2 errors) ====
|
||||
@@ -11,13 +11,13 @@ tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(11,12): error T
|
||||
async function bar1() {
|
||||
delete await 42; // OK
|
||||
~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
|
||||
async function bar2() {
|
||||
delete await 42; // OK
|
||||
~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
|
||||
async function bar3() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(3,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(7,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(3,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(7,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts (2 errors) ====
|
||||
@@ -7,13 +7,13 @@ tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(7,12): error TS
|
||||
async function bar1() {
|
||||
delete await 42;
|
||||
~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
|
||||
async function bar2() {
|
||||
delete await 42;
|
||||
~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
|
||||
async function bar3() {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
tests/cases/compiler/baseConstraintOfDecorator.ts(2,5): error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'.
|
||||
tests/cases/compiler/baseConstraintOfDecorator.ts(2,40): error TS2507: Type 'TFunction' is not a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/baseConstraintOfDecorator.ts (2 errors) ====
|
||||
export function classExtender<TFunction>(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction {
|
||||
return class decoratorFunc extends superClass {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~
|
||||
!!! error TS2507: Type 'TFunction' is not a constructor function type.
|
||||
constructor(...args: any[]) {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
super(...args);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_instanceModifier(this, args);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
~~~~~~~~~
|
||||
};
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
//// [baseConstraintOfDecorator.ts]
|
||||
export function classExtender<TFunction>(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction {
|
||||
return class decoratorFunc extends superClass {
|
||||
constructor(...args: any[]) {
|
||||
super(...args);
|
||||
_instanceModifier(this, args);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//// [baseConstraintOfDecorator.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
exports.__esModule = true;
|
||||
function classExtender(superClass, _instanceModifier) {
|
||||
return (function (_super) {
|
||||
__extends(decoratorFunc, _super);
|
||||
function decoratorFunc() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, args) || this;
|
||||
_instanceModifier(_this, args);
|
||||
return _this;
|
||||
}
|
||||
return decoratorFunc;
|
||||
}(superClass));
|
||||
}
|
||||
exports.classExtender = classExtender;
|
||||
@@ -8,12 +8,12 @@
|
||||
"File '/a/b/node_modules/foo.ts' does not exist.",
|
||||
"File '/a/b/node_modules/foo.tsx' does not exist.",
|
||||
"File '/a/b/node_modules/foo.d.ts' exist - use it as a name resolution result.",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.",
|
||||
"======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========",
|
||||
"======== Resolving module 'foo' from '/a/b/c/lib.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'NodeJs'.",
|
||||
"Loading module 'foo' from 'node_modules' folder, target file type 'TypeScript'.",
|
||||
"Resolution for module 'foo' was found in cache.",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.",
|
||||
"======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========"
|
||||
]
|
||||
@@ -6,7 +6,7 @@
|
||||
"File '/a/b/node_modules/foo.ts' does not exist.",
|
||||
"File '/a/b/node_modules/foo.tsx' does not exist.",
|
||||
"File '/a/b/node_modules/foo.d.ts' exist - use it as a name resolution result.",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.",
|
||||
"======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========",
|
||||
"======== Resolving module 'foo' from '/a/b/c/d/e/app.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'NodeJs'.",
|
||||
@@ -14,6 +14,6 @@
|
||||
"Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.",
|
||||
"Resolution for module 'foo' was found in cache.",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.",
|
||||
"======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========"
|
||||
]
|
||||
@@ -8,12 +8,12 @@
|
||||
"File '/a/b/node_modules/foo.ts' does not exist.",
|
||||
"File '/a/b/node_modules/foo.tsx' does not exist.",
|
||||
"File '/a/b/node_modules/foo.d.ts' exist - use it as a name resolution result.",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.",
|
||||
"======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========",
|
||||
"======== Resolving module 'foo' from '/a/b/lib.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'NodeJs'.",
|
||||
"Loading module 'foo' from 'node_modules' folder, target file type 'TypeScript'.",
|
||||
"Resolution for module 'foo' was found in cache.",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'",
|
||||
"Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.",
|
||||
"======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========"
|
||||
]
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/callConstructAssignment.ts(7,1): error TS2322: Type 'new () => any' is not assignable to type '() => void'.
|
||||
Type 'new () => any' provides no match for the signature '(): void'
|
||||
Type 'new () => any' provides no match for the signature '(): void'.
|
||||
tests/cases/compiler/callConstructAssignment.ts(8,1): error TS2322: Type '() => void' is not assignable to type 'new () => any'.
|
||||
Type '() => void' provides no match for the signature 'new (): any'
|
||||
Type '() => void' provides no match for the signature 'new (): any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/callConstructAssignment.ts (2 errors) ====
|
||||
@@ -14,8 +14,8 @@ tests/cases/compiler/callConstructAssignment.ts(8,1): error TS2322: Type '() =>
|
||||
foo = bar; // error
|
||||
~~~
|
||||
!!! error TS2322: Type 'new () => any' is not assignable to type '() => void'.
|
||||
!!! error TS2322: Type 'new () => any' provides no match for the signature '(): void'
|
||||
!!! error TS2322: Type 'new () => any' provides no match for the signature '(): void'.
|
||||
bar = foo; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '() => void' is not assignable to type 'new () => any'.
|
||||
!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'
|
||||
!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classExtendsNull.ts(3,9): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'
|
||||
tests/cases/compiler/classExtendsNull.ts(3,9): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classExtendsNull.ts (1 errors) ====
|
||||
@@ -6,7 +6,7 @@ tests/cases/compiler/classExtendsNull.ts(3,9): error TS17005: A constructor cann
|
||||
constructor() {
|
||||
super();
|
||||
~~~~~~~
|
||||
!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'
|
||||
!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'.
|
||||
return Object.create(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(3,7): error TS2414: Class name cannot be 'any'
|
||||
tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(4,7): error TS2414: Class name cannot be 'number'
|
||||
tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(5,7): error TS2414: Class name cannot be 'boolean'
|
||||
tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(6,7): error TS2414: Class name cannot be 'string'
|
||||
tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(3,7): error TS2414: Class name cannot be 'any'.
|
||||
tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(4,7): error TS2414: Class name cannot be 'number'.
|
||||
tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(5,7): error TS2414: Class name cannot be 'boolean'.
|
||||
tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(6,7): error TS2414: Class name cannot be 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts (4 errors) ====
|
||||
@@ -9,13 +9,13 @@ tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsName
|
||||
|
||||
class any { }
|
||||
~~~
|
||||
!!! error TS2414: Class name cannot be 'any'
|
||||
!!! error TS2414: Class name cannot be 'any'.
|
||||
class number { }
|
||||
~~~~~~
|
||||
!!! error TS2414: Class name cannot be 'number'
|
||||
!!! error TS2414: Class name cannot be 'number'.
|
||||
class boolean { }
|
||||
~~~~~~~
|
||||
!!! error TS2414: Class name cannot be 'boolean'
|
||||
!!! error TS2414: Class name cannot be 'boolean'.
|
||||
class string { }
|
||||
~~~~~~
|
||||
!!! error TS2414: Class name cannot be 'string'
|
||||
!!! error TS2414: Class name cannot be 'string'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/compiler/cloduleSplitAcrossFiles_class.ts (0 errors) ====
|
||||
@@ -7,7 +7,7 @@ tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A nam
|
||||
==== tests/cases/compiler/cloduleSplitAcrossFiles_module.ts (1 errors) ====
|
||||
module D {
|
||||
~
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
export var y = "hi";
|
||||
}
|
||||
D.y;
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
|
||||
|
||||
==== tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts (1 errors) ====
|
||||
// Non-ambient & instantiated module.
|
||||
module Moclodule {
|
||||
~~~~~~~~~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
export interface Someinterface {
|
||||
foo(): void;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
EmitSkipped: true
|
||||
Diagnostics:
|
||||
Cannot write file '/tests/cases/fourslash/b.js' because it would overwrite input file.
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
|
||||
EmitSkipped: false
|
||||
FileName : /tests/cases/fourslash/a.js
|
||||
|
||||
@@ -2,7 +2,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(4,1
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,9): error TS2378: A 'get' accessor must return a value.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,16): error TS2378: A 'get' accessor must return a value.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
@@ -23,7 +23,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,1
|
||||
~~
|
||||
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
||||
~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
set [[0, 1]](v) { }
|
||||
~~~~~~~~
|
||||
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
|
||||
@@ -2,7 +2,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(4,1
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2378: A 'get' accessor must return a value.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2378: A 'get' accessor must return a value.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
@@ -23,7 +23,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,1
|
||||
~~
|
||||
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
||||
~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
set [[0, 1]](v) { }
|
||||
~~~~~~~~
|
||||
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/compiler/constDeclarations-errors.ts(3,7): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/constDeclarations-errors.ts(4,7): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/constDeclarations-errors.ts(5,7): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/constDeclarations-errors.ts(5,11): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/constDeclarations-errors.ts(5,15): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/constDeclarations-errors.ts(5,27): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/constDeclarations-errors.ts(3,7): error TS1155: 'const' declarations must be initialized.
|
||||
tests/cases/compiler/constDeclarations-errors.ts(4,7): error TS1155: 'const' declarations must be initialized.
|
||||
tests/cases/compiler/constDeclarations-errors.ts(5,7): error TS1155: 'const' declarations must be initialized.
|
||||
tests/cases/compiler/constDeclarations-errors.ts(5,11): error TS1155: 'const' declarations must be initialized.
|
||||
tests/cases/compiler/constDeclarations-errors.ts(5,15): error TS1155: 'const' declarations must be initialized.
|
||||
tests/cases/compiler/constDeclarations-errors.ts(5,27): error TS1155: 'const' declarations must be initialized.
|
||||
tests/cases/compiler/constDeclarations-errors.ts(10,27): error TS2540: Cannot assign to 'c8' because it is a constant or a read-only property.
|
||||
tests/cases/compiler/constDeclarations-errors.ts(13,11): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/constDeclarations-errors.ts(13,11): error TS1155: 'const' declarations must be initialized.
|
||||
tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' declarations must be initialized.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constDeclarations-errors.ts (9 errors) ====
|
||||
@@ -14,19 +14,19 @@ tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' d
|
||||
// error, missing intialicer
|
||||
const c1;
|
||||
~~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
const c2: number;
|
||||
~~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
const c3, c4, c5 :string, c6; // error, missing initialicer
|
||||
~~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
~~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
~~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
~~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
|
||||
for(const c in {}) { }
|
||||
|
||||
@@ -38,9 +38,9 @@ tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' d
|
||||
// error, can not be unintalized
|
||||
for(const c9; c9 < 1;) { }
|
||||
~~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
|
||||
// error, can not be unintalized
|
||||
for(const c10 = 0, c11; c10 < 1;) { }
|
||||
~~~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/compiler/constructorAsType.ts(1,5): error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'.
|
||||
Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'
|
||||
Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constructorAsType.ts (1 errors) ====
|
||||
var Person:new () => {name: string;} = function () {return {name:"joe"};};
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'.
|
||||
!!! error TS2322: Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'
|
||||
!!! error TS2322: Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'.
|
||||
|
||||
var Person2:{new() : {name:string;};};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2322: Type '1' is not assignable to type 'X'.
|
||||
tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constructorReturnsInvalidType.ts (2 errors) ====
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2409: Return
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type '1' is not assignable to type 'X'.
|
||||
~~~~~~~~~
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class.
|
||||
}
|
||||
foo() { }
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,9): error TS2322: Type '1' is not assignable to type 'D'.
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class.
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,9): error TS2322: Type '{ x: number; }' is not assignable to type 'F<T>'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts (4 errors) ====
|
||||
@@ -22,7 +22,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignabl
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type '1' is not assignable to type 'D'.
|
||||
~~~~~~~~~
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignabl
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'T'.
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts(15,12): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts(15,12): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts (1 errors) ====
|
||||
@@ -18,6 +18,6 @@ tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts(15,12): error T
|
||||
x;
|
||||
delete x; // No effect
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
x;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file.
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
|
||||
|
||||
!!! error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file.
|
||||
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
==== tests/cases/compiler/a.d.ts (0 errors) ====
|
||||
|
||||
declare class c {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would overwrite input file.
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
|
||||
|
||||
!!! error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would overwrite input file.
|
||||
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
==== tests/cases/compiler/out.d.ts (0 errors) ====
|
||||
|
||||
declare class c {
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
tests/cases/compiler/deleteOperator1.ts(2,25): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/compiler/deleteOperator1.ts(3,21): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/compiler/deleteOperator1.ts(2,25): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/compiler/deleteOperator1.ts(3,21): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/compiler/deleteOperator1.ts(4,5): error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
tests/cases/compiler/deleteOperator1.ts(4,24): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/compiler/deleteOperator1.ts(4,24): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/compiler/deleteOperator1.ts (4 errors) ====
|
||||
var a;
|
||||
var x: boolean = delete a;
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var y: any = delete a;
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var z: number = delete a;
|
||||
~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
||||
tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/compiler/deleteOperatorInStrictMode.ts (2 errors) ====
|
||||
@@ -9,4 +9,4 @@ tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS2703: The opera
|
||||
~
|
||||
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,20): error TS1005: ',' expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,26): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,26): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,27): error TS1109: Expression expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,22): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,22): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,23): error TS1109: Expression expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts (7 errors) ====
|
||||
@@ -16,14 +16,14 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
~~~~~~
|
||||
!!! error TS1005: ',' expected.
|
||||
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
|
||||
// miss an operand
|
||||
var BOOLEAN2 = delete ;
|
||||
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
|
||||
@@ -34,6 +34,6 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
~
|
||||
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,31 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(25,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(26,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(27,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(28,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(29,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(33,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(34,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(42,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(43,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(44,33): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(25,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(26,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(27,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(28,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(29,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(33,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(34,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(42,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(43,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(44,33): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2531: Object is possibly 'null'.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,40): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2531: Object is possibly 'null'.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,40): error TS2531: Object is possibly 'null'.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,45): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,39): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,39): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,47): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(54,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(55,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(57,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,39): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,39): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,47): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(54,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(55,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(57,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts (28 errors) ====
|
||||
@@ -55,30 +55,30 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
// any type var
|
||||
var ResultIsBoolean1 = delete ANY1;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean2 = delete ANY2;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean3 = delete A;
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean4 = delete M;
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean5 = delete obj;
|
||||
~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean6 = delete obj1;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// any type literal
|
||||
var ResultIsBoolean7 = delete undefined;
|
||||
~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean8 = delete null;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// any type expressions
|
||||
var ResultIsBoolean9 = delete ANY2[0];
|
||||
@@ -88,60 +88,60 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
var ResultIsBoolean13 = delete M.n;
|
||||
var ResultIsBoolean14 = delete foo();
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean15 = delete A.foo();
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean16 = delete (ANY + ANY1);
|
||||
~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean17 = delete (null + undefined);
|
||||
~~~~
|
||||
!!! error TS2531: Object is possibly 'null'.
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
var ResultIsBoolean18 = delete (null + null);
|
||||
~~~~
|
||||
!!! error TS2531: Object is possibly 'null'.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~
|
||||
!!! error TS2531: Object is possibly 'null'.
|
||||
var ResultIsBoolean19 = delete (undefined + undefined);
|
||||
~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
|
||||
// multiple delete operators
|
||||
var ResultIsBoolean20 = delete delete ANY;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean21 = delete delete delete (ANY + ANY1);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// miss assignment operators
|
||||
delete ANY;
|
||||
~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete ANY1;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete ANY2[0];
|
||||
delete ANY, ANY1;
|
||||
~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete obj1.x;
|
||||
delete obj1.y;
|
||||
delete objA.a;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(17,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(20,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(21,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(26,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(27,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,38): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(33,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(34,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(35,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(36,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(17,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(20,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(21,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(26,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(27,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,38): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(33,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(34,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(35,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(36,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts (11 errors) ====
|
||||
@@ -30,45 +30,45 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
// boolean type var
|
||||
var ResultIsBoolean1 = delete BOOLEAN;
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// boolean type literal
|
||||
var ResultIsBoolean2 = delete true;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean3 = delete { x: true, y: false };
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// boolean type expressions
|
||||
var ResultIsBoolean4 = delete objA.a;
|
||||
var ResultIsBoolean5 = delete M.n;
|
||||
var ResultIsBoolean6 = delete foo();
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean7 = delete A.foo();
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// multiple delete operator
|
||||
var ResultIsBoolean8 = delete delete BOOLEAN;
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// miss assignment operators
|
||||
delete true;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete BOOLEAN;
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete foo();
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete true, false;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete objA.a;
|
||||
delete M.n;
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(7,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(8,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(11,31): error TS2704: The operand of a delete operator cannot be a read-only property
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(12,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,38): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,38): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,46): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(19,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(20,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(21,8): error TS2704: The operand of a delete operator cannot be a read-only property
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(22,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(7,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(8,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(11,31): error TS2704: The operand of a delete operator cannot be a read-only property.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(12,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,38): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,38): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,46): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(19,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(20,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(21,8): error TS2704: The operand of a delete operator cannot be a read-only property.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(22,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts (13 errors) ====
|
||||
@@ -22,43 +22,43 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
// enum type var
|
||||
var ResultIsBoolean1 = delete ENUM;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean2 = delete ENUM1;
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// enum type expressions
|
||||
var ResultIsBoolean3 = delete ENUM1["A"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2704: The operand of a delete operator cannot be a read-only property
|
||||
!!! error TS2704: The operand of a delete operator cannot be a read-only property.
|
||||
var ResultIsBoolean4 = delete (ENUM[0] + ENUM1["B"]);
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// multiple delete operators
|
||||
var ResultIsBoolean5 = delete delete ENUM;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean6 = delete delete delete (ENUM[0] + ENUM1["B"]);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// miss assignment operators
|
||||
delete ENUM;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete ENUM1;
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete ENUM1.B;
|
||||
~~~~~~~
|
||||
!!! error TS2704: The operand of a delete operator cannot be a read-only property
|
||||
!!! error TS2704: The operand of a delete operator cannot be a read-only property.
|
||||
delete ENUM, ENUM1;
|
||||
~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
@@ -1,20 +1,20 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(18,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(19,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(22,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(23,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(24,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(31,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(32,33): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,39): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,39): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,47): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(39,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(40,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(41,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(42,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(18,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(19,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(22,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(23,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(24,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(31,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(32,33): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,39): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,39): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,47): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(39,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(40,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(41,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(42,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts (17 errors) ====
|
||||
@@ -37,21 +37,21 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
// number type var
|
||||
var ResultIsBoolean1 = delete NUMBER;
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean2 = delete NUMBER1;
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// number type literal
|
||||
var ResultIsBoolean3 = delete 1;
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean4 = delete { x: 1, y: 2};
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean5 = delete { x: 1, y: (n: number) => { return n; } };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// number type expressions
|
||||
var ResultIsBoolean6 = delete objA.a;
|
||||
@@ -59,41 +59,41 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
var ResultIsBoolean8 = delete NUMBER1[0];
|
||||
var ResultIsBoolean9 = delete foo();
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean10 = delete A.foo();
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean11 = delete (NUMBER + NUMBER);
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// multiple delete operator
|
||||
var ResultIsBoolean12 = delete delete NUMBER;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean13 = delete delete delete (NUMBER + NUMBER);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// miss assignment operators
|
||||
delete 1;
|
||||
~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete NUMBER;
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete NUMBER1;
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete foo();
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete objA.a;
|
||||
delete M.n;
|
||||
delete objA.a, M.n;
|
||||
@@ -1,21 +1,21 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(18,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(19,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(22,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(23,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(24,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(31,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(32,33): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(33,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,39): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,32): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,39): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,47): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(40,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(41,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(42,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(43,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(18,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(19,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(22,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(23,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(24,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(31,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(32,33): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(33,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,39): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,32): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,39): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,47): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(40,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(41,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(42,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(43,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts (18 errors) ====
|
||||
@@ -38,21 +38,21 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
// string type var
|
||||
var ResultIsBoolean1 = delete STRING;
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean2 = delete STRING1;
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// string type literal
|
||||
var ResultIsBoolean3 = delete "";
|
||||
~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean4 = delete { x: "", y: "" };
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean5 = delete { x: "", y: (s: string) => { return s; } };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// string type expressions
|
||||
var ResultIsBoolean6 = delete objA.a;
|
||||
@@ -60,42 +60,42 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
|
||||
var ResultIsBoolean8 = delete STRING1[0];
|
||||
var ResultIsBoolean9 = delete foo();
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean10 = delete A.foo();
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean11 = delete (STRING + STRING);
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean12 = delete STRING.charAt(0);
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// multiple delete operator
|
||||
var ResultIsBoolean13 = delete delete STRING;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
var ResultIsBoolean14 = delete delete delete (STRING + STRING);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
// miss assignment operators
|
||||
delete "";
|
||||
~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete STRING;
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete STRING1;
|
||||
~~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete foo();
|
||||
~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete objA.a,M.n;
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/deleteReadonly.ts(8,8): error TS2704: The operand of a delete operator cannot be a read-only property
|
||||
tests/cases/compiler/deleteReadonly.ts(8,8): error TS2704: The operand of a delete operator cannot be a read-only property.
|
||||
tests/cases/compiler/deleteReadonly.ts(18,8): error TS2542: Index signature in type 'B' only permits reading.
|
||||
tests/cases/compiler/deleteReadonly.ts(20,12): error TS2542: Index signature in type 'B' only permits reading.
|
||||
|
||||
@@ -13,7 +13,7 @@ tests/cases/compiler/deleteReadonly.ts(20,12): error TS2542: Index signature in
|
||||
|
||||
delete a.b;
|
||||
~~~
|
||||
!!! error TS2704: The operand of a delete operator cannot be a read-only property
|
||||
!!! error TS2704: The operand of a delete operator cannot be a read-only property.
|
||||
|
||||
interface B {
|
||||
readonly [k: string]: string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/downlevelLetConst11.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode
|
||||
tests/cases/compiler/downlevelLetConst11.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode.
|
||||
tests/cases/compiler/downlevelLetConst11.ts(2,1): error TS2304: Cannot find name 'let'.
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@ tests/cases/compiler/downlevelLetConst11.ts(2,1): error TS2304: Cannot find name
|
||||
"use strict";
|
||||
let
|
||||
~~~
|
||||
!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode
|
||||
!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'let'.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/downlevelLetConst2.ts(1,7): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/downlevelLetConst2.ts(1,7): error TS1155: 'const' declarations must be initialized.
|
||||
|
||||
|
||||
==== tests/cases/compiler/downlevelLetConst2.ts (1 errors) ====
|
||||
const a
|
||||
~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/downlevelLetConst4.ts(1,7): error TS1155: 'const' declarations must be initialized
|
||||
tests/cases/compiler/downlevelLetConst4.ts(1,7): error TS1155: 'const' declarations must be initialized.
|
||||
|
||||
|
||||
==== tests/cases/compiler/downlevelLetConst4.ts (1 errors) ====
|
||||
const a: number
|
||||
~
|
||||
!!! error TS1155: 'const' declarations must be initialized
|
||||
!!! error TS1155: 'const' declarations must be initialized.
|
||||
@@ -3,7 +3,7 @@ tests/cases/compiler/file1.ts(5,10): error TS2300: Duplicate identifier 'f'.
|
||||
tests/cases/compiler/file1.ts(9,12): error TS2300: Duplicate identifier 'x'.
|
||||
tests/cases/compiler/file2.ts(3,10): error TS2300: Duplicate identifier 'C2'.
|
||||
tests/cases/compiler/file2.ts(4,7): error TS2300: Duplicate identifier 'f'.
|
||||
tests/cases/compiler/file2.ts(7,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
tests/cases/compiler/file2.ts(7,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
tests/cases/compiler/file2.ts(8,16): error TS2300: Duplicate identifier 'x'.
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ tests/cases/compiler/file2.ts(8,16): error TS2300: Duplicate identifier 'x'.
|
||||
|
||||
module Foo {
|
||||
~~~
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
|
||||
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
||||
export var x: number; // error for redeclaring var in a different parent
|
||||
~
|
||||
!!! error TS2300: Duplicate identifier 'x'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/duplicateLabel1.ts(3,1): error TS1114: Duplicate label 'target'
|
||||
tests/cases/compiler/duplicateLabel1.ts(3,1): error TS1114: Duplicate label 'target'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/duplicateLabel1.ts (1 errors) ====
|
||||
@@ -6,6 +6,6 @@ tests/cases/compiler/duplicateLabel1.ts(3,1): error TS1114: Duplicate label 'tar
|
||||
target:
|
||||
target:
|
||||
~~~~~~
|
||||
!!! error TS1114: Duplicate label 'target'
|
||||
!!! error TS1114: Duplicate label 'target'.
|
||||
while (true) {
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/duplicateLabel2.ts(4,3): error TS1114: Duplicate label 'target'
|
||||
tests/cases/compiler/duplicateLabel2.ts(4,3): error TS1114: Duplicate label 'target'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/duplicateLabel2.ts (1 errors) ====
|
||||
@@ -7,7 +7,7 @@ tests/cases/compiler/duplicateLabel2.ts(4,3): error TS1114: Duplicate label 'tar
|
||||
while (true) {
|
||||
target:
|
||||
~~~~~~
|
||||
!!! error TS1114: Duplicate label 'target'
|
||||
!!! error TS1114: Duplicate label 'target'.
|
||||
while (true) {
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/duplicateSymbolsExportMatching.ts(43,16): error TS2395: Ind
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(44,9): error TS2395: Individual declarations in merged declaration 'w' must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(45,16): error TS2395: Individual declarations in merged declaration 'w' must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2395: Individual declarations in merged declaration 'F' must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(52,21): error TS2395: Individual declarations in merged declaration 'F' must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(56,11): error TS2395: Individual declarations in merged declaration 'C' must be all exported or all local.
|
||||
tests/cases/compiler/duplicateSymbolsExportMatching.ts(57,12): error TS2395: Individual declarations in merged declaration 'C' must be all exported or all local.
|
||||
@@ -91,7 +91,7 @@ tests/cases/compiler/duplicateSymbolsExportMatching.ts(65,18): error TS2395: Ind
|
||||
~
|
||||
!!! error TS2395: Individual declarations in merged declaration 'F' must be all exported or all local.
|
||||
~
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
|
||||
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
||||
var t;
|
||||
}
|
||||
export function F() { } // Only one error for duplicate identifier (don't consider visibility)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/duplicateVarAndImport2.ts(4,1): error TS2440: Import declaration conflicts with local declaration of 'a'
|
||||
tests/cases/compiler/duplicateVarAndImport2.ts(4,1): error TS2440: Import declaration conflicts with local declaration of 'a'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/duplicateVarAndImport2.ts (1 errors) ====
|
||||
@@ -7,4 +7,4 @@ tests/cases/compiler/duplicateVarAndImport2.ts(4,1): error TS2440: Import declar
|
||||
module M { export var x = 1; }
|
||||
import a = M;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'a'
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'a'.
|
||||
@@ -68,36 +68,36 @@ var __asyncValues = (this && this.__asyncIterator) || function (o) {
|
||||
};
|
||||
function f1() {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var y, y_1, y_1_1, x, _a, e_1, _b;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
var y, y_1, y_1_1, x, e_1_1, e_1, _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_c.trys.push([0, 6, 7, 12]);
|
||||
_b.trys.push([0, 6, 7, 12]);
|
||||
y_1 = __asyncValues(y);
|
||||
return [4 /*yield*/, y_1.next()];
|
||||
case 1:
|
||||
y_1_1 = _c.sent();
|
||||
_c.label = 2;
|
||||
y_1_1 = _b.sent();
|
||||
_b.label = 2;
|
||||
case 2:
|
||||
if (!!y_1_1.done) return [3 /*break*/, 5];
|
||||
x = y_1_1.value;
|
||||
_c.label = 3;
|
||||
_b.label = 3;
|
||||
case 3: return [4 /*yield*/, y_1.next()];
|
||||
case 4:
|
||||
y_1_1 = _c.sent();
|
||||
y_1_1 = _b.sent();
|
||||
return [3 /*break*/, 2];
|
||||
case 5: return [3 /*break*/, 12];
|
||||
case 6:
|
||||
_a = _c.sent();
|
||||
e_1_1 = _b.sent();
|
||||
e_1 = { error: e_1_1 };
|
||||
return [3 /*break*/, 12];
|
||||
case 7:
|
||||
_c.trys.push([7, , 10, 11]);
|
||||
if (!(y_1_1 && !y_1_1.done && (_b = y_1.return))) return [3 /*break*/, 9];
|
||||
return [4 /*yield*/, _b.call(y_1)];
|
||||
_b.trys.push([7, , 10, 11]);
|
||||
if (!(y_1_1 && !y_1_1.done && (_a = y_1.return))) return [3 /*break*/, 9];
|
||||
return [4 /*yield*/, _a.call(y_1)];
|
||||
case 8:
|
||||
_c.sent();
|
||||
_c.label = 9;
|
||||
_b.sent();
|
||||
_b.label = 9;
|
||||
case 9: return [3 /*break*/, 11];
|
||||
case 10:
|
||||
if (e_1) throw e_1.error;
|
||||
@@ -151,36 +151,36 @@ var __asyncValues = (this && this.__asyncIterator) || function (o) {
|
||||
};
|
||||
function f2() {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var x, y, y_1, y_1_1, _a, e_1, _b;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
var x, y, y_1, y_1_1, e_1_1, e_1, _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_c.trys.push([0, 6, 7, 12]);
|
||||
_b.trys.push([0, 6, 7, 12]);
|
||||
y_1 = __asyncValues(y);
|
||||
return [4 /*yield*/, y_1.next()];
|
||||
case 1:
|
||||
y_1_1 = _c.sent();
|
||||
_c.label = 2;
|
||||
y_1_1 = _b.sent();
|
||||
_b.label = 2;
|
||||
case 2:
|
||||
if (!!y_1_1.done) return [3 /*break*/, 5];
|
||||
x = y_1_1.value;
|
||||
_c.label = 3;
|
||||
_b.label = 3;
|
||||
case 3: return [4 /*yield*/, y_1.next()];
|
||||
case 4:
|
||||
y_1_1 = _c.sent();
|
||||
y_1_1 = _b.sent();
|
||||
return [3 /*break*/, 2];
|
||||
case 5: return [3 /*break*/, 12];
|
||||
case 6:
|
||||
_a = _c.sent();
|
||||
e_1_1 = _b.sent();
|
||||
e_1 = { error: e_1_1 };
|
||||
return [3 /*break*/, 12];
|
||||
case 7:
|
||||
_c.trys.push([7, , 10, 11]);
|
||||
if (!(y_1_1 && !y_1_1.done && (_b = y_1.return))) return [3 /*break*/, 9];
|
||||
return [4 /*yield*/, _b.call(y_1)];
|
||||
_b.trys.push([7, , 10, 11]);
|
||||
if (!(y_1_1 && !y_1_1.done && (_a = y_1.return))) return [3 /*break*/, 9];
|
||||
return [4 /*yield*/, _a.call(y_1)];
|
||||
case 8:
|
||||
_c.sent();
|
||||
_c.label = 9;
|
||||
_b.sent();
|
||||
_b.label = 9;
|
||||
case 9: return [3 /*break*/, 11];
|
||||
case 10:
|
||||
if (e_1) throw e_1.error;
|
||||
@@ -239,36 +239,36 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
|
||||
};
|
||||
function f3() {
|
||||
return __asyncGenerator(this, arguments, function f3_1() {
|
||||
var y, y_1, y_1_1, x, _a, e_1, _b;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
var y, y_1, y_1_1, x, e_1_1, e_1, _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_c.trys.push([0, 6, 7, 12]);
|
||||
_b.trys.push([0, 6, 7, 12]);
|
||||
y_1 = __asyncValues(y);
|
||||
return [4 /*yield*/, ["await", y_1.next()]];
|
||||
case 1:
|
||||
y_1_1 = _c.sent();
|
||||
_c.label = 2;
|
||||
y_1_1 = _b.sent();
|
||||
_b.label = 2;
|
||||
case 2:
|
||||
if (!!y_1_1.done) return [3 /*break*/, 5];
|
||||
x = y_1_1.value;
|
||||
_c.label = 3;
|
||||
_b.label = 3;
|
||||
case 3: return [4 /*yield*/, ["await", y_1.next()]];
|
||||
case 4:
|
||||
y_1_1 = _c.sent();
|
||||
y_1_1 = _b.sent();
|
||||
return [3 /*break*/, 2];
|
||||
case 5: return [3 /*break*/, 12];
|
||||
case 6:
|
||||
_a = _c.sent();
|
||||
e_1_1 = _b.sent();
|
||||
e_1 = { error: e_1_1 };
|
||||
return [3 /*break*/, 12];
|
||||
case 7:
|
||||
_c.trys.push([7, , 10, 11]);
|
||||
if (!(y_1_1 && !y_1_1.done && (_b = y_1.return))) return [3 /*break*/, 9];
|
||||
return [4 /*yield*/, ["await", _b.call(y_1)]];
|
||||
_b.trys.push([7, , 10, 11]);
|
||||
if (!(y_1_1 && !y_1_1.done && (_a = y_1.return))) return [3 /*break*/, 9];
|
||||
return [4 /*yield*/, ["await", _a.call(y_1)]];
|
||||
case 8:
|
||||
_c.sent();
|
||||
_c.label = 9;
|
||||
_b.sent();
|
||||
_b.label = 9;
|
||||
case 9: return [3 /*break*/, 11];
|
||||
case 10:
|
||||
if (e_1) throw e_1.error;
|
||||
@@ -327,36 +327,36 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
|
||||
};
|
||||
function f4() {
|
||||
return __asyncGenerator(this, arguments, function f4_1() {
|
||||
var x, y, y_1, y_1_1, _a, e_1, _b;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
var x, y, y_1, y_1_1, e_1_1, e_1, _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_c.trys.push([0, 6, 7, 12]);
|
||||
_b.trys.push([0, 6, 7, 12]);
|
||||
y_1 = __asyncValues(y);
|
||||
return [4 /*yield*/, ["await", y_1.next()]];
|
||||
case 1:
|
||||
y_1_1 = _c.sent();
|
||||
_c.label = 2;
|
||||
y_1_1 = _b.sent();
|
||||
_b.label = 2;
|
||||
case 2:
|
||||
if (!!y_1_1.done) return [3 /*break*/, 5];
|
||||
x = y_1_1.value;
|
||||
_c.label = 3;
|
||||
_b.label = 3;
|
||||
case 3: return [4 /*yield*/, ["await", y_1.next()]];
|
||||
case 4:
|
||||
y_1_1 = _c.sent();
|
||||
y_1_1 = _b.sent();
|
||||
return [3 /*break*/, 2];
|
||||
case 5: return [3 /*break*/, 12];
|
||||
case 6:
|
||||
_a = _c.sent();
|
||||
e_1_1 = _b.sent();
|
||||
e_1 = { error: e_1_1 };
|
||||
return [3 /*break*/, 12];
|
||||
case 7:
|
||||
_c.trys.push([7, , 10, 11]);
|
||||
if (!(y_1_1 && !y_1_1.done && (_b = y_1.return))) return [3 /*break*/, 9];
|
||||
return [4 /*yield*/, ["await", _b.call(y_1)]];
|
||||
_b.trys.push([7, , 10, 11]);
|
||||
if (!(y_1_1 && !y_1_1.done && (_a = y_1.return))) return [3 /*break*/, 9];
|
||||
return [4 /*yield*/, ["await", _a.call(y_1)]];
|
||||
case 8:
|
||||
_c.sent();
|
||||
_c.label = 9;
|
||||
_b.sent();
|
||||
_b.label = 9;
|
||||
case 9: return [3 /*break*/, 11];
|
||||
case 10:
|
||||
if (e_1) throw e_1.error;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/enums/enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'
|
||||
tests/cases/conformance/enums/enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'
|
||||
tests/cases/conformance/enums/enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'
|
||||
tests/cases/conformance/enums/enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'
|
||||
tests/cases/conformance/enums/enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(9,9): error TS2322: Type 'Number' is not assignable to type 'E5'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(26,9): error TS2322: Type '""' is not assignable to type 'E11'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(27,9): error TS2322: Type 'Date' is not assignable to type 'E11'.
|
||||
@@ -13,16 +13,16 @@ tests/cases/conformance/enums/enumErrors.ts(29,9): error TS2322: Type '{}' is no
|
||||
// Enum named with PredefinedTypes
|
||||
enum any { }
|
||||
~~~
|
||||
!!! error TS2431: Enum name cannot be 'any'
|
||||
!!! error TS2431: Enum name cannot be 'any'.
|
||||
enum number { }
|
||||
~~~~~~
|
||||
!!! error TS2431: Enum name cannot be 'number'
|
||||
!!! error TS2431: Enum name cannot be 'number'.
|
||||
enum string { }
|
||||
~~~~~~
|
||||
!!! error TS2431: Enum name cannot be 'string'
|
||||
!!! error TS2431: Enum name cannot be 'string'.
|
||||
enum boolean { }
|
||||
~~~~~~~
|
||||
!!! error TS2431: Enum name cannot be 'boolean'
|
||||
!!! error TS2431: Enum name cannot be 'boolean'.
|
||||
|
||||
// Enum with computed member initializer of type Number
|
||||
enum E5 {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
tests/cases/compiler/enumWithPrimitiveName.ts(1,6): error TS2431: Enum name cannot be 'string'
|
||||
tests/cases/compiler/enumWithPrimitiveName.ts(2,6): error TS2431: Enum name cannot be 'number'
|
||||
tests/cases/compiler/enumWithPrimitiveName.ts(3,6): error TS2431: Enum name cannot be 'any'
|
||||
tests/cases/compiler/enumWithPrimitiveName.ts(1,6): error TS2431: Enum name cannot be 'string'.
|
||||
tests/cases/compiler/enumWithPrimitiveName.ts(2,6): error TS2431: Enum name cannot be 'number'.
|
||||
tests/cases/compiler/enumWithPrimitiveName.ts(3,6): error TS2431: Enum name cannot be 'any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/enumWithPrimitiveName.ts (3 errors) ====
|
||||
enum string { }
|
||||
~~~~~~
|
||||
!!! error TS2431: Enum name cannot be 'string'
|
||||
!!! error TS2431: Enum name cannot be 'string'.
|
||||
enum number { }
|
||||
~~~~~~
|
||||
!!! error TS2431: Enum name cannot be 'number'
|
||||
!!! error TS2431: Enum name cannot be 'number'.
|
||||
enum any { }
|
||||
~~~
|
||||
!!! error TS2431: Enum name cannot be 'any'
|
||||
!!! error TS2431: Enum name cannot be 'any'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(5,8): error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2'
|
||||
tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(5,8): error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2'.
|
||||
tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(7,8): error TS2300: Duplicate identifier 'defaultBinding3'.
|
||||
tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(8,8): error TS2300: Duplicate identifier 'defaultBinding3'.
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(8,8): error TS2300:
|
||||
var x = defaultBinding;
|
||||
import defaultBinding2 from "./es6ImportDefaultBindingMergeErrors_0"; // Should be error
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2'
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2'.
|
||||
var defaultBinding2 = "hello world";
|
||||
import defaultBinding3 from "./es6ImportDefaultBindingMergeErrors_0"; // Should be error
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(4,13): error TS2300: Duplicate identifier 'nameSpaceBinding1'.
|
||||
tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(5,13): error TS2300: Duplicate identifier 'nameSpaceBinding1'.
|
||||
tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(7,8): error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3'
|
||||
tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(7,8): error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_0.ts (0 errors) ====
|
||||
@@ -20,6 +20,6 @@ tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(7,8): error TS2440
|
||||
|
||||
import * as nameSpaceBinding3 from "./es6ImportNameSpaceImportMergeErrors_0"; // should be error
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3'
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3'.
|
||||
var nameSpaceBinding3 = 10;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(5,10): error TS2440: Import declaration conflicts with local declaration of 'x'
|
||||
tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(7,10): error TS2440: Import declaration conflicts with local declaration of 'x44'
|
||||
tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(5,10): error TS2440: Import declaration conflicts with local declaration of 'x'.
|
||||
tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(7,10): error TS2440: Import declaration conflicts with local declaration of 'x44'.
|
||||
tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(9,10): error TS2300: Duplicate identifier 'z'.
|
||||
tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(10,16): error TS2300: Duplicate identifier 'z'.
|
||||
|
||||
@@ -18,11 +18,11 @@ tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(10,16): error TS2300:
|
||||
interface x1 { } // shouldnt be error
|
||||
import { x } from "./es6ImportNamedImportMergeErrors_0"; // should be error
|
||||
~
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'x'
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'x'.
|
||||
var x = 10;
|
||||
import { x as x44 } from "./es6ImportNamedImportMergeErrors_0"; // should be error
|
||||
~~~~~~~~
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'x44'
|
||||
!!! error TS2440: Import declaration conflicts with local declaration of 'x44'.
|
||||
var x44 = 10;
|
||||
import { z } from "./es6ImportNamedImportMergeErrors_0"; // should be error
|
||||
~
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/evalAfter0.ts(4,2): error TS2695: Left side of comma operator is unused and has no side effects.
|
||||
|
||||
|
||||
==== tests/cases/compiler/evalAfter0.ts (1 errors) ====
|
||||
(0,eval)("10"); // fine: special case for eval
|
||||
|
||||
declare var eva;
|
||||
(0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something)
|
||||
~
|
||||
!!! error TS2695: Left side of comma operator is unused and has no side effects.
|
||||
@@ -0,0 +1,9 @@
|
||||
//// [evalAfter0.ts]
|
||||
(0,eval)("10"); // fine: special case for eval
|
||||
|
||||
declare var eva;
|
||||
(0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something)
|
||||
|
||||
//// [evalAfter0.js]
|
||||
(0, eval)("10"); // fine: special case for eval
|
||||
(0, eva)("10"); // error: no side effect left of comma (suspect of missing method name or something)
|
||||
@@ -1,27 +1,27 @@
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,8): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,8): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,13): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,13): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,13): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,13): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,13): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,13): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,13): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,13): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
@@ -110,28 +110,28 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete ++temp ** 3;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete temp-- ** 3;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
delete temp++ ** 3;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
1 ** delete --temp ** 3;
|
||||
@@ -140,28 +140,28 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
1 ** delete ++temp ** 3;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
1 ** delete temp-- ** 3;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
1 ** delete temp++ ** 3;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
typeof --temp ** 3;
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
+16
-16
@@ -19,21 +19,21 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(25,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(26,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(28,9): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(28,9): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(29,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(29,9): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(29,9): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(30,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(30,9): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(30,9): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(31,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(31,9): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(31,9): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(33,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(33,14): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(33,14): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(34,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(34,14): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(34,14): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(35,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(35,14): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(35,14): error TS2703: The operand of a delete operator must be a property reference.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(36,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(36,14): error TS2703: The operand of a delete operator must be a property reference
|
||||
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(36,14): error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts (36 errors) ====
|
||||
@@ -108,40 +108,40 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
(delete ++temp) ** 3;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
(delete temp--) ** 3;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
(delete temp++) ** 3;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
|
||||
1 ** (delete --temp) ** 3;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
1 ** (delete ++temp) ** 3;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
1 ** (delete temp--) ** 3;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
1 ** (delete temp++) ** 3;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference
|
||||
!!! error TS2703: The operand of a delete operator must be a property reference.
|
||||
@@ -1,9 +1,9 @@
|
||||
error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile01.js' because it would overwrite input file.
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
|
||||
|
||||
!!! error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile01.js' because it would overwrite input file.
|
||||
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
==== tests/cases/conformance/salsa/myFile01.js (0 errors) ====
|
||||
|
||||
export default "hello";
|
||||
@@ -1,9 +1,9 @@
|
||||
error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile02.js' because it would overwrite input file.
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
|
||||
|
||||
!!! error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile02.js' because it would overwrite input file.
|
||||
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig
|
||||
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
|
||||
==== tests/cases/conformance/salsa/myFile02.js (0 errors) ====
|
||||
|
||||
export default "hello";
|
||||
@@ -0,0 +1,14 @@
|
||||
/a.ts(2,17): error TS2507: Type 'any' is not a constructor function type.
|
||||
|
||||
|
||||
==== /a.ts (1 errors) ====
|
||||
import Foo from "foo";
|
||||
class A extends Foo { }
|
||||
~~~
|
||||
!!! error TS2507: Type 'any' is not a constructor function type.
|
||||
|
||||
==== /node_modules/foo/index.js (0 errors) ====
|
||||
// Test that extending an untyped module is an error, unlike extending unknownSymbol.
|
||||
|
||||
This file is not read.
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
//// [tests/cases/compiler/extendsUntypedModule.ts] ////
|
||||
|
||||
//// [index.js]
|
||||
// Test that extending an untyped module is an error, unlike extending unknownSymbol.
|
||||
|
||||
This file is not read.
|
||||
|
||||
//// [a.ts]
|
||||
import Foo from "foo";
|
||||
class A extends Foo { }
|
||||
|
||||
|
||||
//// [a.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
exports.__esModule = true;
|
||||
var foo_1 = require("foo");
|
||||
var A = (function (_super) {
|
||||
__extends(A, _super);
|
||||
function A() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
return A;
|
||||
}(foo_1["default"]));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user