Merge remote-tracking branch 'origin/master' into pathMappingModuleResolution

This commit is contained in:
vladima
2015-12-08 21:41:29 -08:00
135 changed files with 1492 additions and 224 deletions
+2 -1
View File
@@ -544,7 +544,8 @@ compileFile(word2mdJs,
// The generated spec.md; built for the 'generate-spec' task
file(specMd, [word2mdJs, specWord], function () {
var specWordFullPath = path.resolve(specWord);
var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" ' + specMd;
var specMDFullPath = path.resolve(specMd);
var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" ' + '"' + specMDFullPath + '"';
console.log(cmd);
child_process.exec(cmd, function () {
complete();
+37
View File
@@ -15017,6 +15017,35 @@ namespace ts {
return getReferencedValueSymbol(node) === argumentsSymbol;
}
function moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean {
let moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression);
if (!moduleSymbol) {
// module not found - be conservative
return true;
}
const hasExportAssignment = getExportAssignmentSymbol(moduleSymbol) !== undefined;
// if module has export assignment then 'resolveExternalModuleSymbol' will return resolved symbol for export assignment
// otherwise it will return moduleSymbol itself
moduleSymbol = resolveExternalModuleSymbol(moduleSymbol);
const symbolLinks = getSymbolLinks(moduleSymbol);
if (symbolLinks.exportsSomeValue === undefined) {
// for export assignments - check if resolved symbol for RHS is itself a value
// otherwise - check if at least one export is value
symbolLinks.exportsSomeValue = hasExportAssignment
? !!(moduleSymbol.flags & SymbolFlags.Value)
: forEachValue(getExportsOfModule(moduleSymbol), isValue);
}
return symbolLinks.exportsSomeValue;
function isValue(s: Symbol): boolean {
s = resolveSymbol(s);
return s && !!(s.flags & SymbolFlags.Value);
}
}
// When resolved as an expression identifier, if the given node references an exported entity, return the declaration
// node of the exported entity's container. Otherwise, return undefined.
function getReferencedExportContainer(node: Identifier): SourceFile | ModuleDeclaration | EnumDeclaration {
@@ -15322,6 +15351,7 @@ namespace ts {
getReferencedValueDeclaration,
getTypeReferenceSerializationKind,
isOptionalParameter,
moduleExportsSomeValue,
isArgumentsLocalBinding,
getExternalModuleFileFromDeclaration
};
@@ -15969,6 +15999,13 @@ namespace ts {
return grammarErrorOnNode((<ShorthandPropertyAssignment>prop).equalsToken, Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);
}
// Modifiers are never allowed on properties except for 'async' on a method declaration
forEach(prop.modifiers, mod => {
if (mod.kind !== SyntaxKind.AsyncKeyword || prop.kind !== SyntaxKind.MethodDeclaration) {
grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));
}
});
// ECMA-262 11.1.5 Object Initialiser
// If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
// a.This production is contained in strict code and IsDataDescriptor(previous) is true and
+1 -1
View File
@@ -435,7 +435,7 @@
"category": "Error",
"code": 1147
},
"Cannot compile modules unless the '--module' flag is provided.": {
"Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.": {
"category": "Error",
"code": 1148
},
+24 -17
View File
@@ -499,7 +499,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
let externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[];
let exportSpecifiers: Map<ExportSpecifier[]>;
let exportEquals: ExportAssignment;
let hasExportStars: boolean;
let hasExportStarsToExportValues: boolean;
let detachedCommentsInfo: { nodePos: number; detachedCommentEndPos: number }[];
@@ -574,7 +574,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
externalImports = undefined;
exportSpecifiers = undefined;
exportEquals = undefined;
hasExportStars = undefined;
hasExportStarsToExportValues = undefined;
detachedCommentsInfo = undefined;
sourceMapData = undefined;
isEs6Module = false;
@@ -1453,6 +1453,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
case SyntaxKind.ForInStatement:
case SyntaxKind.ForOfStatement:
case SyntaxKind.IfStatement:
case SyntaxKind.JsxClosingElement:
case SyntaxKind.JsxSelfClosingElement:
case SyntaxKind.JsxOpeningElement:
case SyntaxKind.JsxSpreadAttribute:
@@ -6230,15 +6231,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
}
else {
// export * from "foo"
writeLine();
write("__export(");
if (modulekind !== ModuleKind.AMD) {
emitRequire(getExternalModuleName(node));
if (hasExportStarsToExportValues && resolver.moduleExportsSomeValue(node.moduleSpecifier)) {
writeLine();
write("__export(");
if (modulekind !== ModuleKind.AMD) {
emitRequire(getExternalModuleName(node));
}
else {
write(generatedName);
}
write(");");
}
else {
write(generatedName);
}
write(");");
}
emitEnd(node);
}
@@ -6326,7 +6329,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
externalImports = [];
exportSpecifiers = {};
exportEquals = undefined;
hasExportStars = false;
hasExportStarsToExportValues = false;
for (const node of sourceFile.statements) {
switch (node.kind) {
case SyntaxKind.ImportDeclaration:
@@ -6349,8 +6352,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
if ((<ExportDeclaration>node).moduleSpecifier) {
if (!(<ExportDeclaration>node).exportClause) {
// export * from "mod"
externalImports.push(<ExportDeclaration>node);
hasExportStars = true;
if (resolver.moduleExportsSomeValue((<ExportDeclaration>node).moduleSpecifier)) {
externalImports.push(<ExportDeclaration>node);
hasExportStarsToExportValues = true;
}
}
else if (resolver.isValueAliasDeclaration(node)) {
// export { x, y } from "mod" where at least one export is a value symbol
@@ -6376,7 +6381,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
}
function emitExportStarHelper() {
if (hasExportStars) {
if (hasExportStarsToExportValues) {
writeLine();
write("function __export(m) {");
increaseIndent();
@@ -6454,7 +6459,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
// should always win over entries with similar names that were added via star exports
// to support this we store names of local/indirect exported entries in a set.
// this set is used to filter names brought by star expors.
if (!hasExportStars) {
if (!hasExportStarsToExportValues) {
// local names set is needed only in presence of star exports
return undefined;
}
@@ -6879,6 +6884,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
write("});");
}
else {
// collectExternalModuleInfo prefilters star exports to keep only ones that export values
// this means that check 'resolver.moduleExportsSomeValue' is redundant and can be omitted here
writeLine();
// export * from 'foo'
// emit as:
@@ -7147,7 +7154,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
externalImports = undefined;
exportSpecifiers = undefined;
exportEquals = undefined;
hasExportStars = false;
hasExportStarsToExportValues = false;
const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false);
emitEmitHelpers(node);
emitCaptureThisForNodeIfNecessary(node);
@@ -7371,7 +7378,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
externalImports = undefined;
exportSpecifiers = undefined;
exportEquals = undefined;
hasExportStars = false;
hasExportStarsToExportValues = false;
emitEmitHelpers(node);
emitCaptureThisForNodeIfNecessary(node);
emitLinesStartingAt(node.statements, startIndex);
+2 -1
View File
@@ -3639,7 +3639,7 @@ namespace ts {
parseExpected(SyntaxKind.OpenBraceToken);
if (token !== SyntaxKind.CloseBraceToken) {
node.expression = parseExpression();
node.expression = parseAssignmentExpressionOrHigher();
}
if (inExpressionContext) {
parseExpected(SyntaxKind.CloseBraceToken);
@@ -3981,6 +3981,7 @@ namespace ts {
}
else {
const propertyAssignment = <PropertyAssignment>createNode(SyntaxKind.PropertyAssignment, fullStart);
propertyAssignment.modifiers = modifiers;
propertyAssignment.name = propertyName;
propertyAssignment.questionToken = questionToken;
parseExpected(SyntaxKind.ColonToken);
+1 -1
View File
@@ -1649,7 +1649,7 @@ namespace ts {
else if (firstExternalModuleSourceFile && languageVersion < ScriptTarget.ES6 && !options.module) {
// We cannot use createDiagnosticFromNode because nodes do not have parents yet
const span = getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator);
programDiagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided));
programDiagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided_Consider_setting_the_module_compiler_option_in_a_tsconfig_json_file));
}
// Cannot specify module gen target of es6 when below es6
+2
View File
@@ -1887,6 +1887,7 @@ namespace ts {
getReferencedValueDeclaration(reference: Identifier): Declaration;
getTypeReferenceSerializationKind(typeName: EntityName): TypeReferenceSerializationKind;
isOptionalParameter(node: ParameterDeclaration): boolean;
moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean;
isArgumentsLocalBinding(node: Identifier): boolean;
getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration): SourceFile;
}
@@ -2005,6 +2006,7 @@ namespace ts {
exportsChecked?: boolean; // True if exports of external module have been checked
isNestedRedeclaration?: boolean; // True if symbol is block scoped redeclaration
bindingElement?: BindingElement; // Binding element associated with property symbol
exportsSomeValue?: boolean; // true if module exports some value (not just types)
}
/* @internal */
+23 -3
View File
@@ -6923,7 +6923,7 @@ interface IDBDatabase extends EventTarget {
onerror: (ev: Event) => any;
version: string;
close(): void;
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
transaction(storeNames: any, mode?: string): IDBTransaction;
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
@@ -6948,10 +6948,11 @@ declare var IDBFactory: {
}
interface IDBIndex {
keyPath: string;
keyPath: string | string[];
name: string;
objectStore: IDBObjectStore;
unique: boolean;
multiEntry: boolean;
count(key?: any): IDBRequest;
get(key: any): IDBRequest;
getKey(key: any): IDBRequest;
@@ -6988,7 +6989,7 @@ interface IDBObjectStore {
add(value: any, key?: any): IDBRequest;
clear(): IDBRequest;
count(key?: any): IDBRequest;
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
delete(key: any): IDBRequest;
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
@@ -12575,6 +12576,16 @@ interface XMLHttpRequestEventTarget {
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
interface IDBObjectStoreParameters {
keyPath?: string | string[];
autoIncrement?: boolean;
}
interface IDBIndexParameters {
unique?: boolean;
multiEntry?: boolean;
}
interface NodeListOf<TNode extends Node> extends NodeList {
length: number;
item(index: number): TNode;
@@ -12610,6 +12621,15 @@ interface ProgressEventInit extends EventInit {
total?: number;
}
interface HTMLTemplateElement extends HTMLElement {
content: DocumentFragment;
}
declare var HTMLTemplateElement: {
prototype: HTMLTemplateElement;
new(): HTMLTemplateElement;
}
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
interface ErrorEventHandler {
+14 -3
View File
@@ -311,7 +311,7 @@ interface IDBDatabase extends EventTarget {
onerror: (ev: Event) => any;
version: string;
close(): void;
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
transaction(storeNames: any, mode?: string): IDBTransaction;
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
@@ -336,10 +336,11 @@ declare var IDBFactory: {
}
interface IDBIndex {
keyPath: string;
keyPath: string | string[];
name: string;
objectStore: IDBObjectStore;
unique: boolean;
multiEntry: boolean;
count(key?: any): IDBRequest;
get(key: any): IDBRequest;
getKey(key: any): IDBRequest;
@@ -376,7 +377,7 @@ interface IDBObjectStore {
add(value: any, key?: any): IDBRequest;
clear(): IDBRequest;
count(key?: any): IDBRequest;
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
delete(key: any): IDBRequest;
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
@@ -892,6 +893,16 @@ interface WorkerUtils extends Object, WindowBase64 {
setTimeout(handler: any, timeout?: any, ...args: any[]): number;
}
interface IDBObjectStoreParameters {
keyPath?: string | string[];
autoIncrement?: boolean;
}
interface IDBIndexParameters {
unique?: boolean;
multiEntry?: boolean;
}
interface BlobPropertyBag {
type?: string;
endings?: string;
+34 -47
View File
@@ -31,8 +31,8 @@ namespace ts.formatting {
* the first token in line so it should be indented
*/
interface DynamicIndentation {
getIndentationForToken(tokenLine: number, tokenKind: SyntaxKind): number;
getIndentationForComment(owningToken: SyntaxKind, tokenIndentation: number): number;
getIndentationForToken(tokenLine: number, tokenKind: SyntaxKind, container: Node): number;
getIndentationForComment(owningToken: SyntaxKind, tokenIndentation: number, container: Node): number;
/**
* Indentation for open and close tokens of the node if it is block or another node that needs special indentation
* ... {
@@ -54,7 +54,7 @@ namespace ts.formatting {
* so bar inherits indentation from foo and bar.delta will be 4
*
*/
getDelta(): number;
getDelta(child: TextRangeWithKind): number;
/**
* Formatter calls this function when rule adds or deletes new lines from the text
* so indentation scope can adjust values of indentation and delta.
@@ -282,19 +282,19 @@ namespace ts.formatting {
*/
function getOwnOrInheritedDelta(n: Node, options: FormatCodeOptions, sourceFile: SourceFile): number {
let previousLine = Constants.Unknown;
let childKind = SyntaxKind.Unknown;
let child: Node;
while (n) {
let line = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)).line;
if (previousLine !== Constants.Unknown && line !== previousLine) {
break;
}
if (SmartIndenter.shouldIndentChildNode(n.kind, childKind)) {
if (SmartIndenter.shouldIndentChildNode(n, child)) {
return options.IndentSize;
}
previousLine = line;
childKind = n.kind;
child = n;
n = n.parent;
}
return 0;
@@ -386,34 +386,7 @@ namespace ts.formatting {
effectiveParentStartLine: number): Indentation {
let indentation = inheritedIndentation;
if (indentation === Constants.Unknown) {
if (isSomeBlock(node.kind)) {
// blocks should be indented in
// - other blocks
// - source file
// - switch\default clauses
if (isSomeBlock(parent.kind) ||
parent.kind === SyntaxKind.SourceFile ||
parent.kind === SyntaxKind.CaseClause ||
parent.kind === SyntaxKind.DefaultClause) {
indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta();
}
else {
indentation = parentDynamicIndentation.getIndentation();
}
}
else {
if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) {
indentation = parentDynamicIndentation.getIndentation();
}
else {
indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta();
}
}
}
var delta = SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown) ? options.IndentSize : 0;
var delta = SmartIndenter.shouldIndentChildNode(node) ? options.IndentSize : 0;
if (effectiveParentStartLine === startLine) {
// if node is located on the same line with the parent
@@ -422,8 +395,17 @@ namespace ts.formatting {
indentation = startLine === lastIndentedLine
? indentationOnLastIndentedLine
: parentDynamicIndentation.getIndentation();
delta = Math.min(options.IndentSize, parentDynamicIndentation.getDelta() + delta);
delta = Math.min(options.IndentSize, parentDynamicIndentation.getDelta(node) + delta);
}
else if (indentation === Constants.Unknown) {
if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) {
indentation = parentDynamicIndentation.getIndentation();
}
else {
indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(node);
}
}
return {
indentation,
delta
@@ -455,7 +437,7 @@ namespace ts.formatting {
function getDynamicIndentation(node: Node, nodeStartLine: number, indentation: number, delta: number): DynamicIndentation {
return {
getIndentationForComment: (kind, tokenIndentation) => {
getIndentationForComment: (kind, tokenIndentation, container) => {
switch (kind) {
// preceding comment to the token that closes the indentation scope inherits the indentation from the scope
// .. {
@@ -464,11 +446,11 @@ namespace ts.formatting {
case SyntaxKind.CloseBraceToken:
case SyntaxKind.CloseBracketToken:
case SyntaxKind.CloseParenToken:
return indentation + delta;
return indentation + getEffectiveDelta(delta, container);
}
return tokenIndentation !== Constants.Unknown ? tokenIndentation : indentation;
},
getIndentationForToken: (line, kind) => {
getIndentationForToken: (line, kind, container) => {
if (nodeStartLine !== line && node.decorators) {
if (kind === getFirstNonDecoratorTokenOfNode(node)) {
// if this token is the first token following the list of decorators, we do not need to indent
@@ -489,13 +471,13 @@ namespace ts.formatting {
return indentation;
default:
// if token line equals to the line of containing node (this is a first token in the node) - use node indentation
return nodeStartLine !== line ? indentation + delta : indentation;
return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
}
},
getIndentation: () => indentation,
getDelta: () => delta,
getDelta: child => getEffectiveDelta(delta, child),
recomputeIndentation: lineAdded => {
if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent.kind, node.kind)) {
if (node.parent && SmartIndenter.shouldIndentChildNode(node.parent, node)) {
if (lineAdded) {
indentation += options.IndentSize;
}
@@ -503,14 +485,19 @@ namespace ts.formatting {
indentation -= options.IndentSize;
}
if (SmartIndenter.shouldIndentChildNode(node.kind, SyntaxKind.Unknown)) {
if (SmartIndenter.shouldIndentChildNode(node)) {
delta = options.IndentSize;
}
else {
delta = 0;
}
}
},
}
}
function getEffectiveDelta(delta: number, child: TextRangeWithKind) {
// Delta value should be zero when the node explicitly prevents indentation of the child node
return SmartIndenter.nodeWillIndentChild(node, child, true) ? delta : 0;
}
}
@@ -610,7 +597,7 @@ namespace ts.formatting {
// if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules
let tokenInfo = formattingScanner.readTokenInfo(child);
Debug.assert(tokenInfo.token.end === child.end);
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation);
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child);
return inheritedIndentation;
}
@@ -679,7 +666,7 @@ namespace ts.formatting {
}
}
function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, dynamicIndentation: DynamicIndentation): void {
function consumeTokenAndAdvanceScanner(currentTokenInfo: TokenInfo, parent: Node, dynamicIndentation: DynamicIndentation, container?: Node): void {
Debug.assert(rangeContainsRange(parent, currentTokenInfo.token));
let lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine();
@@ -720,11 +707,11 @@ namespace ts.formatting {
if (indentToken) {
let tokenIndentation = (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) ?
dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind) :
dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind, container) :
Constants.Unknown;
if (currentTokenInfo.leadingTrivia) {
let commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation);
let commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation, container);
let indentNextTokenOrTrivia = true;
for (let triviaItem of currentTokenInfo.leadingTrivia) {
+7 -7
View File
@@ -123,6 +123,7 @@ namespace ts.formatting {
public SpaceAfterModuleName: Rule;
// Lambda expressions
public SpaceBeforeArrow: Rule;
public SpaceAfterArrow: Rule;
// Optional parameters and let args
@@ -254,7 +255,7 @@ namespace ts.formatting {
// No space before and after indexer
this.NoSpaceBeforeOpenBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.OpenBracketToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
this.NoSpaceAfterCloseBracket = new Rule(RuleDescriptor.create3(SyntaxKind.CloseBracketToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext ), RuleAction.Delete));
this.NoSpaceAfterCloseBracket = new Rule(RuleDescriptor.create3(SyntaxKind.CloseBracketToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), RuleAction.Delete));
// Place a space before open brace in a function declaration
this.FunctionOpenBraceLeftTokenRange = Shared.TokenRange.AnyIncludingMultilineComments;
@@ -342,6 +343,7 @@ namespace ts.formatting {
this.SpaceAfterModuleName = new Rule(RuleDescriptor.create1(SyntaxKind.StringLiteral, SyntaxKind.OpenBraceToken), RuleOperation.create2(new RuleOperationContext(Rules.IsModuleDeclContext), RuleAction.Space));
// Lambda expressions
this.SpaceBeforeArrow = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.EqualsGreaterThanToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
this.SpaceAfterArrow = new Rule(RuleDescriptor.create3(SyntaxKind.EqualsGreaterThanToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
// Optional parameters and let args
@@ -379,8 +381,7 @@ namespace ts.formatting {
this.NoSpaceBeforeTemplateMiddleAndTail = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.TemplateMiddle, SyntaxKind.TemplateTail])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
// These rules are higher in priority than user-configurable rules.
this.HighPriorityCommonRules =
[
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator,
this.NoSpaceAfterQuestionMark,
@@ -411,7 +412,7 @@ namespace ts.formatting {
this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport,
this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords,
this.SpaceAfterModuleName,
this.SpaceAfterArrow,
this.SpaceBeforeArrow, this.SpaceAfterArrow,
this.NoSpaceAfterEllipsis,
this.NoSpaceAfterOptionalParameters,
this.NoSpaceBetweenEmptyInterfaceBraceBrackets,
@@ -427,8 +428,7 @@ namespace ts.formatting {
];
// These rules are lower in priority than user-configurable rules.
this.LowPriorityCommonRules =
[
this.LowPriorityCommonRules = [
this.NoSpaceBeforeSemicolon,
this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock,
this.NoSpaceBeforeComma,
@@ -732,7 +732,7 @@ namespace ts.formatting {
}
static IsStartOfVariableDeclarationList(context: FormattingContext): boolean {
return context.currentTokenParent.kind === SyntaxKind.VariableDeclarationList &&
return context.currentTokenParent.kind === SyntaxKind.VariableDeclarationList &&
context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos;
}
+16 -11
View File
@@ -68,7 +68,7 @@ namespace ts.formatting {
let indentationDelta: number;
while (current) {
if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current.kind, previous ? previous.kind : SyntaxKind.Unknown)) {
if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current, previous)) {
currentStart = getStartLineAndCharacterForNode(current, sourceFile);
if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) {
@@ -153,7 +153,7 @@ namespace ts.formatting {
}
// increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line
if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) {
if (shouldIndentChildNode(parent, current) && !parentAndChildShareLine) {
indentationDelta += options.IndentSize;
}
@@ -466,12 +466,10 @@ namespace ts.formatting {
}
return false;
}
export function shouldIndentChildNode(parent: SyntaxKind, child: SyntaxKind): boolean {
if (nodeContentIsAlwaysIndented(parent)) {
return true;
}
switch (parent) {
export function nodeWillIndentChild(parent: TextRangeWithKind, child: TextRangeWithKind, indentByDefault: boolean) {
let childKind = child ? child.kind : SyntaxKind.Unknown;
switch (parent.kind) {
case SyntaxKind.DoStatement:
case SyntaxKind.WhileStatement:
case SyntaxKind.ForInStatement:
@@ -485,10 +483,17 @@ namespace ts.formatting {
case SyntaxKind.Constructor:
case SyntaxKind.GetAccessor:
case SyntaxKind.SetAccessor:
return child !== SyntaxKind.Block;
default:
return false;
return childKind !== SyntaxKind.Block;
}
// No explicit rule for given nodes so the result will follow the default value argument
return indentByDefault;
}
/*
Function returns true when the parent node should indent the given child by an explicit rule
*/
export function shouldIndentChildNode(parent: TextRangeWithKind, child?: TextRangeWithKind): boolean {
return nodeContentIsAlwaysIndented(parent.kind) || nodeWillIndentChild(parent, child, false);
}
}
}
+2 -1
View File
@@ -3751,7 +3751,8 @@ namespace ts {
// Ignore omitted expressions for missing members
if (m.kind !== SyntaxKind.PropertyAssignment &&
m.kind !== SyntaxKind.ShorthandPropertyAssignment &&
m.kind !== SyntaxKind.BindingElement) {
m.kind !== SyntaxKind.BindingElement &&
m.kind !== SyntaxKind.MethodDeclaration) {
continue;
}
@@ -1,4 +1,4 @@
tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'.
@@ -6,7 +6,7 @@ tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name
==== tests/cases/compiler/ExportAssignment7.ts (3 errors) ====
export class C {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}
export = B;
@@ -1,4 +1,4 @@
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'.
@@ -6,7 +6,7 @@ tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name
==== tests/cases/compiler/ExportAssignment8.ts (3 errors) ====
export = B;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~~~~~~
!!! error TS2309: An export assignment cannot be used in a module with other exported elements.
~
@@ -1,4 +1,4 @@
tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(3,24): error TS2304: Cannot find name 'Point'.
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,36): error TS2304: Cannot find name 'Point'.
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error TS2304: Cannot find name 'Point'.
@@ -7,7 +7,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error
==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (1 errors) ====
export module A {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
export interface Point {
x: number;
y: number;
@@ -1,11 +1,11 @@
tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/ambient/consumer.ts (1 errors) ====
/// <reference path="decls.ts" />
import imp1 = require('equ');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
// Ambient external module members are always exported with or without export keyword when module lacks export assignment
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/externalModules/foo1.ts(9,12): error TS2339: Property 'x' does not exist on type 'C1'.
tests/cases/conformance/externalModules/foo2.ts(8,12): error TS2339: Property 'y' does not exist on type 'C1'.
tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x' does not exist on type 'C1'.
@@ -29,7 +29,7 @@ tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x
==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ====
import foo2 = require('./foo2');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
export module M1 {
export class C1 {
m1: foo2.M1.C1;
@@ -1,4 +1,4 @@
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(1,25): error TS1005: ';' expected.
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(3,1): error TS1128: Declaration or statement expected.
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(4,17): error TS1005: '=' expected.
@@ -7,7 +7,7 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst
==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts (4 errors) ====
export default abstract class A {}
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~
!!! error TS1005: ';' expected.
export abstract class B {}
@@ -1,4 +1,4 @@
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor.
@@ -11,7 +11,7 @@ tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error T
};
export class Test1 {
~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
constructor(private field1: string) {
}
messageHandler = () => {
@@ -1,11 +1,11 @@
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2304: Cannot find name 'field1'.
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (1 errors) ====
export var field1: string;
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts (1 errors) ====
declare var console: {
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS2300: Duplicate identifier 'export='.
tests/cases/conformance/externalModules/foo1.ts(4,1): error TS2300: Duplicate identifier 'export='.
tests/cases/conformance/externalModules/foo2.ts(3,1): error TS2300: Duplicate identifier 'export='.
@@ -17,7 +17,7 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate id
var y = 20;
export = x;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~~~~~~
!!! error TS2300: Duplicate identifier 'export='.
export = y;
@@ -1,7 +1,7 @@
tests/cases/compiler/duplicateLocalVariable1.ts(2,4): error TS1005: ';' expected.
tests/cases/compiler/duplicateLocalVariable1.ts(2,11): error TS1146: Declaration expected.
tests/cases/compiler/duplicateLocalVariable1.ts(2,13): error TS2304: Cannot find name 'commonjs'.
tests/cases/compiler/duplicateLocalVariable1.ts(12,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/duplicateLocalVariable1.ts(12,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/duplicateLocalVariable1.ts(187,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'.
@@ -25,7 +25,7 @@ tests/cases/compiler/duplicateLocalVariable1.ts(187,22): error TS2403: Subsequen
export class TestCase {
~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
constructor (public name: string, public test: ()=>boolean, public errorMessageRegEx?: string) {
}
}
@@ -1,10 +1,10 @@
tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts (1 errors) ====
export class A
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
{
constructor ()
{
@@ -290,7 +290,6 @@ exports.a8 = function_module_2.a;
var class_module_2 = require("class-module");
exports.a0 = class_module_2.a;
// export-star
__export(require("interface"));
__export(require("variable"));
__export(require("interface-variable"));
__export(require("module"));
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
@@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot comp
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
export function x(){
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
return true;
}
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/foo3.ts (0 errors) ====
@@ -7,7 +7,7 @@ tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot comp
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
export function x(){
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
return true;
}
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression expected.
@@ -6,7 +6,7 @@ tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression
var x = 10;
export = typeof x; // Ok
~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
export = "sausages"; // Ok
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/consumer.ts (0 errors) ====
@@ -27,7 +27,7 @@ tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot
var x = "test";
export = x;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/expNumber.ts (0 errors) ====
var x = 42;
@@ -53,7 +53,7 @@ var Bbb;
return SomeType;
})();
Bbb.SomeType = SomeType;
__export(require()); // this line causes the nullref
// this line causes the nullref
})(Bbb || (Bbb = {}));
var a;
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
@@ -12,5 +12,5 @@ tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compi
}
export = M1;
~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
@@ -10,7 +10,7 @@ tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compi
var x: I1 = {a: "test", b: 42};
export = x; // Should fail, I1 not exported.
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
@@ -0,0 +1,19 @@
//// [tests/cases/compiler/exportStarForValues.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export * from "file1"
var x;
//// [file1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [file2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x;
});
@@ -0,0 +1,11 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export * from "file1"
var x;
>x : Symbol(x, Decl(file2.ts, 1, 3))
@@ -0,0 +1,11 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export * from "file1"
var x;
>x : any
@@ -0,0 +1,55 @@
//// [tests/cases/compiler/exportStarForValues10.ts] ////
//// [file0.ts]
export var v = 1;
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export * from "file0";
export * from "file1";
var x = 1;
//// [file0.js]
System.register([], function(exports_1) {
"use strict";
var v;
return {
setters:[],
execute: function() {
exports_1("v", v = 1);
}
}
});
//// [file1.js]
System.register([], function(exports_1) {
"use strict";
return {
setters:[],
execute: function() {
}
}
});
//// [file2.js]
System.register(["file0"], function(exports_1) {
"use strict";
var x;
function exportStar_1(m) {
var exports = {};
for(var n in m) {
if (n !== "default") exports[n] = m[n];
}
exports_1(exports);
}
return {
setters:[
function (file0_1_1) {
exportStar_1(file0_1_1);
}],
execute: function() {
x = 1;
}
}
});
@@ -0,0 +1,16 @@
=== tests/cases/compiler/file0.ts ===
export var v = 1;
>v : Symbol(v, Decl(file0.ts, 1, 10))
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 0, 22))
=== tests/cases/compiler/file2.ts ===
export * from "file0";
export * from "file1";
var x = 1;
>x : Symbol(x, Decl(file2.ts, 2, 3))
@@ -0,0 +1,18 @@
=== tests/cases/compiler/file0.ts ===
export var v = 1;
>v : number
>1 : number
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export * from "file0";
export * from "file1";
var x = 1;
>x : number
>1 : number
@@ -0,0 +1,28 @@
//// [tests/cases/compiler/exportStarForValues2.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export * from "file1"
var x = 1;
//// [file3.ts]
export * from "file2"
var x = 1;
//// [file1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [file2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x = 1;
});
//// [file3.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x = 1;
});
@@ -0,0 +1,16 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export * from "file1"
var x = 1;
>x : Symbol(x, Decl(file2.ts, 1, 3))
=== tests/cases/compiler/file3.ts ===
export * from "file2"
var x = 1;
>x : Symbol(x, Decl(file3.ts, 1, 3))
@@ -0,0 +1,18 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export * from "file1"
var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file3.ts ===
export * from "file2"
var x = 1;
>x : number
>1 : number
@@ -0,0 +1,50 @@
//// [tests/cases/compiler/exportStarForValues3.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export interface A { x }
export * from "file1"
var x = 1;
//// [file3.ts]
export interface B { x }
export * from "file1"
var x = 1;
//// [file4.ts]
export interface C { x }
export * from "file2"
export * from "file3"
var x = 1;
//// [file5.ts]
export * from "file4"
var x = 1;
//// [file1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [file2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x = 1;
});
//// [file3.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x = 1;
});
//// [file4.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x = 1;
});
//// [file5.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x = 1;
});
@@ -0,0 +1,39 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export interface A { x }
>A : Symbol(A, Decl(file2.ts, 0, 0))
>x : Symbol(x, Decl(file2.ts, 0, 20))
export * from "file1"
var x = 1;
>x : Symbol(x, Decl(file2.ts, 2, 3))
=== tests/cases/compiler/file3.ts ===
export interface B { x }
>B : Symbol(B, Decl(file3.ts, 0, 0))
>x : Symbol(x, Decl(file3.ts, 0, 20))
export * from "file1"
var x = 1;
>x : Symbol(x, Decl(file3.ts, 2, 3))
=== tests/cases/compiler/file4.ts ===
export interface C { x }
>C : Symbol(C, Decl(file4.ts, 0, 0))
>x : Symbol(x, Decl(file4.ts, 0, 20))
export * from "file2"
export * from "file3"
var x = 1;
>x : Symbol(x, Decl(file4.ts, 3, 3))
=== tests/cases/compiler/file5.ts ===
export * from "file4"
var x = 1;
>x : Symbol(x, Decl(file5.ts, 1, 3))
@@ -0,0 +1,43 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export interface A { x }
>A : A
>x : any
export * from "file1"
var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file3.ts ===
export interface B { x }
>B : B
>x : any
export * from "file1"
var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file4.ts ===
export interface C { x }
>C : C
>x : any
export * from "file2"
export * from "file3"
var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file5.ts ===
export * from "file4"
var x = 1;
>x : number
>1 : number
@@ -0,0 +1,32 @@
//// [tests/cases/compiler/exportStarForValues4.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export interface A { x }
export * from "file1"
export * from "file3"
var x = 1;
//// [file3.ts]
export interface B { x }
export * from "file2"
var x = 1;
//// [file1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [file3.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x = 1;
});
//// [file2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
var x = 1;
});
@@ -0,0 +1,25 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export interface A { x }
>A : Symbol(A, Decl(file2.ts, 0, 0))
>x : Symbol(x, Decl(file2.ts, 0, 20))
export * from "file1"
export * from "file3"
var x = 1;
>x : Symbol(x, Decl(file2.ts, 3, 3))
=== tests/cases/compiler/file3.ts ===
export interface B { x }
>B : Symbol(B, Decl(file3.ts, 0, 0))
>x : Symbol(x, Decl(file3.ts, 0, 20))
export * from "file2"
var x = 1;
>x : Symbol(x, Decl(file3.ts, 2, 3))
@@ -0,0 +1,27 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export interface A { x }
>A : A
>x : any
export * from "file1"
export * from "file3"
var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file3.ts ===
export interface B { x }
>B : B
>x : any
export * from "file2"
var x = 1;
>x : number
>1 : number
@@ -0,0 +1,18 @@
//// [tests/cases/compiler/exportStarForValues5.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export * from "file1"
export var x;
//// [file1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [file2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
@@ -0,0 +1,11 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export * from "file1"
export var x;
>x : Symbol(x, Decl(file2.ts, 1, 10))
@@ -0,0 +1,11 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export * from "file1"
export var x;
>x : any
@@ -0,0 +1,30 @@
//// [tests/cases/compiler/exportStarForValues6.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export * from "file1"
export var x = 1;
//// [file1.js]
System.register([], function(exports_1) {
"use strict";
return {
setters:[],
execute: function() {
}
}
});
//// [file2.js]
System.register([], function(exports_1) {
"use strict";
var x;
return {
setters:[],
execute: function() {
exports_1("x", x = 1);
}
}
});
@@ -0,0 +1,11 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export * from "file1"
export var x = 1;
>x : Symbol(x, Decl(file2.ts, 1, 10))
@@ -0,0 +1,12 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export * from "file1"
export var x = 1;
>x : number
>1 : number
@@ -0,0 +1,32 @@
//// [tests/cases/compiler/exportStarForValues7.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export * from "file1"
export var x = 1;
//// [file3.ts]
export * from "file2"
export var x = 1;
//// [file1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [file2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
exports.x = 1;
});
//// [file3.js]
define(["require", "exports", "file2"], function (require, exports, file2_1) {
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(file2_1);
exports.x = 1;
});
@@ -0,0 +1,16 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export * from "file1"
export var x = 1;
>x : Symbol(x, Decl(file2.ts, 1, 10))
=== tests/cases/compiler/file3.ts ===
export * from "file2"
export var x = 1;
>x : Symbol(x, Decl(file3.ts, 1, 10))
@@ -0,0 +1,18 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export * from "file1"
export var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file3.ts ===
export * from "file2"
export var x = 1;
>x : number
>1 : number
@@ -0,0 +1,59 @@
//// [tests/cases/compiler/exportStarForValues8.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export interface A { x }
export * from "file1"
export var x = 1;
//// [file3.ts]
export interface B { x }
export * from "file1"
export var x = 1;
//// [file4.ts]
export interface C { x }
export * from "file2"
export * from "file3"
export var x = 1;
//// [file5.ts]
export * from "file4"
export var x = 1;
//// [file1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [file2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
exports.x = 1;
});
//// [file3.js]
define(["require", "exports"], function (require, exports) {
"use strict";
exports.x = 1;
});
//// [file4.js]
define(["require", "exports", "file2", "file3"], function (require, exports, file2_1, file3_1) {
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(file2_1);
__export(file3_1);
exports.x = 1;
});
//// [file5.js]
define(["require", "exports", "file4"], function (require, exports, file4_1) {
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(file4_1);
exports.x = 1;
});
@@ -0,0 +1,39 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export interface A { x }
>A : Symbol(A, Decl(file2.ts, 0, 0))
>x : Symbol(x, Decl(file2.ts, 0, 20))
export * from "file1"
export var x = 1;
>x : Symbol(x, Decl(file2.ts, 2, 10))
=== tests/cases/compiler/file3.ts ===
export interface B { x }
>B : Symbol(B, Decl(file3.ts, 0, 0))
>x : Symbol(x, Decl(file3.ts, 0, 20))
export * from "file1"
export var x = 1;
>x : Symbol(x, Decl(file3.ts, 2, 10))
=== tests/cases/compiler/file4.ts ===
export interface C { x }
>C : Symbol(C, Decl(file4.ts, 0, 0))
>x : Symbol(x, Decl(file4.ts, 0, 20))
export * from "file2"
export * from "file3"
export var x = 1;
>x : Symbol(x, Decl(file4.ts, 3, 10))
=== tests/cases/compiler/file5.ts ===
export * from "file4"
export var x = 1;
>x : Symbol(x, Decl(file5.ts, 1, 10))
@@ -0,0 +1,43 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export interface A { x }
>A : A
>x : any
export * from "file1"
export var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file3.ts ===
export interface B { x }
>B : B
>x : any
export * from "file1"
export var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file4.ts ===
export interface C { x }
>C : C
>x : any
export * from "file2"
export * from "file3"
export var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file5.ts ===
export * from "file4"
export var x = 1;
>x : number
>1 : number
@@ -0,0 +1,40 @@
//// [tests/cases/compiler/exportStarForValues9.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export interface A { x }
export * from "file1"
export * from "file3"
export var x = 1;
//// [file3.ts]
export interface B { x }
export * from "file2"
export var x = 1;
//// [file1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [file3.js]
define(["require", "exports", "file2"], function (require, exports, file2_1) {
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(file2_1);
exports.x = 1;
});
//// [file2.js]
define(["require", "exports", "file3"], function (require, exports, file3_1) {
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(file3_1);
exports.x = 1;
});
@@ -0,0 +1,25 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export interface A { x }
>A : Symbol(A, Decl(file2.ts, 0, 0))
>x : Symbol(x, Decl(file2.ts, 0, 20))
export * from "file1"
export * from "file3"
export var x = 1;
>x : Symbol(x, Decl(file2.ts, 3, 10))
=== tests/cases/compiler/file3.ts ===
export interface B { x }
>B : Symbol(B, Decl(file3.ts, 0, 0))
>x : Symbol(x, Decl(file3.ts, 0, 20))
export * from "file2"
export var x = 1;
>x : Symbol(x, Decl(file3.ts, 2, 10))
@@ -0,0 +1,27 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export interface A { x }
>A : A
>x : any
export * from "file1"
export * from "file3"
export var x = 1;
>x : number
>1 : number
=== tests/cases/compiler/file3.ts ===
export interface B { x }
>B : B
>x : any
export * from "file2"
export var x = 1;
>x : number
>1 : number
@@ -0,0 +1,30 @@
//// [tests/cases/compiler/exportStarForValuesInSystem.ts] ////
//// [file1.ts]
export interface Foo { x }
//// [file2.ts]
export * from "file1"
var x = 1;
//// [file1.js]
System.register([], function(exports_1) {
"use strict";
return {
setters:[],
execute: function() {
}
}
});
//// [file2.js]
System.register([], function(exports_1) {
"use strict";
var x;
return {
setters:[],
execute: function() {
x = 1;
}
}
});
@@ -0,0 +1,11 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Symbol(Foo, Decl(file1.ts, 0, 0))
>x : Symbol(x, Decl(file1.ts, 1, 22))
=== tests/cases/compiler/file2.ts ===
export * from "file1"
var x = 1;
>x : Symbol(x, Decl(file2.ts, 1, 3))
@@ -0,0 +1,12 @@
=== tests/cases/compiler/file1.ts ===
export interface Foo { x }
>Foo : Foo
>x : any
=== tests/cases/compiler/file2.ts ===
export * from "file1"
var x = 1;
>x : number
>1 : number
@@ -1,4 +1,4 @@
tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts (1 errors) ====
@@ -6,5 +6,5 @@ tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148:
// Not on line 0 because we want to verify the error is placed in the appropriate location.
export module M {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}
@@ -1,4 +1,4 @@
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'ObservableArray<T>' incorrectly implements interface 'T[]'.
Property 'length' is missing in type 'ObservableArray<T>'.
@@ -6,7 +6,7 @@ tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'Obse
==== tests/cases/compiler/genericArrayExtenstions.ts (2 errors) ====
export declare class ObservableArray<T> implements Array<T> { // MS.Entertainment.ObservableArray
~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~~~~~~~~~~
!!! error TS2420: Class 'ObservableArray<T>' incorrectly implements interface 'T[]'.
!!! error TS2420: Property 'length' is missing in type 'ObservableArray<T>'.
@@ -1,4 +1,4 @@
tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts (0 errors) ====
@@ -12,7 +12,7 @@ tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(
==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts (1 errors) ====
export module m {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
export function foo() { }
}
@@ -1,4 +1,4 @@
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find module 'externalModule'.
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(2,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces.
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find module 'externalModule'.
@@ -7,7 +7,7 @@ tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): er
==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (4 errors) ====
import b = require("externalModule");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'externalModule'.
declare module "m1" {
@@ -1,4 +1,4 @@
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,9): error TS1029: 'export' modifier must precede 'declare' modifier.
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Module 'x' has no exported member 'c'.
@@ -10,7 +10,7 @@ tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Modul
}
declare export import a = x.c;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~
!!! error TS1029: 'export' modifier must precede 'declare' modifier.
~
@@ -1,5 +1,5 @@
error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
tests/cases/compiler/a.js(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/a.js(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file.
@@ -7,6 +7,6 @@ tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .t
==== tests/cases/compiler/a.js (2 errors) ====
export = b;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~~~~~~
!!! error TS8003: 'export=' can only be used in a .ts file.
@@ -0,0 +1,25 @@
tests/cases/conformance/jsx/file.tsx(12,36): error TS1005: '}' expected.
tests/cases/conformance/jsx/file.tsx(12,44): error TS1003: Identifier expected.
tests/cases/conformance/jsx/file.tsx(12,46): error TS1161: Unterminated regular expression literal.
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
[s: string]: any;
}
}
// This should be a parse error
const class1 = "foo";
const class2 = "bar";
const elem = <div className={class1, class2}/>;
~
!!! error TS1005: '}' expected.
~
!!! error TS1003: Identifier expected.
!!! error TS1161: Unterminated regular expression literal.
@@ -0,0 +1,21 @@
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
[s: string]: any;
}
}
// This should be a parse error
const class1 = "foo";
const class2 = "bar";
const elem = <div className={class1, class2}/>;
//// [file.jsx]
// This should be a parse error
var class1 = "foo";
var class2 = "bar";
var elem = <div className={class1} class2/>;
/>;;
@@ -1,10 +1,10 @@
tests/cases/compiler/mergedModuleDeclarationCodeGen.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/mergedModuleDeclarationCodeGen.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/compiler/mergedModuleDeclarationCodeGen.ts (1 errors) ====
export module X {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
export module Y {
class A {
constructor(Y: any) {
@@ -0,0 +1,24 @@
tests/cases/compiler/modifiersInObjectLiterals.ts(2,2): error TS1042: 'public' modifier cannot be used here.
tests/cases/compiler/modifiersInObjectLiterals.ts(3,2): error TS1042: 'private' modifier cannot be used here.
tests/cases/compiler/modifiersInObjectLiterals.ts(4,2): error TS1042: 'protected' modifier cannot be used here.
tests/cases/compiler/modifiersInObjectLiterals.ts(5,2): error TS1042: 'abstract' modifier cannot be used here.
==== tests/cases/compiler/modifiersInObjectLiterals.ts (4 errors) ====
let data = {
public foo: 'hey',
~~~~~~
!!! error TS1042: 'public' modifier cannot be used here.
private bar: 'nay',
~~~~~~~
!!! error TS1042: 'private' modifier cannot be used here.
protected baz: 'oh my',
~~~~~~~~~
!!! error TS1042: 'protected' modifier cannot be used here.
abstract noWay: 'yes'
~~~~~~~~
!!! error TS1042: 'abstract' modifier cannot be used here.
};
data.foo + data.bar + data.baz + data.noWay
@@ -0,0 +1,19 @@
//// [modifiersInObjectLiterals.ts]
let data = {
public foo: 'hey',
private bar: 'nay',
protected baz: 'oh my',
abstract noWay: 'yes'
};
data.foo + data.bar + data.baz + data.noWay
//// [modifiersInObjectLiterals.js]
var data = {
foo: 'hey',
bar: 'nay',
baz: 'oh my',
noWay: 'yes'
};
data.foo + data.bar + data.baz + data.noWay;
@@ -34,7 +34,6 @@
{
var v;
function foo() { }
__export(require("ambient"));
exports["default"] = v;
var C = (function () {
function C() {
@@ -34,7 +34,6 @@ function blah () {
function blah() {
var v;
function foo() { }
__export(require("ambient"));
exports["default"] = v;
var C = (function () {
function C() {
@@ -37,7 +37,6 @@ var P;
{
var v;
function foo() { }
__export(require("ambient"));
P["default"] = v;
var C = (function () {
function C() {
@@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/externalModules/file1.ts (0 errors) ====
@@ -11,7 +11,7 @@ tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot comp
==== tests/cases/conformance/externalModules/file3.ts (1 errors) ====
export var v3 = true;
~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
var v2 = [1,2,3]; // Module scope. Should not appear in global scope
==== tests/cases/conformance/externalModules/file4.ts (0 errors) ====
@@ -1,5 +1,5 @@
tests/cases/compiler/nonMergedOverloads.ts(1,5): error TS2300: Duplicate identifier 'f'.
tests/cases/compiler/nonMergedOverloads.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/compiler/nonMergedOverloads.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/compiler/nonMergedOverloads.ts(3,17): error TS2300: Duplicate identifier 'f'.
tests/cases/compiler/nonMergedOverloads.ts(4,17): error TS2300: Duplicate identifier 'f'.
@@ -11,7 +11,7 @@ tests/cases/compiler/nonMergedOverloads.ts(4,17): error TS2300: Duplicate identi
export function f();
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~
!!! error TS2300: Duplicate identifier 'f'.
export function f() {
@@ -1,7 +1,10 @@
tests/cases/compiler/objectLiteralMemberWithModifiers1.ts(1,11): error TS1042: 'public' modifier cannot be used here.
tests/cases/compiler/objectLiteralMemberWithModifiers1.ts(1,11): error TS1184: Modifiers cannot appear here.
==== tests/cases/compiler/objectLiteralMemberWithModifiers1.ts (1 errors) ====
==== tests/cases/compiler/objectLiteralMemberWithModifiers1.ts (2 errors) ====
var v = { public foo() { } }
~~~~~~
!!! error TS1042: 'public' modifier cannot be used here.
~~~~~~
!!! error TS1184: Modifiers cannot appear here.
@@ -1,9 +1,12 @@
tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,11): error TS1042: 'public' modifier cannot be used here.
tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,22): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,22): error TS2378: A 'get' accessor must return a value.
==== tests/cases/compiler/objectLiteralMemberWithModifiers2.ts (2 errors) ====
==== tests/cases/compiler/objectLiteralMemberWithModifiers2.ts (3 errors) ====
var v = { public get foo() { } }
~~~~~~
!!! error TS1042: 'public' modifier cannot be used here.
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~~~
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,28): error TS2304: Cannot find name 'DisplayPosition'.
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,45): error TS1137: Expression or comma expected.
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,46): error TS1005: ';' expected.
@@ -38,7 +38,7 @@ tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(3,25): error T
==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (35 errors) ====
export class Game {
~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
private position = new DisplayPosition([), 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 0], NoMove, 0);
~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'DisplayPosition'.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts (1 errors) ====
export class Logger {
~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
public
}
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts (1 errors) ====
export class Logger {
~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
public
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts (1 errors) ====
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,1
export class Logger {
~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
public
}
@@ -1,5 +1,5 @@
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,8): error TS1030: 'export' modifier already seen.
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts (2 errors) ====
@@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21)
~~~~~~
!!! error TS1030: 'export' modifier already seen.
~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
public Bar() {
}
}
@@ -1,9 +1,12 @@
tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts(2,3): error TS1042: 'public' modifier cannot be used here.
tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts(2,14): error TS2378: A 'get' accessor must return a value.
==== tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts (1 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts (2 errors) ====
var v = {
public get foo() { }
~~~~~~
!!! error TS1042: 'public' modifier cannot be used here.
~~~
!!! error TS2378: A 'get' accessor must return a value.
};
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,35): error TS2304: Cannot find name 'HTMLElement'.
tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(2,42): error TS2304: Cannot find name '_classNameRegexp'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(2,42): error T
==== tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts (3 errors) ====
export function removeClass (node:HTMLElement, className:string) {
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'HTMLElement'.
node.className = node.className.replace(_classNameRegexp(className), function (everything, leftDelimiter, name, rightDelimiter) {
@@ -1,11 +1,11 @@
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,18): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,40): error TS2304: Cannot find name 'ILogger'.
==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts (2 errors) ====
export class NullLogger implements ILogger {
~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~~
!!! error TS2304: Cannot find name 'ILogger'.
public information(): boolean { return false; }
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,18): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,43): error TS2304: Cannot find name 'ILogger'.
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(4,37): error TS2304: Cannot find name 'ILogger'.
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(5,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'.
@@ -9,7 +9,7 @@ tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(5,1
export class LoggerAdapter implements ILogger {
~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~~~~~
!!! error TS2304: Cannot find name 'ILogger'.
constructor (public logger: ILogger) {
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts (1 errors) ====
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17)
export enum SignatureFlags {
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
None = 0,
IsIndexer = 1,
IsStringIndexer = 1 << 1,
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts (1 errors) ====
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17)
export enum SignatureFlags {
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
None = 0,
IsIndexer = 1,
IsStringIndexer = 1 << 1,
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts (1 errors) ====
@@ -6,5 +6,5 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17)
export enum SignatureFlags {
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(4,9): error TS1132: Enum member expected.
@@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(4,9):
export enum SignatureFlags {
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
,
~
!!! error TS1132: Enum member expected.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,10): error TS2304: Cannot find name 'foo'.
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts (2 errors) ====
export = foo
~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~
!!! error TS2304: Cannot find name 'foo'.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,10): error TS2304: Cannot find name 'foo'.
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts (2 errors) ====
export = foo;
~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~~~
!!! error TS2304: Cannot find name 'foo'.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,9): error TS1109: Expression expected.
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts (2 errors) ====
export =
~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
!!! error TS1109: Expression expected.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,10): error TS1109: Expression expected.
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts (2 errors) ====
export = ;
~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
~
!!! error TS1109: Expression expected.

Some files were not shown because too many files have changed in this diff Show More