diff --git a/internal/ast/utilities.go b/internal/ast/utilities.go index 9c9d774c61..9dc397aa46 100644 --- a/internal/ast/utilities.go +++ b/internal/ast/utilities.go @@ -2695,6 +2695,10 @@ func IsCheckJSEnabledForFile(sourceFile *SourceFile, compilerOptions *core.Compi return compilerOptions.CheckJs == core.TSTrue } +func IsPlainJSFile(file *SourceFile, checkJs core.Tristate) bool { + return file != nil && (file.ScriptKind == core.ScriptKindJS || file.ScriptKind == core.ScriptKindJSX) && file.CheckJsDirective == nil && checkJs == core.TSUnknown +} + func GetLeftmostAccessExpression(expr *Node) *Node { for IsAccessExpression(expr) { expr = expr.Expression() diff --git a/internal/checker/utilities.go b/internal/checker/utilities.go index ca8704fc60..b3a99b5fa0 100644 --- a/internal/checker/utilities.go +++ b/internal/checker/utilities.go @@ -1586,7 +1586,7 @@ func canIncludeBindAndCheckDiagnostics(sourceFile *ast.SourceFile, options *core isJS := sourceFile.ScriptKind == core.ScriptKindJS || sourceFile.ScriptKind == core.ScriptKindJSX isCheckJS := isJS && ast.IsCheckJSEnabledForFile(sourceFile, options) - isPlainJS := isPlainJSFile(sourceFile, options.CheckJs) + isPlainJS := ast.IsPlainJSFile(sourceFile, options.CheckJs) // By default, only type-check .ts, .tsx, Deferred, plain JS, checked JS and External // - plain JS: .js files with no // ts-check and checkJs: undefined @@ -1595,10 +1595,6 @@ func canIncludeBindAndCheckDiagnostics(sourceFile *ast.SourceFile, options *core return isPlainJS || isCheckJS || sourceFile.ScriptKind == core.ScriptKindDeferred } -func isPlainJSFile(file *ast.SourceFile, checkJs core.Tristate) bool { - return file != nil && (file.ScriptKind == core.ScriptKindJS || file.ScriptKind == core.ScriptKindJSX) && file.CheckJsDirective == nil && checkJs == core.TSUnknown -} - func getEnclosingContainer(node *ast.Node) *ast.Node { return ast.FindAncestor(node.Parent, func(n *ast.Node) bool { return binder.GetContainerFlags(n)&binder.ContainerFlagsIsContainer != 0 diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 4c4f90f208..edb08a1baa 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -411,6 +411,14 @@ func (p *Program) getSemanticDiagnosticsForFile(ctx context.Context, sourceFile if ctx.Err() != nil { return nil } + + isPlainJS := ast.IsPlainJSFile(sourceFile, p.compilerOptions.CheckJs) + if isPlainJS { + diags = core.Filter(diags, func(d *ast.Diagnostic) bool { + return plainJSErrors.Has(d.Code()) + }) + } + if len(sourceFile.CommentDirectives) == 0 { return diags } @@ -797,3 +805,100 @@ func (p *Program) GetJSXRuntimeImportSpecifier(path tspath.Path) (moduleReferenc func (p *Program) GetImportHelpersImportSpecifier(path tspath.Path) *ast.Node { return p.importHelpersImportSpecifiers[path] } + +var plainJSErrors = core.NewSetFromItems( + // binder errors + diagnostics.Cannot_redeclare_block_scoped_variable_0.Code(), + diagnostics.A_module_cannot_have_multiple_default_exports.Code(), + diagnostics.Another_export_default_is_here.Code(), + diagnostics.The_first_export_default_is_here.Code(), + diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.Code(), + diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.Code(), + diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.Code(), + diagnostics.X_constructor_is_a_reserved_word.Code(), + diagnostics.X_delete_cannot_be_called_on_an_identifier_in_strict_mode.Code(), + diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.Code(), + diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.Code(), + diagnostics.Invalid_use_of_0_in_strict_mode.Code(), + diagnostics.A_label_is_not_allowed_here.Code(), + diagnostics.X_with_statements_are_not_allowed_in_strict_mode.Code(), + // grammar errors + diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.Code(), + diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.Code(), + diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name.Code(), + diagnostics.A_class_member_cannot_have_the_0_keyword.Code(), + diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name.Code(), + diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.Code(), + diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.Code(), + diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.Code(), + diagnostics.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.Code(), + diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context.Code(), + diagnostics.A_destructuring_declaration_must_have_an_initializer.Code(), + diagnostics.A_get_accessor_cannot_have_parameters.Code(), + diagnostics.A_rest_element_cannot_contain_a_binding_pattern.Code(), + diagnostics.A_rest_element_cannot_have_a_property_name.Code(), + diagnostics.A_rest_element_cannot_have_an_initializer.Code(), + diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern.Code(), + diagnostics.A_rest_parameter_cannot_have_an_initializer.Code(), + diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.Code(), + diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.Code(), + diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.Code(), + diagnostics.A_set_accessor_cannot_have_rest_parameter.Code(), + diagnostics.A_set_accessor_must_have_exactly_one_parameter.Code(), + diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.Code(), + diagnostics.An_export_declaration_cannot_have_modifiers.Code(), + diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.Code(), + diagnostics.An_import_declaration_cannot_have_modifiers.Code(), + diagnostics.An_object_member_cannot_be_declared_optional.Code(), + diagnostics.Argument_of_dynamic_import_cannot_be_spread_element.Code(), + diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.Code(), + diagnostics.Cannot_redeclare_identifier_0_in_catch_clause.Code(), + diagnostics.Catch_clause_variable_cannot_have_an_initializer.Code(), + diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.Code(), + diagnostics.Classes_can_only_extend_a_single_class.Code(), + diagnostics.Classes_may_not_have_a_field_named_constructor.Code(), + diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.Code(), + diagnostics.Duplicate_label_0.Code(), + diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.Code(), + diagnostics.X_for_await_loops_cannot_be_used_inside_a_class_static_block.Code(), + diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.Code(), + diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.Code(), + diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.Code(), + diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names.Code(), + diagnostics.Jump_target_cannot_cross_function_boundary.Code(), + diagnostics.Line_terminator_not_permitted_before_arrow.Code(), + diagnostics.Modifiers_cannot_appear_here.Code(), + diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.Code(), + diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.Code(), + diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies.Code(), + diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.Code(), + diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.Code(), + diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.Code(), + diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async.Code(), + diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.Code(), + diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.Code(), + diagnostics.Trailing_comma_not_allowed.Code(), + diagnostics.Variable_declaration_list_cannot_be_empty.Code(), + diagnostics.X_0_and_1_operations_cannot_be_mixed_without_parentheses.Code(), + diagnostics.X_0_expected.Code(), + diagnostics.X_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.Code(), + diagnostics.X_0_list_cannot_be_empty.Code(), + diagnostics.X_0_modifier_already_seen.Code(), + diagnostics.X_0_modifier_cannot_appear_on_a_constructor_declaration.Code(), + diagnostics.X_0_modifier_cannot_appear_on_a_module_or_namespace_element.Code(), + diagnostics.X_0_modifier_cannot_appear_on_a_parameter.Code(), + diagnostics.X_0_modifier_cannot_appear_on_class_elements_of_this_kind.Code(), + diagnostics.X_0_modifier_cannot_be_used_here.Code(), + diagnostics.X_0_modifier_must_precede_1_modifier.Code(), + diagnostics.X_0_declarations_can_only_be_declared_inside_a_block.Code(), + diagnostics.X_0_declarations_must_be_initialized.Code(), + diagnostics.X_extends_clause_already_seen.Code(), + diagnostics.X_let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.Code(), + diagnostics.Class_constructor_may_not_be_a_generator.Code(), + diagnostics.Class_constructor_may_not_be_an_accessor.Code(), + diagnostics.X_await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.Code(), + diagnostics.X_await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.Code(), + diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.Code(), + // Type errors + diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.Code(), +) diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.errors.txt deleted file mode 100644 index 5d9354824f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor3_Js.errors.txt +++ /dev/null @@ -1,36 +0,0 @@ -/a.js(24,20): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -/a.js(24,30): error TS2339: Property 'foo' does not exist on type '{ bar: {}; }'. - - -==== /a.js (2 errors) ==== - class A { - get arguments() { - return { bar: {} }; - } - } - - class B extends A { - /** - * Constructor - * - * @param {object} [foo={}] - */ - constructor(foo = {}) { - super(); - - /** - * @type object - */ - this.foo = foo; - - /** - * @type object - */ - this.bar = super.arguments.foo; - ~~~~~~~~~ -!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. - ~~~ -!!! error TS2339: Property 'foo' does not exist on type '{ bar: {}; }'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.errors.txt index c2a5ee43e7..30d6092c3f 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInConstructor4_Js.errors.txt @@ -1,8 +1,7 @@ /a.js(18,9): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. -/a.js(23,24): error TS2339: Property 'bar' does not exist on type 'object'. -==== /a.js (2 errors) ==== +==== /a.js (1 errors) ==== class A { /** * Constructor @@ -28,8 +27,6 @@ * @type object */ this.bar = arguments.bar; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'object'. /** * @type object diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.errors.txt deleted file mode 100644 index 15d923ccba..0000000000 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod3_Js.errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -/a.js(20,18): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. - - -==== /a.js (1 errors) ==== - class A { - get arguments() { - return { bar: {} }; - } - } - - class B extends A { - /** - * @param {object} [foo={}] - */ - m(foo = {}) { - /** - * @type object - */ - this.x = foo; - - /** - * @type object - */ - this.y = super.arguments.bar; - ~~~~~~~~~ -!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.errors.txt b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.errors.txt index f2636e3772..8c90a67da1 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/argumentsReferenceInMethod4_Js.errors.txt @@ -1,8 +1,7 @@ /a.js(16,9): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. -/a.js(21,24): error TS2339: Property 'bar' does not exist on type 'object'. -==== /a.js (2 errors) ==== +==== /a.js (1 errors) ==== class A { /** * @param {object} [foo={}] @@ -26,8 +25,6 @@ * @type object */ this.bar = arguments.bar; - ~~~ -!!! error TS2339: Property 'bar' does not exist on type 'object'. /** * @type object diff --git a/testdata/baselines/reference/submodule/compiler/decoratorInJsFile.errors.txt b/testdata/baselines/reference/submodule/compiler/decoratorInJsFile.errors.txt deleted file mode 100644 index b77bee26ba..0000000000 --- a/testdata/baselines/reference/submodule/compiler/decoratorInJsFile.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -a.js(1,2): error TS2304: Cannot find name 'SomeDecorator'. - - -==== a.js (1 errors) ==== - @SomeDecorator - ~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'SomeDecorator'. - class SomeClass { - foo(x: number) { - - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/decoratorInJsFile1.errors.txt b/testdata/baselines/reference/submodule/compiler/decoratorInJsFile1.errors.txt deleted file mode 100644 index b77bee26ba..0000000000 --- a/testdata/baselines/reference/submodule/compiler/decoratorInJsFile1.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -a.js(1,2): error TS2304: Cannot find name 'SomeDecorator'. - - -==== a.js (1 errors) ==== - @SomeDecorator - ~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'SomeDecorator'. - class SomeClass { - foo(x: number) { - - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/dynamicRequire.errors.txt b/testdata/baselines/reference/submodule/compiler/dynamicRequire.errors.txt deleted file mode 100644 index ccef851b76..0000000000 --- a/testdata/baselines/reference/submodule/compiler/dynamicRequire.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -a.js(2,13): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - - -==== a.js (1 errors) ==== - function foo(name) { - var s = require("t/" + name) - ~~~~~~~ -!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultMarksIdentifierAsUsed.errors.txt b/testdata/baselines/reference/submodule/compiler/exportDefaultMarksIdentifierAsUsed.errors.txt deleted file mode 100644 index 3108e82b5c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultMarksIdentifierAsUsed.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -b.js(3,5): error TS2339: Property 'fn' does not exist on type '{}'. - - -==== a.js (0 errors) ==== - const Obj = {}; - export default Obj; -==== b.js (1 errors) ==== - import Obj from './a'; - - Obj.fn = function() {}; - ~~ -!!! error TS2339: Property 'fn' does not exist on type '{}'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyInitalizationInObjectLiteral.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyInitalizationInObjectLiteral.errors.txt deleted file mode 100644 index d5b7b24ef7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyInitalizationInObjectLiteral.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -foo.js(4,10): error TS2339: Property 'b' does not exist on type 'typeof A'. - - -==== foo.js (1 errors) ==== - module.exports = function () { - class A { } - return { - c: A.b = 1, - ~ -!!! error TS2339: Property 'b' does not exist on type 'typeof A'. - } - }; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.errors.txt index 29ff32d934..ce8dd5f7d5 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileClassPropertyType3.errors.txt @@ -1,13 +1,10 @@ bar.ts(1,1): error TS2322: Type 'string' is not assignable to type 'number'. -foo.js(3,13): error TS2304: Cannot find name 'cond'. -==== foo.js (1 errors) ==== +==== foo.js (0 errors) ==== class C { constructor() { if (cond) { - ~~~~ -!!! error TS2304: Cannot find name 'cond'. this.p = null; } else { diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationConstructorOverloadSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationConstructorOverloadSyntax.errors.txt deleted file mode 100644 index 5850469497..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationConstructorOverloadSyntax.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -a.js(2,3): error TS2390: Constructor implementation is missing. - - -==== a.js (1 errors) ==== - class A { - constructor(); - ~~~~~~~~~~~ -!!! error TS2390: Constructor implementation is missing. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDecoratorSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDecoratorSyntax.errors.txt deleted file mode 100644 index d3236d3555..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDecoratorSyntax.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -a.js(1,2): error TS2304: Cannot find name 'internal'. - - -==== a.js (1 errors) ==== - @internal class C { } - ~~~~~~~~ -!!! error TS2304: Cannot find name 'internal'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt index f5511d2dfc..51e16b7a0c 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt @@ -1,11 +1,8 @@ a.ts(1,10): error TS2393: Duplicate function implementation. -b.js(1,10): error TS2393: Duplicate function implementation. -==== b.js (1 errors) ==== +==== b.js (0 errors) ==== function foo() { - ~~~ -!!! error TS2393: Duplicate function implementation. return 10; } ==== a.ts (1 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt index 6aaf260a16..142ed1352d 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt @@ -1,5 +1,4 @@ a.ts(1,10): error TS2393: Duplicate function implementation. -b.js(1,10): error TS2393: Duplicate function implementation. ==== a.ts (1 errors) ==== @@ -9,10 +8,8 @@ b.js(1,10): error TS2393: Duplicate function implementation. return 30; } -==== b.js (1 errors) ==== +==== b.js (0 errors) ==== function foo() { - ~~~ -!!! error TS2393: Duplicate function implementation. return 10; } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariable.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariable.errors.txt deleted file mode 100644 index 7bc9c4a7c7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariable.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -b.js(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. - - -==== a.ts (0 errors) ==== - var x = 10; - -==== b.js (1 errors) ==== - var x = "hello"; // Error is recorded here, but suppressed because the js file isn't checked - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. -!!! related TS6203 a.ts:1:5: 'x' was also declared here. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt deleted file mode 100644 index ee04553100..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -a.js(1,10): error TS2304: Cannot find name 'b'. - - -==== a.js (1 errors) ==== - export = b; - ~ -!!! error TS2304: Cannot find name 'b'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationExternalPackageError.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationExternalPackageError.errors.txt deleted file mode 100644 index eea2697f49..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationExternalPackageError.errors.txt +++ /dev/null @@ -1,30 +0,0 @@ -moduleA/a.js(1,17): error TS2306: File 'node_modules/b.ts' is not a module. -moduleA/a.js(2,1): error TS2632: Cannot assign to 'a' because it is an import. -moduleA/a.js(3,9): error TS2305: Module '"node_modules/c"' has no exported member 'c'. -moduleA/a.js(4,1): error TS2632: Cannot assign to 'c' because it is an import. -node_modules/c.js(2,1): error TS2304: Cannot find name 'c'. - - -==== moduleA/a.js (4 errors) ==== - import {a} from "b"; - ~~~ -!!! error TS2306: File 'node_modules/b.ts' is not a module. - a++; - ~ -!!! error TS2632: Cannot assign to 'a' because it is an import. - import {c} from "c"; - ~ -!!! error TS2305: Module '"node_modules/c"' has no exported member 'c'. - c++; - ~ -!!! error TS2632: Cannot assign to 'c' because it is an import. - -==== node_modules/b.ts (0 errors) ==== - var a = 10; - -==== node_modules/c.js (1 errors) ==== - exports.a = 10; - c = 10; - ~ -!!! error TS2304: Cannot find name 'c'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt deleted file mode 100644 index f521efc0ef..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -a.js(1,20): error TS2304: Cannot find name 'D'. - - -==== a.js (1 errors) ==== - class C implements D { } - ~ -!!! error TS2304: Cannot find name 'D'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationImportEqualsSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationImportEqualsSyntax.errors.txt deleted file mode 100644 index 9dd77871e6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationImportEqualsSyntax.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -a.js(1,12): error TS2503: Cannot find namespace 'b'. - - -==== a.js (1 errors) ==== - import a = b; - ~ -!!! error TS2503: Cannot find namespace 'b'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetDeclarationOrder.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetDeclarationOrder.errors.txt deleted file mode 100644 index 9d71ba2c8a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetDeclarationOrder.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -b.js(2,1): error TS2448: Block-scoped variable 'b' used before its declaration. - - -==== b.js (1 errors) ==== - let a = 10; - b = 30; - ~ -!!! error TS2448: Block-scoped variable 'b' used before its declaration. -!!! related TS2728 a.ts:1:5: 'b' is declared here. - -==== a.ts (0 errors) ==== - let b = 30; - a = 10; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationMethodOverloadSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationMethodOverloadSyntax.errors.txt deleted file mode 100644 index 7201561785..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationMethodOverloadSyntax.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -a.js(2,3): error TS2391: Function implementation is missing or not immediately following the declaration. - - -==== a.js (1 errors) ==== - class A { - foo(); - ~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt deleted file mode 100644 index 257429fbbb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -a.js(1,15): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. - - -==== a.js (1 errors) ==== - function F(): number { } - ~~~~~~ -!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAliasSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAliasSyntax.errors.txt deleted file mode 100644 index 02c826f575..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAliasSyntax.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -a.js(1,10): error TS2304: Cannot find name 'b'. - - -==== a.js (1 errors) ==== - type a = b; - ~ -!!! error TS2304: Cannot find name 'b'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAliasSyntax.types b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAliasSyntax.types index 06124a6082..616eb435af 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAliasSyntax.types +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAliasSyntax.types @@ -2,5 +2,5 @@ === a.js === type a = b; ->a : b +>a : error diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt index 850b0c5866..dba331382c 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -1,79 +1,34 @@ -a.jsx(1,1): error TS2304: Cannot find name 'Foo'. -a.jsx(1,5): error TS2693: 'number' only refers to a type, but is being used as a value here. a.jsx(1,13): error TS1109: Expression expected. -a.jsx(2,1): error TS2304: Cannot find name 'Foo'. -a.jsx(2,1): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. -a.jsx(2,5): error TS2693: 'number' only refers to a type, but is being used as a value here. -a.jsx(3,1): error TS2304: Cannot find name 'Foo'. -a.jsx(3,1): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'string'. -a.jsx(3,5): error TS2693: 'number' only refers to a type, but is being used as a value here. -a.jsx(4,1): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. a.jsx(4,1): error TS2657: JSX expressions must have one parent element. -a.jsx(4,2): error TS2304: Cannot find name 'Foo'. a.jsx(4,5): error TS1003: Identifier expected. -a.jsx(4,5): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. a.jsx(4,13): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? -a.jsx(4,16): error TS2304: Cannot find name 'Foo'. a.jsx(4,16): error TS17002: Expected corresponding JSX closing tag for 'number'. -a.jsx(5,1): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. a.jsx(5,1): error TS2657: JSX expressions must have one parent element. -a.jsx(5,2): error TS2304: Cannot find name 'Foo'. a.jsx(5,5): error TS1003: Identifier expected. -a.jsx(5,5): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. a.jsx(5,6): error TS17008: JSX element 'number' has no corresponding closing tag. a.jsx(5,14): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? a.jsx(6,1): error TS1005: '(); - ~~~ -!!! error TS2304: Cannot find name 'Foo'. - ~~~~~~ -!!! error TS2693: 'number' only refers to a type, but is being used as a value here. ~ !!! error TS1109: Expression expected. Foo(1); - ~~~ -!!! error TS2304: Cannot find name 'Foo'. - ~~~~~~~~~~~~~~ -!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. - ~~~~~~ -!!! error TS2693: 'number' only refers to a type, but is being used as a value here. Foo``; - ~~~ -!!! error TS2304: Cannot find name 'Foo'. - ~~~~~~~~~~~~~ -!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'string'. - ~~~~~~ -!!! error TS2693: 'number' only refers to a type, but is being used as a value here. >; - ~~~~ -!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. ~~~~~~~~~~~~~~~~~~~ !!! error TS2657: JSX expressions must have one parent element. - ~~~ -!!! error TS2304: Cannot find name 'Foo'. ~ !!! error TS1003: Identifier expected. - ~~~~~~~~ -!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. ~ !!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? ~~~ -!!! error TS2304: Cannot find name 'Foo'. - ~~~ !!! error TS17002: Expected corresponding JSX closing tag for 'number'. />; - ~~~~ -!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. ~~~~~~~~~~~~~~~ - ~~~ -!!! error TS2304: Cannot find name 'Foo'. ~ !!! error TS1003: Identifier expected. - ~~~~~~~~ -!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. ~~~~~~ !!! error TS17008: JSX element 'number' has no corresponding closing tag. ~ diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAssertions.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAssertions.errors.txt index fc2842971e..b4e67ebf93 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAssertions.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAssertions.errors.txt @@ -1,13 +1,10 @@ -/src/a.js(2,9): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. /src/a.js(2,10): error TS17008: JSX element 'string' has no corresponding closing tag. /src/a.js(3,1): error TS1005: 'undefined; - ~~~~~~~~ -!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. ~~~~~~ !!! error TS17008: JSX element 'string' has no corresponding closing tag. diff --git a/testdata/baselines/reference/submodule/compiler/jsFileImportPreservedWhenUsed.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileImportPreservedWhenUsed.errors.txt deleted file mode 100644 index afd42d87b7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileImportPreservedWhenUsed.errors.txt +++ /dev/null @@ -1,35 +0,0 @@ -index.js(11,12): error TS2339: Property 'objects' does not exist on type 'object'. -index.js(13,26): error TS2698: Spread types may only be created from object types. - - -==== dash.d.ts (0 errors) ==== - type ObjectIterator = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult; - - interface LoDashStatic { - mapValues(obj: T | null | undefined, callback: ObjectIterator): { [P in keyof T]: TResult }; - } - declare const _: LoDashStatic; - export = _; -==== Consts.ts (0 errors) ==== - export const INDEX_FIELD = '__INDEX'; -==== index.js (2 errors) ==== - import * as _ from './dash'; - import { INDEX_FIELD } from './Consts'; - - export class Test { - /** - * @param {object} obj - * @param {object} vm - */ - test(obj, vm) { - let index = 0; - vm.objects = _.mapValues( - ~~~~~~~ -!!! error TS2339: Property 'objects' does not exist on type 'object'. - obj, - object => ({ ...object, [INDEX_FIELD]: index++ }), - ~~~~~~~~~ -!!! error TS2698: Spread types may only be created from object types. - ); - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsSelfReferencingArgumentsFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/jsSelfReferencingArgumentsFunction.errors.txt deleted file mode 100644 index 7b9e7ab5cc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsSelfReferencingArgumentsFunction.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -foo.js(4,12): error TS2350: Only a void function can be called with the 'new' keyword. - - -==== foo.js (1 errors) ==== - // Test #16139 - function Foo() { - arguments; - return new Foo(); - ~~~~~~~~~ -!!! error TS2350: Only a void function can be called with the 'new' keyword. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/localRequireFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/localRequireFunction.errors.txt deleted file mode 100644 index 34011fa69c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/localRequireFunction.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -app.js(1,10): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -app.js(5,20): error TS2307: Cannot find module 'fs' or its corresponding type declarations. - - -==== app.js (2 errors) ==== - function require(a) { - ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. - return a; - } - - const fs = require("fs"); - ~~~~ -!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. - const text = fs.readFileSync("/a/b/c"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/misspelledJsDocTypedefTags.errors.txt b/testdata/baselines/reference/submodule/compiler/misspelledJsDocTypedefTags.errors.txt deleted file mode 100644 index f6ec38b604..0000000000 --- a/testdata/baselines/reference/submodule/compiler/misspelledJsDocTypedefTags.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -a.js(2,11): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. -a.js(4,48): error TS2304: Cannot find name 'B'. -a.js(4,49): error TS8020: JSDoc types can only be used inside documentation comments. -a.js(5,11): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. - - -==== a.js (4 errors) ==== - /** @typedef {{ endTime: number, screenshots: number}} A.*/ - Animation.AnimationModel.ScreenshotCapture.Request; - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. - - /** @typedef {{ endTime: number, screenshots: !B.}} */ - ~ -!!! error TS2304: Cannot find name 'B'. - ~ -!!! error TS8020: JSDoc types can only be used inside documentation comments. - Animation.AnimationModel.ScreenshotCapture.Request; - ~~~~~~~~~~~~~~ -!!! error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash1.errors.txt b/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash1.errors.txt index 1c5d236ad6..a7fb9e2f05 100644 --- a/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash1.errors.txt @@ -1,12 +1,9 @@ -a.js(1,2): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. a.js(1,4): error TS1003: Identifier expected. a.js(2,1): error TS1109: Expression expected. -==== a.js (3 errors) ==== +==== a.js (2 errors) ==== ~< < - ~ -!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. ~ !!! error TS1003: Identifier expected. diff --git a/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash2.errors.txt b/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash2.errors.txt index eb358a30c3..758d6a87f8 100644 --- a/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash2.errors.txt @@ -1,11 +1,8 @@ -a.js(1,2): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. a.js(2,1): error TS1109: Expression expected. -==== a.js (2 errors) ==== +==== a.js (1 errors) ==== ~<> < - ~~ -!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. !!! error TS1109: Expression expected. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash3.errors.txt b/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash3.errors.txt index 4d074e469f..af8cae03d2 100644 --- a/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/parseJsxElementInUnaryExpressionNoCrash3.errors.txt @@ -1,16 +1,11 @@ -a.js(1,2): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. -a.js(1,2): error TS2872: This kind of expression is always truthy. a.js(1,3): error TS17008: JSX element '' has no corresponding closing tag. a.js(1,4): error TS1003: Identifier expected. a.js(1,5): error TS1005: '...' expected. a.js(3,1): error TS1005: ' - ~~~~~ -!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - ~~~~~ !!! error TS17008: JSX element '' has no corresponding closing tag. ~ @@ -20,7 +15,4 @@ a.js(3,1): error TS1005: '= (0 | l) && b(288), T = v, A = t, M = 0 | o[(y = e) >> 2], E = 0 | o[(y + 4 | 0) >> 2], w = 0 | o[(y + 8 | 0) >> 2], S = 0 | o[(y + 12 | 0) >> 2], - ~ -!!! error TS2304: Cannot find name 'f'. - ~ -!!! error TS2304: Cannot find name 'f'. - ~ -!!! error TS2304: Cannot find name 'f'. - ~ -!!! error TS2304: Cannot find name 'l'. - ~ -!!! error TS2304: Cannot find name 'b'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - function(e, t, r) { - e |= 0, t |= 0, r |= 0; - var i, a, u, s, c = 0, - d = 0, - h = 0; - for (s = f, (0 | (f = f + 32 | 0)) >= (0 | l) && b(32), i = e, a = t, u = r, d = 0, h = 0; h >>> 0 < u >>> 0;) c = 255 & (0 | n[(a + h | 0) >> 0]) | (255 & (0 | n[(a + (h + 1 | 0) | 0) >> 0])) << 8 | (255 & (0 | n[(a + (h + 2 | 0) | 0) >> 0])) << 16 | (255 & (0 | n[(a + (h + 3 | 0) | 0) >> 0])) << 24, o[(i + (d << 2) | 0) >> 2] = c, d = d + 1 | 0, h = h + 4 | 0; - ~ -!!! error TS2304: Cannot find name 'f'. - ~ -!!! error TS2304: Cannot find name 'f'. - ~ -!!! error TS2304: Cannot find name 'f'. - ~ -!!! error TS2304: Cannot find name 'l'. - ~ -!!! error TS2304: Cannot find name 'b'. - ~ -!!! error TS2304: Cannot find name 'n'. - ~ -!!! error TS2304: Cannot find name 'n'. - ~ -!!! error TS2304: Cannot find name 'n'. - ~ -!!! error TS2304: Cannot find name 'n'. - ~ -!!! error TS2304: Cannot find name 'o'. - f = s - ~ -!!! error TS2304: Cannot find name 'f'. - }(T, A, 64), E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = E + ((((w = (w = (w = w + (606105819 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E & w | (-1 ^ E) & S) + (0 | o[T >> 2]) | 0) - 680876936 | 0) | 0) << 7 | M >>> 25) + E | 0) & E | (-1 ^ M) & w) + (0 | o[(T + 4 | 0) >> 2]) | 0) - 389564586 | 0) | 0) << 12 | S >>> 20) + M | 0) & M | (-1 ^ S) & E) + (0 | o[(T + 8 | 0) >> 2]) | 0) | 0) | 0) << 17 | w >>> 15) + S | 0) & S | (-1 ^ w) & M) + (0 | o[(T + 12 | 0) >> 2]) | 0) - 1044525330 | 0) | 0) << 22 | E >>> 10) + w | 0) + ((((w = (w = (w = w + ((((S = (S = (S = S + (1200080426 + (((M = (M = (M = M + (((E & w | (-1 ^ E) & S) + (0 | o[(T + 16 | 0) >> 2]) | 0) - 176418897 | 0) | 0) << 7 | M >>> 25) + E | 0) & E | (-1 ^ M) & w) + (0 | o[(T + 20 | 0) >> 2]) | 0) | 0) | 0) << 12 | S >>> 20) + M | 0) & M | (-1 ^ S) & E) + (0 | o[(T + 24 | 0) >> 2]) | 0) - 1473231341 | 0) | 0) << 17 | w >>> 15) + S | 0) & S | (-1 ^ w) & M) + (0 | o[(T + 28 | 0) >> 2]) | 0) - 45705983 | 0) | 0) << 22 | E >>> 10) + w | 0) + ((((w = (w = (w = w + ((((S = (S = (S = S + ((((M = (M = (M = M + (1770035416 + ((E & w | (-1 ^ E) & S) + (0 | o[(T + 32 | 0) >> 2]) | 0) | 0) | 0) << 7 | M >>> 25) + E | 0) & E | (-1 ^ M) & w) + (0 | o[(T + 36 | 0) >> 2]) | 0) - 1958414417 | 0) | 0) << 12 | S >>> 20) + M | 0) & M | (-1 ^ S) & E) + (0 | o[(T + 40 | 0) >> 2]) | 0) - 42063 | 0) | 0) << 17 | w >>> 15) + S | 0) & S | (-1 ^ w) & M) + (0 | o[(T + 44 | 0) >> 2]) | 0) - 1990404162 | 0) | 0) << 22 | E >>> 10) + w | 0) + (1236535329 + (((w = (w = (w = w + ((((S = (S = (S = S + ((((M = (M = (M = M + (1804603682 + ((E & w | (-1 ^ E) & S) + (0 | o[(T + 48 | 0) >> 2]) | 0) | 0) | 0) << 7 | M >>> 25) + E | 0) & E | (-1 ^ M) & w) + (0 | o[(T + 52 | 0) >> 2]) | 0) - 40341101 | 0) | 0) << 12 | S >>> 20) + M | 0) & M | (-1 ^ S) & E) + (0 | o[(T + 56 | 0) >> 2]) | 0) - 1502002290 | 0) | 0) << 17 | w >>> 15) + S | 0) & S | (-1 ^ w) & M) + (0 | o[(T + 60 | 0) >> 2]) | 0) | 0) | 0) << 22 | E >>> 10) + w | 0) + ((((w = (w = (w = w + (643717713 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E & S | w & (-1 ^ S)) + (0 | o[(T + 4 | 0) >> 2]) | 0) - 165796510 | 0) | 0) << 5 | M >>> 27) + E | 0) & w | E & (-1 ^ w)) + (0 | o[(T + 24 | 0) >> 2]) | 0) - 1069501632 | 0) | 0) << 9 | S >>> 23) + M | 0) & E | M & (-1 ^ E)) + (0 | o[(T + 44 | 0) >> 2]) | 0) | 0) | 0) << 14 | w >>> 18) + S | 0) & M | S & (-1 ^ M)) + (0 | o[T >> 2]) | 0) - 373897302 | 0) | 0) << 20 | E >>> 12) + w | 0) + ((((w = (w = (w = w + ((((S = (S = (S = S + (38016083 + (((M = (M = (M = M + (((E & S | w & (-1 ^ S)) + (0 | o[(T + 20 | 0) >> 2]) | 0) - 701558691 | 0) | 0) << 5 | M >>> 27) + E | 0) & w | E & (-1 ^ w)) + (0 | o[(T + 40 | 0) >> 2]) | 0) | 0) | 0) << 9 | S >>> 23) + M | 0) & E | M & (-1 ^ E)) + (0 | o[(T + 60 | 0) >> 2]) | 0) - 660478335 | 0) | 0) << 14 | w >>> 18) + S | 0) & M | S & (-1 ^ M)) + (0 | o[(T + 16 | 0) >> 2]) | 0) - 405537848 | 0) | 0) << 20 | E >>> 12) + w | 0) + (1163531501 + (((w = (w = (w = w + ((((S = (S = (S = S + ((((M = (M = (M = M + (568446438 + ((E & S | w & (-1 ^ S)) + (0 | o[(T + 36 | 0) >> 2]) | 0) | 0) | 0) << 5 | M >>> 27) + E | 0) & w | E & (-1 ^ w)) + (0 | o[(T + 56 | 0) >> 2]) | 0) - 1019803690 | 0) | 0) << 9 | S >>> 23) + M | 0) & E | M & (-1 ^ E)) + (0 | o[(T + 12 | 0) >> 2]) | 0) - 187363961 | 0) | 0) << 14 | w >>> 18) + S | 0) & M | S & (-1 ^ M)) + (0 | o[(T + 32 | 0) >> 2]) | 0) | 0) | 0) << 20 | E >>> 12) + w | 0) + ((((w = (w = (w = w + (1735328473 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E & S | w & (-1 ^ S)) + (0 | o[(T + 52 | 0) >> 2]) | 0) - 1444681467 | 0) | 0) << 5 | M >>> 27) + E | 0) & w | E & (-1 ^ w)) + (0 | o[(T + 8 | 0) >> 2]) | 0) - 51403784 | 0) | 0) << 9 | S >>> 23) + M | 0) & E | M & (-1 ^ E)) + (0 | o[(T + 28 | 0) >> 2]) | 0) | 0) | 0) << 14 | w >>> 18) + S | 0) & M | S & (-1 ^ M)) + (0 | o[(T + 48 | 0) >> 2]) | 0) - 1926607734 | 0) | 0) << 20 | E >>> 12) + w | 0) + ((((w = (w = (w = w + (1839030562 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E ^ w ^ S) + (0 | o[(T + 20 | 0) >> 2]) | 0) - 378558 | 0) | 0) << 4 | M >>> 28) + E | 0) ^ E ^ w) + (0 | o[(T + 32 | 0) >> 2]) | 0) - 2022574463 | 0) | 0) << 11 | S >>> 21) + M | 0) ^ M ^ E) + (0 | o[(T + 44 | 0) >> 2]) | 0) | 0) | 0) << 16 | w >>> 16) + S | 0) ^ S ^ M) + (0 | o[(T + 56 | 0) >> 2]) | 0) - 35309556 | 0) | 0) << 23 | E >>> 9) + w | 0) + ((((w = (w = (w = w + ((((S = (S = (S = S + (1272893353 + (((M = (M = (M = M + (((E ^ w ^ S) + (0 | o[(T + 4 | 0) >> 2]) | 0) - 1530992060 | 0) | 0) << 4 | M >>> 28) + E | 0) ^ E ^ w) + (0 | o[(T + 16 | 0) >> 2]) | 0) | 0) | 0) << 11 | S >>> 21) + M | 0) ^ M ^ E) + (0 | o[(T + 28 | 0) >> 2]) | 0) - 155497632 | 0) | 0) << 16 | w >>> 16) + S | 0) ^ S ^ M) + (0 | o[(T + 40 | 0) >> 2]) | 0) - 1094730640 | 0) | 0) << 23 | E >>> 9) + w | 0) + (76029189 + (((w = (w = (w = w + ((((S = (S = (S = S + ((((M = (M = (M = M + (681279174 + ((E ^ w ^ S) + (0 | o[(T + 52 | 0) >> 2]) | 0) | 0) | 0) << 4 | M >>> 28) + E | 0) ^ E ^ w) + (0 | o[T >> 2]) | 0) - 358537222 | 0) | 0) << 11 | S >>> 21) + M | 0) ^ M ^ E) + (0 | o[(T + 12 | 0) >> 2]) | 0) - 722521979 | 0) | 0) << 16 | w >>> 16) + S | 0) ^ S ^ M) + (0 | o[(T + 24 | 0) >> 2]) | 0) | 0) | 0) << 23 | E >>> 9) + w | 0) + ((((w = (w = (w = w + (530742520 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E ^ w ^ S) + (0 | o[(T + 36 | 0) >> 2]) | 0) - 640364487 | 0) | 0) << 4 | M >>> 28) + E | 0) ^ E ^ w) + (0 | o[(T + 48 | 0) >> 2]) | 0) - 421815835 | 0) | 0) << 11 | S >>> 21) + M | 0) ^ M ^ E) + (0 | o[(T + 60 | 0) >> 2]) | 0) | 0) | 0) << 16 | w >>> 16) + S | 0) ^ S ^ M) + (0 | o[(T + 8 | 0) >> 2]) | 0) - 995338651 | 0) | 0) << 23 | E >>> 9) + w | 0) + ((((S = (S = (S = S + (1126891415 + ((E ^ ((M = (M = (M = M + (((w ^ (E | -1 ^ S)) + (0 | o[T >> 2]) | 0) - 198630844 | 0) | 0) << 6 | M >>> 26) + E | 0) | -1 ^ w)) + (0 | o[(T + 28 | 0) >> 2]) | 0) | 0) | 0) << 10 | S >>> 22) + M | 0) ^ ((w = (w = (w = w + (((M ^ (S | -1 ^ E)) + (0 | o[(T + 56 | 0) >> 2]) | 0) - 1416354905 | 0) | 0) << 15 | w >>> 17) + S | 0) | -1 ^ M)) + (0 | o[(T + 20 | 0) >> 2]) | 0) - 57434055 | 0) | 0) << 21 | E >>> 11) + w | 0) + ((((S = (S = (S = S + (((E ^ ((M = (M = (M = M + (1700485571 + ((w ^ (E | -1 ^ S)) + (0 | o[(T + 48 | 0) >> 2]) | 0) | 0) | 0) << 6 | M >>> 26) + E | 0) | -1 ^ w)) + (0 | o[(T + 12 | 0) >> 2]) | 0) - 1894986606 | 0) | 0) << 10 | S >>> 22) + M | 0) ^ ((w = (w = (w = w + (((M ^ (S | -1 ^ E)) + (0 | o[(T + 40 | 0) >> 2]) | 0) - 1051523 | 0) | 0) << 15 | w >>> 17) + S | 0) | -1 ^ M)) + (0 | o[(T + 4 | 0) >> 2]) | 0) - 2054922799 | 0) | 0) << 21 | E >>> 11) + w | 0) + (1309151649 + (((S = (S = (S = S + (((E ^ ((M = (M = (M = M + (1873313359 + ((w ^ (E | -1 ^ S)) + (0 | o[(T + 32 | 0) >> 2]) | 0) | 0) | 0) << 6 | M >>> 26) + E | 0) | -1 ^ w)) + (0 | o[(T + 60 | 0) >> 2]) | 0) - 30611744 | 0) | 0) << 10 | S >>> 22) + M | 0) ^ ((w = (w = (w = w + (((M ^ (S | -1 ^ E)) + (0 | o[(T + 24 | 0) >> 2]) | 0) - 1560198380 | 0) | 0) << 15 | w >>> 17) + S | 0) | -1 ^ M)) + (0 | o[(T + 52 | 0) >> 2]) | 0) | 0) | 0) << 21 | E >>> 11) + w | 0) + ((((S = (S = (S = S + (((E ^ ((M = (M = (M = M + (((w ^ (E | -1 ^ S)) + (0 | o[(T + 16 | 0) >> 2]) | 0) - 145523070 | 0) | 0) << 6 | M >>> 26) + E | 0) | -1 ^ w)) + (0 | o[(T + 44 | 0) >> 2]) | 0) - 1120210379 | 0) | 0) << 10 | S >>> 22) + M | 0) ^ ((w = (w = (w = w + (718787259 + ((M ^ (S | -1 ^ E)) + (0 | o[(T + 8 | 0) >> 2]) | 0) | 0) | 0) << 15 | w >>> 17) + S | 0) | -1 ^ M)) + (0 | o[(T + 36 | 0) >> 2]) | 0) - 343485551 | 0) | 0) << 21 | E >>> 11) + w | 0, r = M, a = (0 | o[(i = y) >> 2]) + r | 0, o[i >> 2] = a, u = E, c = (0 | o[(s = y + 4 | 0) >> 2]) + u | 0, o[s >> 2] = c, d = w, p = (0 | o[(h = y + 8 | 0) >> 2]) + d | 0, o[h >> 2] = p, _ = S, g = (0 | o[(m = y + 12 | 0) >> 2]) + _ | 0, o[m >> 2] = g, f = v - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'o'. - ~ -!!! error TS2304: Cannot find name 'f'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/reactImportDropped.errors.txt b/testdata/baselines/reference/submodule/compiler/reactImportDropped.errors.txt deleted file mode 100644 index ea16c44b14..0000000000 --- a/testdata/baselines/reference/submodule/compiler/reactImportDropped.errors.txt +++ /dev/null @@ -1,50 +0,0 @@ -src/components/TabBar.js(1,16): error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. -src/modules/navigation/NavigationView.js(2,22): error TS2307: Cannot find module '../../utils/theme' or its corresponding type declarations. -src/modules/navigation/NavigationView.js(3,12): error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. -src/modules/navigation/NavigationView.js(3,19): error TS2322: Type '{ height: any; }' is not assignable to type 'ClassicComponentClass'. - Property 'height' does not exist on type 'ClassicComponentClass'. - - -==== react.d.ts (0 errors) ==== - export = React; - export as namespace React; - - declare namespace React { - - function createClass(spec: any): ClassicComponentClass; - - interface ClassicComponentClass { - new (props?: any): ClassicComponentClass; - } - } - - declare global { - namespace JSX { - interface ElementAttributesProperty { } - } - } - - -==== src/components/TabBar.js (1 errors) ==== - export default React.createClass({ - ~~~~~ -!!! error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. - render() { - return ( - null - ); - } - }); - -==== src/modules/navigation/NavigationView.js (3 errors) ==== - import TabBar from '../../components/TabBar'; - import {layout} from '../../utils/theme'; // <- DO NOT DROP this import - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module '../../utils/theme' or its corresponding type declarations. - const x = ; - ~~~~~~ -!!! error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. - ~~~~~~ -!!! error TS2322: Type '{ height: any; }' is not assignable to type 'ClassicComponentClass'. -!!! error TS2322: Property 'height' does not exist on type 'ClassicComponentClass'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/requireAsFunctionInExternalModule.errors.txt b/testdata/baselines/reference/submodule/compiler/requireAsFunctionInExternalModule.errors.txt deleted file mode 100644 index 1df93c364d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/requireAsFunctionInExternalModule.errors.txt +++ /dev/null @@ -1,23 +0,0 @@ -c.js(1,25): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -m.js(1,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. - - -==== c.js (1 errors) ==== - export default function require(a) { } - ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. - export function has(a) { return true } - -==== m.js (1 errors) ==== - import require, { has } from "./c" - ~~~~~~~ -!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. - export function hello() { } - if (has('ember-debug')) { - require('ember-debug'); - } - -==== m2.ts (0 errors) ==== - import { hello } from "./m"; - hello(); - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.errors.txt b/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.errors.txt deleted file mode 100644 index c0b7cc2fda..0000000000 --- a/testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.errors.txt +++ /dev/null @@ -1,27 +0,0 @@ -File.js(3,9): error TS2335: 'super' can only be referenced in a derived class. -File.js(3,29): error TS2461: Type 'IArguments' is not an array type. -File.js(9,5): error TS2416: Property 'initialize' in type 'Child' is not assignable to the same property in base type 'Parent'. - Type '() => void' is not assignable to type '() => string'. - Type 'void' is not assignable to type 'string'. - - -==== File.js (3 errors) ==== - class Parent { - initialize() { - super.initialize(...arguments) - ~~~~~ -!!! error TS2335: 'super' can only be referenced in a derived class. - ~~~~~~~~~ -!!! error TS2461: Type 'IArguments' is not an array type. - return this.asdf = '' - } - } - - class Child extends Parent { - initialize() { - ~~~~~~~~~~ -!!! error TS2416: Property 'initialize' in type 'Child' is not assignable to the same property in base type 'Parent'. -!!! error TS2416: Type '() => void' is not assignable to type '() => string'. -!!! error TS2416: Type 'void' is not assignable to type 'string'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/usedImportNotElidedInJs.errors.txt b/testdata/baselines/reference/submodule/compiler/usedImportNotElidedInJs.errors.txt deleted file mode 100644 index 8d394f9dba..0000000000 --- a/testdata/baselines/reference/submodule/compiler/usedImportNotElidedInJs.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -test.js(1,25): error TS2307: Cannot find module 'moment' or its corresponding type declarations. -test.js(2,35): error TS2307: Cannot find module 'moment' or its corresponding type declarations. -test.js(3,48): error TS2448: Block-scoped variable 'moment' used before its declaration. - - -==== test.js (3 errors) ==== - import * as moment from 'moment'; - ~~~~~~~~ -!!! error TS2307: Cannot find module 'moment' or its corresponding type declarations. - import rollupMoment__default from 'moment'; - ~~~~~~~~ -!!! error TS2307: Cannot find module 'moment' or its corresponding type declarations. - export const moment = rollupMoment__default || moment; - ~~~~~~ -!!! error TS2448: Block-scoped variable 'moment' used before its declaration. -!!! related TS2728 test.js:3:14: 'moment' is declared here. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es2015).errors.txt b/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es2015).errors.txt deleted file mode 100644 index 40cca7edf5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es2015).errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -computedPropertyNames52.js(4,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames52.js(4,9): error TS2411: Property '[i]' of type '() => typeof C' is not assignable to 'number' index type 'number'. -computedPropertyNames52.js(5,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== computedPropertyNames52.js (3 errors) ==== - const array = []; - for (let i = 0; i < 10; ++i) { - array.push(class C { - [i] = () => C; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS2411: Property '[i]' of type '() => typeof C' is not assignable to 'number' index type 'number'. - static [i] = 100; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - }) - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es5).errors.txt b/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es5).errors.txt deleted file mode 100644 index 40cca7edf5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es5).errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -computedPropertyNames52.js(4,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames52.js(4,9): error TS2411: Property '[i]' of type '() => typeof C' is not assignable to 'number' index type 'number'. -computedPropertyNames52.js(5,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== computedPropertyNames52.js (3 errors) ==== - const array = []; - for (let i = 0; i < 10; ++i) { - array.push(class C { - [i] = () => C; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS2411: Property '[i]' of type '() => typeof C' is not assignable to 'number' index type 'number'. - static [i] = 100; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - }) - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/constructorTagOnNestedBinaryExpression.errors.txt b/testdata/baselines/reference/submodule/conformance/constructorTagOnNestedBinaryExpression.errors.txt deleted file mode 100644 index 3d3c40aaf9..0000000000 --- a/testdata/baselines/reference/submodule/conformance/constructorTagOnNestedBinaryExpression.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -constructorTagOnNestedBinaryExpression.js(3,1): error TS2304: Cannot find name 'a'. -constructorTagOnNestedBinaryExpression.js(3,5): error TS2304: Cannot find name 'b'. - - -==== constructorTagOnNestedBinaryExpression.js (2 errors) ==== - // Fixes #35021 - /** @constructor */ - a = b = function c () { - ~ -!!! error TS2304: Cannot find name 'a'. - ~ -!!! error TS2304: Cannot find name 'b'. - console.log(this) - }; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-exportModifier.errors.txt b/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-exportModifier.errors.txt deleted file mode 100644 index ef9560360d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-exportModifier.errors.txt +++ /dev/null @@ -1,45 +0,0 @@ -file3.js(2,8): error TS1206: Decorators are not valid here. -file6.js(2,13): error TS8038: Decorators may not appear after 'export' or 'export default' if they also appear before 'export'. -file7.js(2,21): error TS8038: Decorators may not appear after 'export' or 'export default' if they also appear before 'export'. - - -==== global.js (0 errors) ==== - /** @type {*} */ - var dec; - -==== file1.js (0 errors) ==== - // ok - @dec export class C1 { } - -==== file2.js (0 errors) ==== - // ok - @dec export default class C2 {} - -==== file3.js (1 errors) ==== - // error - export @dec default class C3 {} - ~~~~ -!!! error TS1206: Decorators are not valid here. - -==== file4.js (0 errors) ==== - // ok - export @dec class C4 {} - -==== file5.js (0 errors) ==== - // ok - export default @dec class C5 {} - -==== file6.js (1 errors) ==== - // error - @dec export @dec class C6 {} - ~~~~ -!!! error TS8038: Decorators may not appear after 'export' or 'export default' if they also appear before 'export'. -!!! related TS1486 file6.js:2:1: Decorator used before 'export' here. - -==== file7.js (1 errors) ==== - // error - @dec export default @dec class C7 {} - ~~~~ -!!! error TS8038: Decorators may not appear after 'export' or 'export default' if they also appear before 'export'. -!!! related TS1486 file7.js:2:1: Decorator used before 'export' here. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/exportedAliasedEnumTag.errors.txt b/testdata/baselines/reference/submodule/conformance/exportedAliasedEnumTag.errors.txt deleted file mode 100644 index b8dd88473f..0000000000 --- a/testdata/baselines/reference/submodule/conformance/exportedAliasedEnumTag.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -exportedAliasedEnumTag.js(1,20): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -exportedAliasedEnumTag.js(4,14): error TS2339: Property 'Type' does not exist on type '{}'. - - -==== exportedAliasedEnumTag.js (2 errors) ==== - var middlewarify = module.exports = {}; - ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - - /** @enum */ - middlewarify.Type = { - ~~~~ -!!! error TS2339: Property 'Type' does not exist on type '{}'. - BEFORE: 'before' - }; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/inferingFromAny.errors.txt b/testdata/baselines/reference/submodule/conformance/inferingFromAny.errors.txt deleted file mode 100644 index 11fd07f033..0000000000 --- a/testdata/baselines/reference/submodule/conformance/inferingFromAny.errors.txt +++ /dev/null @@ -1,117 +0,0 @@ -a.js(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -a.js(4,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(5,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(6,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(7,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(9,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -a.js(14,5): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -a.js(15,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(16,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(18,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -a.js(19,13): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. - - -==== a.ts (0 errors) ==== - var a: any; - var t: [any, any]; - declare function f1(t: T): T - declare function f2(t: T[]): T; - declare function f3(t: [T, U]): [T, U]; - declare function f4(x: { bar: T; baz: T }): T; - declare function f5(x: (a: T) => void): T; - declare function f6(x: new (a: T) => {}): T; - declare function f7(x: (a: any) => a is T): T; - declare function f8(x: () => T): T; - declare function f9(x: new () => T): T; - declare function f10(x: { [x: string]: T }): T; - declare function f11(x: { [x: number]: T }): T; - declare function f12(x: T | U): [T, U]; - declare function f13(x: T & U): [T, U]; - declare function f14(x: { a: T | U, b: U & T }): [T, U]; - interface I { } - declare function f15(x: I): T; - declare function f16(x: Partial): T; - declare function f17(x: {[P in keyof T]: K}): T; - declare function f18(x: {[P in K]: T[P]}): T; - declare function f19(k: K, x: T[K]): T; - -==== a.js (18 errors) ==== - var a = f1(a); - var a = f2(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var t = f3(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -!!! related TS6203 a.ts:2:5: 't' was also declared here. - var a = f4(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f5(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f6(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f7(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f8(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f9(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f10(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f11(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var t = f12(a); - var t = f13(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -!!! related TS6203 a.ts:2:5: 't' was also declared here. - var t = f14(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -!!! related TS6203 a.ts:2:5: 't' was also declared here. - var a = f15(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f16(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f17(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f18(a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - var a = f19(a, a); - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -!!! related TS6203 a.ts:1:5: 'a' was also declared here. - ~ -!!! error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassStaticMembersFromAssignments.errors.txt b/testdata/baselines/reference/submodule/conformance/inferringClassStaticMembersFromAssignments.errors.txt index 44225f824f..5cd1f0d60f 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassStaticMembersFromAssignments.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/inferringClassStaticMembersFromAssignments.errors.txt @@ -1,54 +1,36 @@ -a.js(2,4): error TS2339: Property 'staticProp' does not exist on type 'typeof C1'. -a.js(8,4): error TS2339: Property 'staticProp' does not exist on type 'typeof C2'. -a.js(11,4): error TS2339: Property 'staticProp' does not exist on type '() => void'. b.ts(4,14): error TS2339: Property 'staticProp' does not exist on type 'typeof C1'. b.ts(5,14): error TS2339: Property 'staticProp' does not exist on type 'typeof C2'. b.ts(7,14): error TS2339: Property 'staticProp' does not exist on type '() => void'. b.ts(10,12): error TS2339: Property 'staticProp' does not exist on type 'typeof C3'. b.ts(11,12): error TS2339: Property 'staticProp' does not exist on type 'typeof C4'. b.ts(13,12): error TS2339: Property 'staticProp' does not exist on type '() => void'. -global.js(2,4): error TS2339: Property 'staticProp' does not exist on type 'typeof C3'. -global.js(8,4): error TS2339: Property 'staticProp' does not exist on type 'typeof C4'. -global.js(11,4): error TS2339: Property 'staticProp' does not exist on type '() => void'. -==== a.js (3 errors) ==== +==== a.js (0 errors) ==== export class C1 { } C1.staticProp = 0; - ~~~~~~~~~~ -!!! error TS2339: Property 'staticProp' does not exist on type 'typeof C1'. export function F1() { } F1.staticProp = 0; export var C2 = class { }; C2.staticProp = 0; - ~~~~~~~~~~ -!!! error TS2339: Property 'staticProp' does not exist on type 'typeof C2'. export let F2 = function () { }; F2.staticProp = 0; - ~~~~~~~~~~ -!!! error TS2339: Property 'staticProp' does not exist on type '() => void'. -==== global.js (3 errors) ==== +==== global.js (0 errors) ==== class C3 { } C3.staticProp = 0; - ~~~~~~~~~~ -!!! error TS2339: Property 'staticProp' does not exist on type 'typeof C3'. function F3() { } F3.staticProp = 0; var C4 = class { }; C4.staticProp = 0; - ~~~~~~~~~~ -!!! error TS2339: Property 'staticProp' does not exist on type 'typeof C4'. let F4 = function () { }; F4.staticProp = 0; - ~~~~~~~~~~ -!!! error TS2339: Property 'staticProp' does not exist on type '() => void'. ==== b.ts (6 errors) ==== import * as a from "./a"; diff --git a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt index 8eab022bb0..4df6082227 100644 --- a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt @@ -1,6 +1,3 @@ -a.js(2,10): error TS2339: Property 'a' does not exist on type '{}'. -a.js(8,21): error TS2339: Property 'a' does not exist on type '{}'. -a.js(16,14): error TS2339: Property 'a' does not exist on type '{}'. b.ts(1,10): error TS2339: Property 'a' does not exist on type '{}'. b.ts(2,18): error TS2339: Property 'a' does not exist on type '{}'. b.ts(3,29): error TS2339: Property 'a' does not exist on type '{}'. @@ -9,19 +6,15 @@ b.ts(5,8): error TS2339: Property 'a' does not exist on type '{}'. b.ts(6,10): error TS2339: Property 'a' does not exist on type '{}'. -==== a.js (3 errors) ==== +==== a.js (0 errors) ==== var variable = {}; variable.a = 0; - ~ -!!! error TS2339: Property 'a' does not exist on type '{}'. class C { initializedMember = {}; constructor() { this.member = {}; this.member.a = 0; - ~ -!!! error TS2339: Property 'a' does not exist on type '{}'. } } @@ -30,8 +23,6 @@ b.ts(6,10): error TS2339: Property 'a' does not exist on type '{}'. }; obj.property.a = 0; - ~ -!!! error TS2339: Property 'a' does not exist on type '{}'. var arr = [{}]; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReturnTag1.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocReturnTag1.errors.txt deleted file mode 100644 index 1648125f5e..0000000000 --- a/testdata/baselines/reference/submodule/conformance/jsdocReturnTag1.errors.txt +++ /dev/null @@ -1,33 +0,0 @@ -returns.js(5,5): error TS2322: Type 'number' is not assignable to type 'string'. -returns.js(12,5): error TS2322: Type 'number' is not assignable to type 'string'. -returns.js(19,12): error TS2872: This kind of expression is always truthy. - - -==== returns.js (3 errors) ==== - /** - * @returns {string} This comment is not currently exposed - */ - function f() { - return 5; - ~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'string'. - } - - /** - * @returns {string=} This comment is not currently exposed - */ - function f1() { - return 5; - ~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'string'. - } - - /** - * @returns {string|number} This comment is not currently exposed - */ - function f2() { - return 5 || "hello"; - ~ -!!! error TS2872: This kind of expression is always truthy. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocTypeTag.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocTypeTag.errors.txt index 399860b673..4ba51c7b3f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocTypeTag.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocTypeTag.errors.txt @@ -1,10 +1,3 @@ -a.js(19,12): error TS2304: Cannot find name 'Void'. -a.js(25,12): error TS2304: Cannot find name 'Undefined'. -a.js(31,12): error TS2304: Cannot find name 'Null'. -a.js(37,12): error TS2314: Generic type 'T[]' requires 1 type argument(s). -a.js(40,12): error TS2552: Cannot find name 'array'. Did you mean 'Array'? -a.js(43,12): error TS2314: Generic type 'Promise' requires 1 type argument(s). -a.js(46,12): error TS2552: Cannot find name 'promise'. Did you mean 'Promise'? b.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'S' must be of type 'String', but here has type 'string'. b.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'N' must be of type 'Number', but here has type 'number'. b.ts(5,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'B' must be of type 'Boolean', but here has type 'boolean'. @@ -12,7 +5,7 @@ b.ts(18,5): error TS2403: Subsequent variable declarations must have the same ty b.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'obj' must be of type 'object', but here has type 'any'. -==== a.js (7 errors) ==== +==== a.js (0 errors) ==== /** @type {String} */ var S; @@ -32,48 +25,33 @@ b.ts(19,5): error TS2403: Subsequent variable declarations must have the same ty var b; /** @type {Void} */ - ~~~~ -!!! error TS2304: Cannot find name 'Void'. var V; /** @type {void} */ var v; /** @type {Undefined} */ - ~~~~~~~~~ -!!! error TS2304: Cannot find name 'Undefined'. var U; /** @type {undefined} */ var u; /** @type {Null} */ - ~~~~ -!!! error TS2304: Cannot find name 'Null'. var Nl; /** @type {null} */ var nl; /** @type {Array} */ - ~~~~~ -!!! error TS2314: Generic type 'T[]' requires 1 type argument(s). var A; /** @type {array} */ - ~~~~~ -!!! error TS2552: Cannot find name 'array'. Did you mean 'Array'? -!!! related TS2728 lib.es5.d.ts:--:--: 'Array' is declared here. var a; /** @type {Promise} */ - ~~~~~~~ -!!! error TS2314: Generic type 'Promise' requires 1 type argument(s). var P; /** @type {promise} */ - ~~~~~~~ -!!! error TS2552: Cannot find name 'promise'. Did you mean 'Promise'? var p; /** @type {?number} */ diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportAlias.errors.txt b/testdata/baselines/reference/submodule/conformance/moduleExportAlias.errors.txt index 5144b74b30..1c155b88b6 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportAlias.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/moduleExportAlias.errors.txt @@ -18,39 +18,6 @@ a.ts(18,3): error TS2339: Property 'func17' does not exist on type '{}'. a.ts(19,3): error TS2339: Property 'func18' does not exist on type '{}'. a.ts(20,3): error TS2339: Property 'func19' does not exist on type '{}'. a.ts(21,3): error TS2339: Property 'func20' does not exist on type '{}'. -b.js(2,14): error TS2339: Property 'func1' does not exist on type 'typeof import("b")'. -b.js(3,9): error TS2339: Property 'func2' does not exist on type 'typeof import("b")'. -b.js(6,20): error TS2339: Property 'func3' does not exist on type '{}'. -b.js(7,16): error TS2339: Property 'func4' does not exist on type '{}'. -b.js(9,33): error TS2631: Cannot assign to '"b"' because it is a namespace. -b.js(10,27): error TS2339: Property 'func5' does not exist on type '{}'. -b.js(13,27): error TS2339: Property 'func6' does not exist on type 'typeof import("b")'. -b.js(17,27): error TS2339: Property 'func7' does not exist on type 'typeof import("b")'. -b.js(20,27): error TS2339: Property 'func8' does not exist on type '{}'. -b.js(22,50): error TS2631: Cannot assign to '"b"' because it is a namespace. -b.js(23,27): error TS2339: Property 'func9' does not exist on type '{}'. -b.js(25,33): error TS2631: Cannot assign to '"b"' because it is a namespace. -b.js(26,27): error TS2339: Property 'func10' does not exist on type '{}'. -b.js(28,1): error TS2631: Cannot assign to '"b"' because it is a namespace. -b.js(29,9): error TS2339: Property 'func11' does not exist on type 'typeof import("b")'. -b.js(30,16): error TS2339: Property 'func12' does not exist on type '{}'. -b.js(32,1): error TS2631: Cannot assign to '"b"' because it is a namespace. -b.js(33,9): error TS2339: Property 'func11' does not exist on type 'typeof import("b")'. -b.js(34,16): error TS2339: Property 'func12' does not exist on type '{}'. -b.js(36,1): error TS2631: Cannot assign to '"b"' because it is a namespace. -b.js(37,9): error TS2339: Property 'func13' does not exist on type 'typeof import("b")'. -b.js(38,16): error TS2339: Property 'func14' does not exist on type '{}'. -b.js(40,1): error TS2631: Cannot assign to '"b"' because it is a namespace. -b.js(41,9): error TS2339: Property 'func15' does not exist on type 'typeof import("b")'. -b.js(42,16): error TS2339: Property 'func16' does not exist on type '{}'. -b.js(44,1): error TS2300: Duplicate identifier 'export='. -b.js(44,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -b.js(44,18): error TS2631: Cannot assign to '"b"' because it is a namespace. -b.js(45,9): error TS2339: Property 'func17' does not exist on type 'typeof import("b")'. -b.js(46,16): error TS2339: Property 'func18' does not exist on type '{}'. -b.js(48,1): error TS2300: Duplicate identifier 'export='. -b.js(49,9): error TS2339: Property 'func19' does not exist on type 'typeof import("b")'. -b.js(50,16): error TS2339: Property 'func20' does not exist on type '{}'. ==== a.ts (20 errors) ==== @@ -117,122 +84,56 @@ b.js(50,16): error TS2339: Property 'func20' does not exist on type '{}'. !!! error TS2339: Property 'func20' does not exist on type '{}'. -==== b.js (33 errors) ==== +==== b.js (0 errors) ==== var exportsAlias = exports; exportsAlias.func1 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func1' does not exist on type 'typeof import("b")'. exports.func2 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func2' does not exist on type 'typeof import("b")'. var moduleExportsAlias = module.exports; moduleExportsAlias.func3 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func3' does not exist on type '{}'. module.exports.func4 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func4' does not exist on type '{}'. var multipleDeclarationAlias1 = exports = module.exports; - ~~~~~~~ -!!! error TS2631: Cannot assign to '"b"' because it is a namespace. multipleDeclarationAlias1.func5 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func5' does not exist on type '{}'. var multipleDeclarationAlias2 = module.exports = exports; multipleDeclarationAlias2.func6 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func6' does not exist on type 'typeof import("b")'. var someOtherVariable; var multipleDeclarationAlias3 = someOtherVariable = exports; multipleDeclarationAlias3.func7 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func7' does not exist on type 'typeof import("b")'. var multipleDeclarationAlias4 = someOtherVariable = module.exports; multipleDeclarationAlias4.func8 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func8' does not exist on type '{}'. var multipleDeclarationAlias5 = module.exports = exports = {}; - ~~~~~~~ -!!! error TS2631: Cannot assign to '"b"' because it is a namespace. multipleDeclarationAlias5.func9 = function () { }; - ~~~~~ -!!! error TS2339: Property 'func9' does not exist on type '{}'. var multipleDeclarationAlias6 = exports = module.exports = {}; - ~~~~~~~ -!!! error TS2631: Cannot assign to '"b"' because it is a namespace. multipleDeclarationAlias6.func10 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func10' does not exist on type '{}'. exports = module.exports = someOtherVariable = {}; - ~~~~~~~ -!!! error TS2631: Cannot assign to '"b"' because it is a namespace. exports.func11 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func11' does not exist on type 'typeof import("b")'. module.exports.func12 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func12' does not exist on type '{}'. exports = module.exports = someOtherVariable = {}; - ~~~~~~~ -!!! error TS2631: Cannot assign to '"b"' because it is a namespace. exports.func11 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func11' does not exist on type 'typeof import("b")'. module.exports.func12 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func12' does not exist on type '{}'. exports = module.exports = {}; - ~~~~~~~ -!!! error TS2631: Cannot assign to '"b"' because it is a namespace. exports.func13 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func13' does not exist on type 'typeof import("b")'. module.exports.func14 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func14' does not exist on type '{}'. exports = module.exports = {}; - ~~~~~~~ -!!! error TS2631: Cannot assign to '"b"' because it is a namespace. exports.func15 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func15' does not exist on type 'typeof import("b")'. module.exports.func16 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func16' does not exist on type '{}'. module.exports = exports = {}; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'export='. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2309: An export assignment cannot be used in a module with other exported elements. - ~~~~~~~ -!!! error TS2631: Cannot assign to '"b"' because it is a namespace. exports.func17 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func17' does not exist on type 'typeof import("b")'. module.exports.func18 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func18' does not exist on type '{}'. module.exports = {}; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'export='. exports.func19 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func19' does not exist on type 'typeof import("b")'. module.exports.func20 = function () { }; - ~~~~~~ -!!! error TS2339: Property 'func20' does not exist on type '{}'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/multipleDeclarations.errors.txt b/testdata/baselines/reference/submodule/conformance/multipleDeclarations.errors.txt deleted file mode 100644 index ad1a27a2dc..0000000000 --- a/testdata/baselines/reference/submodule/conformance/multipleDeclarations.errors.txt +++ /dev/null @@ -1,50 +0,0 @@ -input.js(10,9): error TS2322: Type 'string' is not assignable to type '() => void'. -input.js(18,1): error TS2322: Type 'boolean' is not assignable to type '() => void'. -input.js(28,9): error TS2322: Type 'string' is not assignable to type '() => void'. -input.js(31,1): error TS2322: Type 'boolean' is not assignable to type '() => void'. - - -==== input.js (4 errors) ==== - function C() { - this.m = null; - } - C.prototype.m = function() { - this.nothing(); - } - class X { - constructor() { - this.m = this.m.bind(this); - this.mistake = 'frankly, complete nonsense'; - ~~~~~~~~~~~~ -!!! error TS2322: Type 'string' is not assignable to type '() => void'. - } - m() { - } - mistake() { - } - } - let x = new X(); - X.prototype.mistake = false; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type '() => void'. - x.m(); - x.mistake; - class Y { - mistake() { - } - m() { - } - constructor() { - this.m = this.m.bind(this); - this.mistake = 'even more nonsense'; - ~~~~~~~~~~~~ -!!! error TS2322: Type 'string' is not assignable to type '() => void'. - } - } - Y.prototype.mistake = true; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type '() => void'. - let y = new Y(); - y.m(); - y.mistake(); - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/override_js1.errors.txt b/testdata/baselines/reference/submodule/conformance/override_js1.errors.txt deleted file mode 100644 index 79b3b91719..0000000000 --- a/testdata/baselines/reference/submodule/conformance/override_js1.errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -a.js(7,5): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. -a.js(9,5): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. - - -==== a.js (2 errors) ==== - class B { - foo (v) {} - fooo (v) {} - } - - class D extends B { - foo (v) {} - ~~~ -!!! error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. - /** @override */ - fooo (v) {} - ~~~~ -!!! error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. - /** @override */ - bar(v) {} - } - - class C { - foo () {} - /** @override */ - fooo (v) {} - /** @override */ - bar(v) {} - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt b/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt index fbc8c76a72..8eeeb92765 100644 --- a/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt @@ -6,22 +6,18 @@ plainJSBinderErrors.js(6,11): error TS1359: Identifier expected. 'await' is a re plainJSBinderErrors.js(9,11): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. plainJSBinderErrors.js(12,5): error TS18012: '#constructor' is a reserved word. plainJSBinderErrors.js(15,20): error TS1102: 'delete' cannot be called on an identifier in strict mode. -plainJSBinderErrors.js(15,20): error TS2703: The operand of a 'delete' operator must be a property reference. plainJSBinderErrors.js(18,16): error TS1102: 'delete' cannot be called on an identifier in strict mode. -plainJSBinderErrors.js(18,16): error TS2703: The operand of a 'delete' operator must be a property reference. plainJSBinderErrors.js(19,16): error TS1102: 'delete' cannot be called on an identifier in strict mode. -plainJSBinderErrors.js(19,16): error TS2703: The operand of a 'delete' operator must be a property reference. plainJSBinderErrors.js(22,15): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'eval'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. plainJSBinderErrors.js(23,15): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. plainJSBinderErrors.js(27,9): error TS1101: 'with' statements are not allowed in strict mode. -plainJSBinderErrors.js(27,9): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. plainJSBinderErrors.js(33,13): error TS1344: 'A label is not allowed here. plainJSBinderErrors.js(34,13): error TS1107: Jump target cannot cross function boundary. plainJSBinderErrors.js(39,7): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. plainJSBinderErrors.js(40,7): error TS1215: Invalid use of 'arguments'. Modules are automatically in strict mode. -==== plainJSBinderErrors.js (21 errors) ==== +==== plainJSBinderErrors.js (17 errors) ==== export default 12 ~~~~~~~~~~~~~~~~~ !!! error TS2528: A module cannot have multiple default exports. @@ -55,20 +51,14 @@ plainJSBinderErrors.js(40,7): error TS1215: Invalid use of 'arguments'. Modules delete f ~ !!! 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. } var g = 6 delete g ~ !!! 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. delete container ~~~~~~~~~ !!! 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. } evalArguments() { const eval = 7 @@ -83,8 +73,6 @@ plainJSBinderErrors.js(40,7): error TS1215: Invalid use of 'arguments'. Modules with (redundant) { ~~~~ !!! error TS1101: 'with' statements are not allowed in strict mode. - ~~~~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. return toFixed() } } diff --git a/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt b/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt index 16c8d35c90..1b08565cd6 100644 --- a/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt @@ -1,6 +1,5 @@ plainJSGrammarErrors.js(3,9): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression plainJSGrammarErrors.js(5,9): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression -plainJSGrammarErrors.js(6,13): error TS2339: Property '#po' does not exist on type 'this'. plainJSGrammarErrors.js(10,15): error TS2803: Cannot assign to private method '#m'. Private methods are not writable. plainJSGrammarErrors.js(14,13): error TS18038: 'for await' loops cannot be used inside a class static block. plainJSGrammarErrors.js(17,9): error TS18041: A 'return' statement cannot be used inside a class static block. @@ -22,7 +21,6 @@ plainJSGrammarErrors.js(43,1): error TS1211: A class declaration without the 'de plainJSGrammarErrors.js(46,25): error TS1172: 'extends' clause already seen. plainJSGrammarErrors.js(47,25): error TS1174: Classes can only extend a single class. plainJSGrammarErrors.js(49,1): error TS18016: Private identifiers are not allowed outside class bodies. -plainJSGrammarErrors.js(50,1): error TS2304: Cannot find name 'junk'. plainJSGrammarErrors.js(50,6): error TS18016: Private identifiers are not allowed outside class bodies. plainJSGrammarErrors.js(51,9): error TS18013: Property '#m' is not accessible outside class 'C' because it has a private identifier. plainJSGrammarErrors.js(54,8): error TS1030: 'export' modifier already seen. @@ -40,7 +38,6 @@ plainJSGrammarErrors.js(66,1): error TS1042: 'async' modifier cannot be used her plainJSGrammarErrors.js(67,1): error TS1191: An import declaration cannot have modifiers. plainJSGrammarErrors.js(68,1): error TS1193: An export declaration cannot have modifiers. plainJSGrammarErrors.js(70,5): error TS1474: An export declaration can only be used at the top level of a module. -plainJSGrammarErrors.js(70,14): error TS2303: Circular definition of import alias 'staticParam'. plainJSGrammarErrors.js(71,5): error TS1473: An import declaration can only be used at the top level of a module. plainJSGrammarErrors.js(72,5): error TS1258: A default export must be at the top level of a file or module declaration. plainJSGrammarErrors.js(75,5): error TS1184: Modifiers cannot appear here. @@ -55,19 +52,14 @@ plainJSGrammarErrors.js(92,33): error TS2566: A rest element cannot have a prope plainJSGrammarErrors.js(93,42): error TS1186: A rest element cannot have an initializer. plainJSGrammarErrors.js(96,4): error TS1123: Variable declaration list cannot be empty. plainJSGrammarErrors.js(97,9): error TS5076: '||' and '??' operations cannot be mixed without parentheses. -plainJSGrammarErrors.js(98,9): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish. -plainJSGrammarErrors.js(98,14): error TS2872: This kind of expression is always truthy. plainJSGrammarErrors.js(98,14): error TS5076: '||' and '??' operations cannot be mixed without parentheses. plainJSGrammarErrors.js(100,3): error TS1200: Line terminator not permitted before arrow. -plainJSGrammarErrors.js(102,1): error TS2349: This expression is not callable. - Type 'number[]' has no call signatures. plainJSGrammarErrors.js(102,4): error TS1358: Tagged template expressions are not permitted in an optional chain. plainJSGrammarErrors.js(104,6): error TS1171: A comma expression is not allowed in a computed property name. plainJSGrammarErrors.js(105,5): error TS18016: Private identifiers are not allowed outside class bodies. plainJSGrammarErrors.js(106,5): error TS1042: 'export' modifier cannot be used here. plainJSGrammarErrors.js(108,25): error TS1162: An object member cannot be declared optional. plainJSGrammarErrors.js(109,6): error TS1162: An object member cannot be declared optional. -plainJSGrammarErrors.js(110,5): error TS18004: No value exists in scope for the shorthand property 'definitely'. Either declare one or provide an initializer. plainJSGrammarErrors.js(110,15): error TS1255: A definite assignment assertion '!' is not permitted in this context. plainJSGrammarErrors.js(111,19): error TS1255: A definite assignment assertion '!' is not permitted in this context. plainJSGrammarErrors.js(114,16): error TS1312: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern. @@ -99,13 +91,10 @@ plainJSGrammarErrors.js(201,28): error TS17012: 'metal' is not a valid meta-prop plainJSGrammarErrors.js(202,22): error TS17012: 'targe' is not a valid meta-property for keyword 'new'. Did you mean 'target'? plainJSGrammarErrors.js(203,30): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments plainJSGrammarErrors.js(204,30): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments -plainJSGrammarErrors.js(204,37): error TS2307: Cannot find module '1' or its corresponding type declarations. -plainJSGrammarErrors.js(204,42): error TS2559: Type '"2"' has no properties in common with type 'ImportCallOptions'. plainJSGrammarErrors.js(205,36): error TS1325: Argument of dynamic import cannot be spread element. -plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be used within a function body. -==== plainJSGrammarErrors.js (104 errors) ==== +==== plainJSGrammarErrors.js (94 errors) ==== class C { // #private mistakes q = #unbound @@ -116,8 +105,6 @@ plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be u ~~ !!! error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression if (#po in this) { - ~~~ -!!! error TS2339: Property '#po' does not exist on type 'this'. } } #m() { @@ -204,8 +191,6 @@ plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be u ~~~~~~~~~~ !!! error TS18016: Private identifiers are not allowed outside class bodies. junk.#m - ~~~~ -!!! error TS2304: Cannot find name 'junk'. ~~ !!! error TS18016: Private identifiers are not allowed outside class bodies. new C().#m @@ -260,8 +245,6 @@ plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be u export { staticParam } ~~~~~~ !!! error TS1474: An export declaration can only be used at the top level of a module. - ~~~~~~~~~~~ -!!! error TS2303: Circular definition of import alias 'staticParam'. import 'fs' ~~~~~~ !!! error TS1473: An import declaration can only be used at the top level of a module. @@ -318,10 +301,6 @@ plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be u ~~~~~~ !!! error TS5076: '||' and '??' operations cannot be mixed without parentheses. var x = 2 ?? 3 || 4 - ~ -!!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish. - ~ -!!! error TS2872: This kind of expression is always truthy. ~~~~~~ !!! error TS5076: '||' and '??' operations cannot be mixed without parentheses. const arr = x @@ -330,9 +309,6 @@ plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be u !!! error TS1200: Line terminator not permitted before arrow. var a = [1,2] a?.`length`; - ~ -!!! error TS2349: This expression is not callable. -!!! error TS2349: Type 'number[]' has no call signatures. ~~~~~~~~ !!! error TS1358: Tagged template expressions are not permitted in an optional chain. const o = { @@ -353,8 +329,6 @@ plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be u ~ !!! error TS1162: An object member cannot be declared optional. definitely!, - ~~~~~~~~~~ -!!! error TS18004: No value exists in scope for the shorthand property 'definitely'. Either declare one or provide an initializer. ~ !!! error TS1255: A definite assignment assertion '!' is not permitted in this context. definiteMethod!() { return 13 }, @@ -511,15 +485,9 @@ plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be u const trinaryDynamicImport = import('1', '2', '3') ~~~~~~~~~~~~~~~~~~~~~ !!! message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments - ~~~ -!!! error TS2307: Cannot find module '1' or its corresponding type declarations. - ~~~ -!!! error TS2559: Type '"2"' has no properties in common with type 'ImportCallOptions'. const spreadDynamicImport = import(...[]) ~~~~~ !!! error TS1325: Argument of dynamic import cannot be spread element. return - ~~~~~~ -!!! error TS1108: A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors4.errors.txt b/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors4.errors.txt deleted file mode 100644 index f30a877dee..0000000000 --- a/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors4.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -plainJSGrammarErrors4.js(5,14): error TS2339: Property '#b' does not exist on type 'A'. - - -==== plainJSGrammarErrors4.js (1 errors) ==== - class A { - #a; - m() { - this.#a; // ok - this.#b; // error - ~~ -!!! error TS2339: Property '#b' does not exist on type 'A'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/plainJSRedeclare.errors.txt b/testdata/baselines/reference/submodule/conformance/plainJSRedeclare.errors.txt index 0156cfb73d..6213a5895b 100644 --- a/testdata/baselines/reference/submodule/conformance/plainJSRedeclare.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/plainJSRedeclare.errors.txt @@ -1,16 +1,13 @@ plainJSRedeclare.js(1,7): error TS2451: Cannot redeclare block-scoped variable 'orbitol'. plainJSRedeclare.js(2,5): error TS2451: Cannot redeclare block-scoped variable 'orbitol'. -plainJSRedeclare.js(2,15): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. -==== plainJSRedeclare.js (3 errors) ==== +==== plainJSRedeclare.js (2 errors) ==== const orbitol = 1 ~~~~~~~ !!! error TS2451: Cannot redeclare block-scoped variable 'orbitol'. var orbitol = 1 + false ~~~~~~~ !!! error TS2451: Cannot redeclare block-scoped variable 'orbitol'. - ~~~~~~~~~ -!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. orbitol.toExponential() \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/spellingUncheckedJS.errors.txt b/testdata/baselines/reference/submodule/conformance/spellingUncheckedJS.errors.txt index 1b31cc09e2..eb463d79d7 100644 --- a/testdata/baselines/reference/submodule/conformance/spellingUncheckedJS.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/spellingUncheckedJS.errors.txt @@ -1,35 +1,17 @@ -other.js(3,1): error TS2552: Cannot find name 'Jon'. Did you mean 'John'? -spellingUncheckedJS.js(2,1): error TS2552: Cannot find name 'inmodule'. Did you mean 'inModule'? -spellingUncheckedJS.js(5,18): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. -spellingUncheckedJS.js(6,5): error TS2552: Cannot find name 'locale'. Did you mean 'locals'? +spellingUncheckedJS.js(7,5): error TS2578: Unused '@ts-expect-error' directive. spellingUncheckedJS.js(9,5): error TS2578: Unused '@ts-expect-error' directive. -spellingUncheckedJS.js(16,21): error TS2551: Property 'none' does not exist on type 'Classe'. Did you mean 'non'? -spellingUncheckedJS.js(22,22): error TS2339: Property 'none' does not exist on type 'Classe'. -spellingUncheckedJS.js(30,8): error TS2551: Property 'spaaaace' does not exist on type '{ spaaace: number; }'. Did you mean 'spaaace'? -spellingUncheckedJS.js(31,8): error TS2551: Property 'spaace' does not exist on type '{ spaaace: number; }'. Did you mean 'spaaace'? -spellingUncheckedJS.js(32,8): error TS2339: Property 'fresh' does not exist on type '{ spaaace: number; }'. -spellingUncheckedJS.js(33,7): error TS2551: Property 'puuuce' does not exist on type '{ puuce: number; }'. Did you mean 'puuce'? -spellingUncheckedJS.js(34,12): error TS2551: Property 'getGMTDate' does not exist on type 'Date'. Did you mean 'getDate'? -spellingUncheckedJS.js(37,14): error TS2552: Cannot find name 'setIntegral'. Did you mean 'setInterval'? -spellingUncheckedJS.js(38,1): error TS2552: Cannot find name 'AudioBuffin'. Did you mean 'AudioBuffer'? -spellingUncheckedJS.js(40,1): error TS2552: Cannot find name 'Jon'. Did you mean 'John'? -==== spellingUncheckedJS.js (14 errors) ==== +==== spellingUncheckedJS.js (2 errors) ==== export var inModule = 1 inmodule.toFixed() - ~~~~~~~~ -!!! error TS2552: Cannot find name 'inmodule'. Did you mean 'inModule'? function f() { var locals = 2 + true - ~~~~~~~~ -!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. locale.toFixed() - ~~~~~~ -!!! error TS2552: Cannot find name 'locale'. Did you mean 'locals'? -!!! related TS2728 spellingUncheckedJS.js:5:9: 'locals' is declared here. // @ts-expect-error + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2578: Unused '@ts-expect-error' directive. localf.toExponential() // @ts-expect-error ~~~~~~~~~~~~~~~~~~~ @@ -41,17 +23,12 @@ spellingUncheckedJS.js(40,1): error TS2552: Cannot find name 'Jon'. Did you mean methode() { // no error on 'this' references return this.none - ~~~~ -!!! error TS2551: Property 'none' does not exist on type 'Classe'. Did you mean 'non'? -!!! related TS2728 spellingUncheckedJS.js:13:5: 'non' is declared here. } } class Derivee extends Classe { methode() { // no error on 'super' references return super.none - ~~~~ -!!! error TS2339: Property 'none' does not exist on type 'Classe'. } } @@ -60,47 +37,21 @@ spellingUncheckedJS.js(40,1): error TS2552: Cannot find name 'Jon'. Did you mean spaaace: 3 } object.spaaaace // error on read - ~~~~~~~~ -!!! error TS2551: Property 'spaaaace' does not exist on type '{ spaaace: number; }'. Did you mean 'spaaace'? -!!! related TS2728 spellingUncheckedJS.js:28:5: 'spaaace' is declared here. object.spaace = 12 // error on write - ~~~~~~ -!!! error TS2551: Property 'spaace' does not exist on type '{ spaaace: number; }'. Did you mean 'spaaace'? -!!! related TS2728 spellingUncheckedJS.js:28:5: 'spaaace' is declared here. object.fresh = 12 // OK - ~~~~~ -!!! error TS2339: Property 'fresh' does not exist on type '{ spaaace: number; }'. other.puuuce // OK, from another file - ~~~~~~ -!!! error TS2551: Property 'puuuce' does not exist on type '{ puuce: number; }'. Did you mean 'puuce'? -!!! related TS2728 other.js:5:5: 'puuce' is declared here. new Date().getGMTDate() // OK, from another file - ~~~~~~~~~~ -!!! error TS2551: Property 'getGMTDate' does not exist on type 'Date'. Did you mean 'getDate'? -!!! related TS2728 lib.es5.d.ts:--:--: 'getDate' is declared here. // No suggestions for globals from other files const atoc = setIntegral(() => console.log('ok'), 500) - ~~~~~~~~~~~ -!!! error TS2552: Cannot find name 'setIntegral'. Did you mean 'setInterval'? -!!! related TS2728 lib.dom.d.ts:--:--: 'setInterval' is declared here. AudioBuffin // etc - ~~~~~~~~~~~ -!!! error TS2552: Cannot find name 'AudioBuffin'. Did you mean 'AudioBuffer'? -!!! related TS2728 lib.dom.d.ts:--:--: 'AudioBuffer' is declared here. Jimmy Jon - ~~~ -!!! error TS2552: Cannot find name 'Jon'. Did you mean 'John'? -!!! related TS2728 other.js:2:5: 'John' is declared here. -==== other.js (1 errors) ==== +==== other.js (0 errors) ==== var Jimmy = 1 var John = 2 Jon // error, it's from the same file - ~~~ -!!! error TS2552: Cannot find name 'Jon'. Did you mean 'John'? -!!! related TS2728 other.js:2:5: 'John' is declared here. var other = { puuce: 4 } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.errors.txt.diff deleted file mode 100644 index 588761f159..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor3_Js.errors.txt.diff +++ /dev/null @@ -1,40 +0,0 @@ ---- old.argumentsReferenceInConstructor3_Js.errors.txt -+++ new.argumentsReferenceInConstructor3_Js.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/a.js(24,20): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -+/a.js(24,30): error TS2339: Property 'foo' does not exist on type '{ bar: {}; }'. -+ -+ -+==== /a.js (2 errors) ==== -+ class A { -+ get arguments() { -+ return { bar: {} }; -+ } -+ } -+ -+ class B extends A { -+ /** -+ * Constructor -+ * -+ * @param {object} [foo={}] -+ */ -+ constructor(foo = {}) { -+ super(); -+ -+ /** -+ * @type object -+ */ -+ this.foo = foo; -+ -+ /** -+ * @type object -+ */ -+ this.bar = super.arguments.foo; -+ ~~~~~~~~~ -+!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type '{ bar: {}; }'. -+ } -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.errors.txt.diff deleted file mode 100644 index b7749ca5e9..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInConstructor4_Js.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.argumentsReferenceInConstructor4_Js.errors.txt -+++ new.argumentsReferenceInConstructor4_Js.errors.txt -@@= skipped -0, +0 lines =@@ - /a.js(18,9): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. -- -- --==== /a.js (1 errors) ==== -+/a.js(23,24): error TS2339: Property 'bar' does not exist on type 'object'. -+ -+ -+==== /a.js (2 errors) ==== - class A { - /** - * Constructor -@@= skipped -26, +27 lines =@@ - * @type object - */ - this.bar = arguments.bar; -+ ~~~ -+!!! error TS2339: Property 'bar' does not exist on type 'object'. - - /** - * @type object \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.errors.txt.diff deleted file mode 100644 index d00c3f37b0..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod3_Js.errors.txt.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- old.argumentsReferenceInMethod3_Js.errors.txt -+++ new.argumentsReferenceInMethod3_Js.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/a.js(20,18): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -+ -+ -+==== /a.js (1 errors) ==== -+ class A { -+ get arguments() { -+ return { bar: {} }; -+ } -+ } -+ -+ class B extends A { -+ /** -+ * @param {object} [foo={}] -+ */ -+ m(foo = {}) { -+ /** -+ * @type object -+ */ -+ this.x = foo; -+ -+ /** -+ * @type object -+ */ -+ this.y = super.arguments.bar; -+ ~~~~~~~~~ -+!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -+ } -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.errors.txt.diff deleted file mode 100644 index 727a74b8b9..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/argumentsReferenceInMethod4_Js.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.argumentsReferenceInMethod4_Js.errors.txt -+++ new.argumentsReferenceInMethod4_Js.errors.txt -@@= skipped -0, +0 lines =@@ - /a.js(16,9): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. -- -- --==== /a.js (1 errors) ==== -+/a.js(21,24): error TS2339: Property 'bar' does not exist on type 'object'. -+ -+ -+==== /a.js (2 errors) ==== - class A { - /** - * @param {object} [foo={}] -@@= skipped -24, +25 lines =@@ - * @type object - */ - this.bar = arguments.bar; -+ ~~~ -+!!! error TS2339: Property 'bar' does not exist on type 'object'. - - /** - * @type object \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/decoratorInJsFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/decoratorInJsFile.errors.txt.diff index a7e7ef7326..01b25dd180 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/decoratorInJsFile.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/decoratorInJsFile.errors.txt.diff @@ -2,17 +2,15 @@ +++ new.decoratorInJsFile.errors.txt @@= skipped -0, +0 lines =@@ -a.js(3,12): error TS8010: Type annotations can only be used in TypeScript files. -+a.js(1,2): error TS2304: Cannot find name 'SomeDecorator'. - - - ==== a.js (1 errors) ==== - @SomeDecorator -+ ~~~~~~~~~~~~~ -+!!! error TS2304: Cannot find name 'SomeDecorator'. - class SomeClass { - foo(x: number) { +- +- +-==== a.js (1 errors) ==== +- @SomeDecorator +- class SomeClass { +- foo(x: number) { - ~~~~~~ -!!! error TS8010: Type annotations can only be used in TypeScript files. - - } - } \ No newline at end of file +- +- } +- } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/decoratorInJsFile1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/decoratorInJsFile1.errors.txt.diff index 62883afb43..349ad2c6c6 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/decoratorInJsFile1.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/decoratorInJsFile1.errors.txt.diff @@ -2,17 +2,15 @@ +++ new.decoratorInJsFile1.errors.txt @@= skipped -0, +0 lines =@@ -a.js(3,12): error TS8010: Type annotations can only be used in TypeScript files. -+a.js(1,2): error TS2304: Cannot find name 'SomeDecorator'. - - - ==== a.js (1 errors) ==== - @SomeDecorator -+ ~~~~~~~~~~~~~ -+!!! error TS2304: Cannot find name 'SomeDecorator'. - class SomeClass { - foo(x: number) { +- +- +-==== a.js (1 errors) ==== +- @SomeDecorator +- class SomeClass { +- foo(x: number) { - ~~~~~~ -!!! error TS8010: Type annotations can only be used in TypeScript files. - - } - } \ No newline at end of file +- +- } +- } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/dynamicRequire.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/dynamicRequire.errors.txt.diff deleted file mode 100644 index a33b6ee5cf..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/dynamicRequire.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.dynamicRequire.errors.txt -+++ new.dynamicRequire.errors.txt -@@= skipped -0, +0 lines =@@ -- -+a.js(2,13): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+ -+ -+==== a.js (1 errors) ==== -+ function foo(name) { -+ var s = require("t/" + name) -+ ~~~~~~~ -+!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/exportDefaultMarksIdentifierAsUsed.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/exportDefaultMarksIdentifierAsUsed.errors.txt.diff deleted file mode 100644 index 933dbf536d..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/exportDefaultMarksIdentifierAsUsed.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.exportDefaultMarksIdentifierAsUsed.errors.txt -+++ new.exportDefaultMarksIdentifierAsUsed.errors.txt -@@= skipped -0, +0 lines =@@ -- -+b.js(3,5): error TS2339: Property 'fn' does not exist on type '{}'. -+ -+ -+==== a.js (0 errors) ==== -+ const Obj = {}; -+ export default Obj; -+==== b.js (1 errors) ==== -+ import Obj from './a'; -+ -+ Obj.fn = function() {}; -+ ~~ -+!!! error TS2339: Property 'fn' does not exist on type '{}'. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyInitalizationInObjectLiteral.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyInitalizationInObjectLiteral.errors.txt.diff deleted file mode 100644 index 6993677519..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyInitalizationInObjectLiteral.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.jsFileClassPropertyInitalizationInObjectLiteral.errors.txt -+++ new.jsFileClassPropertyInitalizationInObjectLiteral.errors.txt -@@= skipped -0, +0 lines =@@ -- -+foo.js(4,10): error TS2339: Property 'b' does not exist on type 'typeof A'. -+ -+ -+==== foo.js (1 errors) ==== -+ module.exports = function () { -+ class A { } -+ return { -+ c: A.b = 1, -+ ~ -+!!! error TS2339: Property 'b' does not exist on type 'typeof A'. -+ } -+ }; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.errors.txt.diff deleted file mode 100644 index 7619d1d2af..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileClassPropertyType3.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.jsFileClassPropertyType3.errors.txt -+++ new.jsFileClassPropertyType3.errors.txt -@@= skipped -0, +0 lines =@@ - bar.ts(1,1): error TS2322: Type 'string' is not assignable to type 'number'. -- -- --==== foo.js (0 errors) ==== -+foo.js(3,13): error TS2304: Cannot find name 'cond'. -+ -+ -+==== foo.js (1 errors) ==== - class C { - constructor() { - if (cond) { -+ ~~~~ -+!!! error TS2304: Cannot find name 'cond'. - this.p = null; - } - else { \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationConstructorOverloadSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationConstructorOverloadSyntax.errors.txt.diff index 0fc36705a8..6c10af799b 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationConstructorOverloadSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationConstructorOverloadSyntax.errors.txt.diff @@ -2,14 +2,13 @@ +++ new.jsFileCompilationConstructorOverloadSyntax.errors.txt @@= skipped -0, +0 lines =@@ -a.js(2,3): error TS8017: Signature declarations can only be used in TypeScript files. -+a.js(2,3): error TS2390: Constructor implementation is missing. - - - ==== a.js (1 errors) ==== - class A { - constructor(); - ~~~~~~~~~~~ +- +- +-==== a.js (1 errors) ==== +- class A { +- constructor(); +- ~~~~~~~~~~~ -!!! error TS8017: Signature declarations can only be used in TypeScript files. -+!!! error TS2390: Constructor implementation is missing. - } - \ No newline at end of file +- } +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDecoratorSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDecoratorSyntax.errors.txt.diff deleted file mode 100644 index 556fb9688f..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDecoratorSyntax.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.jsFileCompilationDecoratorSyntax.errors.txt -+++ new.jsFileCompilationDecoratorSyntax.errors.txt -@@= skipped -0, +0 lines =@@ -- -+a.js(1,2): error TS2304: Cannot find name 'internal'. -+ -+ -+==== a.js (1 errors) ==== -+ @internal class C { } -+ ~~~~~~~~ -+!!! error TS2304: Cannot find name 'internal'. -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt.diff deleted file mode 100644 index 738eaeb0bc..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.jsFileCompilationDuplicateFunctionImplementation.errors.txt -+++ new.jsFileCompilationDuplicateFunctionImplementation.errors.txt -@@= skipped -0, +0 lines =@@ - a.ts(1,10): error TS2393: Duplicate function implementation. -- -- --==== b.js (0 errors) ==== -+b.js(1,10): error TS2393: Duplicate function implementation. -+ -+ -+==== b.js (1 errors) ==== - function foo() { -+ ~~~ -+!!! error TS2393: Duplicate function implementation. - return 10; - } - ==== a.ts (1 errors) ==== \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt.diff deleted file mode 100644 index dbc51c7745..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt -+++ new.jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt -@@= skipped -0, +0 lines =@@ - a.ts(1,10): error TS2393: Duplicate function implementation. -+b.js(1,10): error TS2393: Duplicate function implementation. - - - ==== a.ts (1 errors) ==== -@@= skipped -7, +8 lines =@@ - return 30; - } - --==== b.js (0 errors) ==== -+==== b.js (1 errors) ==== - function foo() { -+ ~~~ -+!!! error TS2393: Duplicate function implementation. - return 10; - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateVariable.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateVariable.errors.txt.diff deleted file mode 100644 index 85c2fa510c..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateVariable.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.jsFileCompilationDuplicateVariable.errors.txt -+++ new.jsFileCompilationDuplicateVariable.errors.txt -@@= skipped -0, +0 lines =@@ -- -+b.js(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. -+ -+ -+==== a.ts (0 errors) ==== -+ var x = 10; -+ -+==== b.js (1 errors) ==== -+ var x = "hello"; // Error is recorded here, but suppressed because the js file isn't checked -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. -+!!! related TS6203 a.ts:1:5: 'x' was also declared here. -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt.diff index d3be4fbca8..60680cb98b 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt.diff @@ -8,12 +8,8 @@ - -!!! error TS5055: Cannot write file 'a.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. -+a.js(1,10): error TS2304: Cannot find name 'b'. -+ -+ - ==== a.js (1 errors) ==== - export = b; +-==== a.js (1 errors) ==== +- export = b; - ~~~~~~~~~~~ -!!! error TS8003: 'export =' can only be used in TypeScript files. -+ ~ -+!!! error TS2304: Cannot find name 'b'. \ No newline at end of file ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExternalPackageError.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExternalPackageError.errors.txt.diff deleted file mode 100644 index 29791bdbb1..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExternalPackageError.errors.txt.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.jsFileCompilationExternalPackageError.errors.txt -+++ new.jsFileCompilationExternalPackageError.errors.txt -@@= skipped -0, +0 lines =@@ -- -+moduleA/a.js(1,17): error TS2306: File 'node_modules/b.ts' is not a module. -+moduleA/a.js(2,1): error TS2632: Cannot assign to 'a' because it is an import. -+moduleA/a.js(3,9): error TS2305: Module '"node_modules/c"' has no exported member 'c'. -+moduleA/a.js(4,1): error TS2632: Cannot assign to 'c' because it is an import. -+node_modules/c.js(2,1): error TS2304: Cannot find name 'c'. -+ -+ -+==== moduleA/a.js (4 errors) ==== -+ import {a} from "b"; -+ ~~~ -+!!! error TS2306: File 'node_modules/b.ts' is not a module. -+ a++; -+ ~ -+!!! error TS2632: Cannot assign to 'a' because it is an import. -+ import {c} from "c"; -+ ~ -+!!! error TS2305: Module '"node_modules/c"' has no exported member 'c'. -+ c++; -+ ~ -+!!! error TS2632: Cannot assign to 'c' because it is an import. -+ -+==== node_modules/b.ts (0 errors) ==== -+ var a = 10; -+ -+==== node_modules/c.js (1 errors) ==== -+ exports.a = 10; -+ c = 10; -+ ~ -+!!! error TS2304: Cannot find name 'c'. -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt.diff index a675715a9a..05d36ec8a4 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt.diff @@ -8,12 +8,8 @@ - -!!! error TS5055: Cannot write file 'a.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. -+a.js(1,20): error TS2304: Cannot find name 'D'. -+ -+ - ==== a.js (1 errors) ==== - class C implements D { } +-==== a.js (1 errors) ==== +- class C implements D { } - ~~~~~~~~~~~~ -!!! error TS8005: 'implements' clauses can only be used in TypeScript files. -+ ~ -+!!! error TS2304: Cannot find name 'D'. \ No newline at end of file ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationImportEqualsSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationImportEqualsSyntax.errors.txt.diff index 10531678df..00077eac3c 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationImportEqualsSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationImportEqualsSyntax.errors.txt.diff @@ -8,12 +8,8 @@ - -!!! error TS5055: Cannot write file 'a.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. -+a.js(1,12): error TS2503: Cannot find namespace 'b'. -+ -+ - ==== a.js (1 errors) ==== - import a = b; +-==== a.js (1 errors) ==== +- import a = b; - ~~~~~~~~~~~~~ -!!! error TS8002: 'import ... =' can only be used in TypeScript files. -+ ~ -+!!! error TS2503: Cannot find namespace 'b'. \ No newline at end of file ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetDeclarationOrder.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetDeclarationOrder.errors.txt.diff deleted file mode 100644 index d8439d0d6f..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetDeclarationOrder.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.jsFileCompilationLetDeclarationOrder.errors.txt -+++ new.jsFileCompilationLetDeclarationOrder.errors.txt -@@= skipped -0, +0 lines =@@ -- -+b.js(2,1): error TS2448: Block-scoped variable 'b' used before its declaration. -+ -+ -+==== b.js (1 errors) ==== -+ let a = 10; -+ b = 30; -+ ~ -+!!! error TS2448: Block-scoped variable 'b' used before its declaration. -+!!! related TS2728 a.ts:1:5: 'b' is declared here. -+ -+==== a.ts (0 errors) ==== -+ let b = 30; -+ a = 10; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationMethodOverloadSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationMethodOverloadSyntax.errors.txt.diff index b4c56d79d8..f7e96404d2 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationMethodOverloadSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationMethodOverloadSyntax.errors.txt.diff @@ -2,14 +2,13 @@ +++ new.jsFileCompilationMethodOverloadSyntax.errors.txt @@= skipped -0, +0 lines =@@ -a.js(2,3): error TS8017: Signature declarations can only be used in TypeScript files. -+a.js(2,3): error TS2391: Function implementation is missing or not immediately following the declaration. - - - ==== a.js (1 errors) ==== - class A { - foo(); - ~~~ +- +- +-==== a.js (1 errors) ==== +- class A { +- foo(); +- ~~~ -!!! error TS8017: Signature declarations can only be used in TypeScript files. -+!!! error TS2391: Function implementation is missing or not immediately following the declaration. - } - \ No newline at end of file +- } +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt.diff index e49763f6d8..5e500bbd82 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt.diff @@ -8,11 +8,8 @@ - -!!! error TS5055: Cannot write file 'a.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. -+a.js(1,15): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -+ -+ - ==== a.js (1 errors) ==== - function F(): number { } - ~~~~~~ +-==== a.js (1 errors) ==== +- function F(): number { } +- ~~~~~~ -!!! error TS8010: Type annotations can only be used in TypeScript files. -+!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. \ No newline at end of file ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.errors.txt.diff index 8c7f17b7d3..9de5cd2c94 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.errors.txt.diff @@ -8,12 +8,8 @@ - -!!! error TS5055: Cannot write file 'a.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. -+a.js(1,10): error TS2304: Cannot find name 'b'. -+ -+ - ==== a.js (1 errors) ==== - type a = b; +-==== a.js (1 errors) ==== +- type a = b; - ~ -!!! error TS8008: Type aliases can only be used in TypeScript files. -+ ~ -+!!! error TS2304: Cannot find name 'b'. \ No newline at end of file ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.types.diff new file mode 100644 index 0000000000..920ee806f9 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.types.diff @@ -0,0 +1,8 @@ +--- old.jsFileCompilationTypeAliasSyntax.types ++++ new.jsFileCompilationTypeAliasSyntax.types +@@= skipped -1, +1 lines =@@ + + === a.js === + type a = b; +->a : b ++>a : error diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt.diff deleted file mode 100644 index 6a2fc936e6..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt.diff +++ /dev/null @@ -1,83 +0,0 @@ ---- old.jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt -+++ new.jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt -@@= skipped -0, +0 lines =@@ -+a.jsx(1,1): error TS2304: Cannot find name 'Foo'. -+a.jsx(1,5): error TS2693: 'number' only refers to a type, but is being used as a value here. - a.jsx(1,13): error TS1109: Expression expected. -+a.jsx(2,1): error TS2304: Cannot find name 'Foo'. -+a.jsx(2,1): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. -+a.jsx(2,5): error TS2693: 'number' only refers to a type, but is being used as a value here. -+a.jsx(3,1): error TS2304: Cannot find name 'Foo'. -+a.jsx(3,1): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'string'. -+a.jsx(3,5): error TS2693: 'number' only refers to a type, but is being used as a value here. -+a.jsx(4,1): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - a.jsx(4,1): error TS2657: JSX expressions must have one parent element. -+a.jsx(4,2): error TS2304: Cannot find name 'Foo'. - a.jsx(4,5): error TS1003: Identifier expected. -+a.jsx(4,5): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - a.jsx(4,13): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? -+a.jsx(4,16): error TS2304: Cannot find name 'Foo'. - a.jsx(4,16): error TS17002: Expected corresponding JSX closing tag for 'number'. -+a.jsx(5,1): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - a.jsx(5,1): error TS2657: JSX expressions must have one parent element. -+a.jsx(5,2): error TS2304: Cannot find name 'Foo'. - a.jsx(5,5): error TS1003: Identifier expected. -+a.jsx(5,5): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - a.jsx(5,6): error TS17008: JSX element 'number' has no corresponding closing tag. - a.jsx(5,14): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? - a.jsx(6,1): error TS1005: '(); -+ ~~~ -+!!! error TS2304: Cannot find name 'Foo'. -+ ~~~~~~ -+!!! error TS2693: 'number' only refers to a type, but is being used as a value here. - ~ - !!! error TS1109: Expression expected. - Foo(1); -+ ~~~ -+!!! error TS2304: Cannot find name 'Foo'. -+ ~~~~~~~~~~~~~~ -+!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. -+ ~~~~~~ -+!!! error TS2693: 'number' only refers to a type, but is being used as a value here. - Foo``; -+ ~~~ -+!!! error TS2304: Cannot find name 'Foo'. -+ ~~~~~~~~~~~~~ -+!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'string'. -+ ~~~~~~ -+!!! error TS2693: 'number' only refers to a type, but is being used as a value here. - >; -+ ~~~~ -+!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - ~~~~~~~~~~~~~~~~~~~ - !!! error TS2657: JSX expressions must have one parent element. -+ ~~~ -+!!! error TS2304: Cannot find name 'Foo'. - ~ - !!! error TS1003: Identifier expected. -+ ~~~~~~~~ -+!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - ~ - !!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? - ~~~ -+!!! error TS2304: Cannot find name 'Foo'. -+ ~~~ - !!! error TS17002: Expected corresponding JSX closing tag for 'number'. - />; -+ ~~~~ -+!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - ~~~~~~~~~~~~~~~ -+ ~~~ -+!!! error TS2304: Cannot find name 'Foo'. - ~ - !!! error TS1003: Identifier expected. -+ ~~~~~~~~ -+!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. - ~~~~~~ - !!! error TS17008: JSX element 'number' has no corresponding closing tag. - ~ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAssertions.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAssertions.errors.txt.diff index 4e5f4b170c..c5c94d57ca 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAssertions.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAssertions.errors.txt.diff @@ -2,18 +2,15 @@ +++ new.jsFileCompilationTypeAssertions.errors.txt @@= skipped -0, +0 lines =@@ -/src/a.js(1,6): error TS8016: Type assertion expressions can only be used in TypeScript files. -+/src/a.js(2,9): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. /src/a.js(2,10): error TS17008: JSX element 'string' has no corresponding closing tag. /src/a.js(3,1): error TS1005: 'undefined; -+ ~~~~~~~~ -+!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. ~~~~~~ - !!! error TS17008: JSX element 'string' has no corresponding closing tag. - \ No newline at end of file + !!! error TS17008: JSX element 'string' has no corresponding closing tag. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileImportPreservedWhenUsed.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileImportPreservedWhenUsed.errors.txt.diff deleted file mode 100644 index f73614d1fc..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileImportPreservedWhenUsed.errors.txt.diff +++ /dev/null @@ -1,39 +0,0 @@ ---- old.jsFileImportPreservedWhenUsed.errors.txt -+++ new.jsFileImportPreservedWhenUsed.errors.txt -@@= skipped -0, +0 lines =@@ -- -+index.js(11,12): error TS2339: Property 'objects' does not exist on type 'object'. -+index.js(13,26): error TS2698: Spread types may only be created from object types. -+ -+ -+==== dash.d.ts (0 errors) ==== -+ type ObjectIterator = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult; -+ -+ interface LoDashStatic { -+ mapValues(obj: T | null | undefined, callback: ObjectIterator): { [P in keyof T]: TResult }; -+ } -+ declare const _: LoDashStatic; -+ export = _; -+==== Consts.ts (0 errors) ==== -+ export const INDEX_FIELD = '__INDEX'; -+==== index.js (2 errors) ==== -+ import * as _ from './dash'; -+ import { INDEX_FIELD } from './Consts'; -+ -+ export class Test { -+ /** -+ * @param {object} obj -+ * @param {object} vm -+ */ -+ test(obj, vm) { -+ let index = 0; -+ vm.objects = _.mapValues( -+ ~~~~~~~ -+!!! error TS2339: Property 'objects' does not exist on type 'object'. -+ obj, -+ object => ({ ...object, [INDEX_FIELD]: index++ }), -+ ~~~~~~~~~ -+!!! error TS2698: Spread types may only be created from object types. -+ ); -+ } -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsSelfReferencingArgumentsFunction.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsSelfReferencingArgumentsFunction.errors.txt.diff deleted file mode 100644 index f75cb7da5b..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsSelfReferencingArgumentsFunction.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.jsSelfReferencingArgumentsFunction.errors.txt -+++ new.jsSelfReferencingArgumentsFunction.errors.txt -@@= skipped -0, +0 lines =@@ -- -+foo.js(4,12): error TS2350: Only a void function can be called with the 'new' keyword. -+ -+ -+==== foo.js (1 errors) ==== -+ // Test #16139 -+ function Foo() { -+ arguments; -+ return new Foo(); -+ ~~~~~~~~~ -+!!! error TS2350: Only a void function can be called with the 'new' keyword. -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/localRequireFunction.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/localRequireFunction.errors.txt.diff deleted file mode 100644 index 0d6af3bd92..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/localRequireFunction.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.localRequireFunction.errors.txt -+++ new.localRequireFunction.errors.txt -@@= skipped -0, +0 lines =@@ -- -+app.js(1,10): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -+app.js(5,20): error TS2307: Cannot find module 'fs' or its corresponding type declarations. -+ -+ -+==== app.js (2 errors) ==== -+ function require(a) { -+ ~~~~~~~ -+!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -+ return a; -+ } -+ -+ const fs = require("fs"); -+ ~~~~ -+!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. -+ const text = fs.readFileSync("/a/b/c"); \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/misspelledJsDocTypedefTags.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/misspelledJsDocTypedefTags.errors.txt.diff deleted file mode 100644 index f225348bf2..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/misspelledJsDocTypedefTags.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.misspelledJsDocTypedefTags.errors.txt -+++ new.misspelledJsDocTypedefTags.errors.txt -@@= skipped -0, +0 lines =@@ -- -+a.js(2,11): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. -+a.js(4,48): error TS2304: Cannot find name 'B'. -+a.js(4,49): error TS8020: JSDoc types can only be used inside documentation comments. -+a.js(5,11): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. -+ -+ -+==== a.js (4 errors) ==== -+ /** @typedef {{ endTime: number, screenshots: number}} A.*/ -+ Animation.AnimationModel.ScreenshotCapture.Request; -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. -+ -+ /** @typedef {{ endTime: number, screenshots: !B.}} */ -+ ~ -+!!! error TS2304: Cannot find name 'B'. -+ ~ -+!!! error TS8020: JSDoc types can only be used inside documentation comments. -+ Animation.AnimationModel.ScreenshotCapture.Request; -+ ~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash1.errors.txt.diff index 5f2b3c954b..82ee9bc25c 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash1.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash1.errors.txt.diff @@ -1,19 +1,13 @@ --- old.parseJsxElementInUnaryExpressionNoCrash1.errors.txt +++ new.parseJsxElementInUnaryExpressionNoCrash1.errors.txt @@= skipped -0, +0 lines =@@ -+a.js(1,2): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. a.js(1,4): error TS1003: Identifier expected. -a.js(1,5): error TS1109: Expression expected. -- -- --==== a.js (2 errors) ==== +a.js(2,1): error TS1109: Expression expected. -+ -+ -+==== a.js (3 errors) ==== + + + ==== a.js (2 errors) ==== ~< < -+ ~ -+!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. ~ !!! error TS1003: Identifier expected. - diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash2.errors.txt.diff index 9fcfe26dd8..720a9ee422 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash2.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash2.errors.txt.diff @@ -2,18 +2,12 @@ +++ new.parseJsxElementInUnaryExpressionNoCrash2.errors.txt @@= skipped -0, +0 lines =@@ -a.js(1,9): error TS1109: Expression expected. -- -- --==== a.js (1 errors) ==== -+a.js(1,2): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. +a.js(2,1): error TS1109: Expression expected. -+ -+ -+==== a.js (2 errors) ==== + + + ==== a.js (1 errors) ==== ~<> < - -+ ~~ -+!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. + + !!! error TS1109: Expression expected. diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash3.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash3.errors.txt.diff deleted file mode 100644 index 21027bc24b..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/parseJsxElementInUnaryExpressionNoCrash3.errors.txt.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.parseJsxElementInUnaryExpressionNoCrash3.errors.txt -+++ new.parseJsxElementInUnaryExpressionNoCrash3.errors.txt -@@= skipped -0, +0 lines =@@ -+a.js(1,2): error TS17004: Cannot use JSX unless the '--jsx' flag is provided. -+a.js(1,2): error TS2872: This kind of expression is always truthy. - a.js(1,3): error TS17008: JSX element '' has no corresponding closing tag. - a.js(1,4): error TS1003: Identifier expected. - a.js(1,5): error TS1005: '...' expected. - a.js(3,1): error TS1005: ' -+ ~~~~~ -+!!! error TS17004: Cannot use JSX unless the '--jsx' flag is provided. -+ ~~~~~ - - !!! error TS17008: JSX element '' has no corresponding closing tag. - ~ -@@= skipped -13, +18 lines =@@ - !!! error TS1005: '...' expected. - - -+ -+ -+!!! error TS2872: This kind of expression is always truthy. - - !!! error TS1005: ' -+a.js(7,29): error TS2304: Cannot find name 'f'. -+a.js(7,38): error TS2304: Cannot find name 'f'. -+a.js(7,42): error TS2304: Cannot find name 'f'. -+a.js(7,64): error TS2304: Cannot find name 'l'. -+a.js(7,70): error TS2304: Cannot find name 'b'. -+a.js(7,100): error TS2304: Cannot find name 'o'. -+a.js(7,125): error TS2304: Cannot find name 'o'. -+a.js(7,154): error TS2304: Cannot find name 'o'. -+a.js(7,183): error TS2304: Cannot find name 'o'. -+a.js(13,42): error TS2304: Cannot find name 'f'. -+a.js(13,51): error TS2304: Cannot find name 'f'. -+a.js(13,55): error TS2304: Cannot find name 'f'. -+a.js(13,76): error TS2304: Cannot find name 'l'. -+a.js(13,82): error TS2304: Cannot find name 'b'. -+a.js(13,159): error TS2304: Cannot find name 'n'. -+a.js(13,194): error TS2304: Cannot find name 'n'. -+a.js(13,245): error TS2304: Cannot find name 'n'. -+a.js(13,297): error TS2304: Cannot find name 'n'. -+a.js(13,336): error TS2304: Cannot find name 'o'. -+a.js(14,33): error TS2304: Cannot find name 'f'. -+a.js(15,395): error TS2304: Cannot find name 'o'. -+a.js(15,486): error TS2304: Cannot find name 'o'. -+a.js(15,588): error TS2304: Cannot find name 'o'. -+a.js(15,678): error TS2304: Cannot find name 'o'. -+a.js(15,868): error TS2304: Cannot find name 'o'. -+a.js(15,970): error TS2304: Cannot find name 'o'. -+a.js(15,1061): error TS2304: Cannot find name 'o'. -+a.js(15,1165): error TS2304: Cannot find name 'o'. -+a.js(15,1353): error TS2304: Cannot find name 'o'. -+a.js(15,1443): error TS2304: Cannot find name 'o'. -+a.js(15,1547): error TS2304: Cannot find name 'o'. -+a.js(15,1646): error TS2304: Cannot find name 'o'. -+a.js(15,1849): error TS2304: Cannot find name 'o'. -+a.js(15,1939): error TS2304: Cannot find name 'o'. -+a.js(15,2041): error TS2304: Cannot find name 'o'. -+a.js(15,2145): error TS2304: Cannot find name 'o'. -+a.js(15,2321): error TS2304: Cannot find name 'o'. -+a.js(15,2422): error TS2304: Cannot find name 'o'. -+a.js(15,2525): error TS2304: Cannot find name 'o'. -+a.js(15,2616): error TS2304: Cannot find name 'o'. -+a.js(15,2792): error TS2304: Cannot find name 'o'. -+a.js(15,2894): error TS2304: Cannot find name 'o'. -+a.js(15,2984): error TS2304: Cannot find name 'o'. -+a.js(15,3087): error TS2304: Cannot find name 'o'. -+a.js(15,3288): error TS2304: Cannot find name 'o'. -+a.js(15,3378): error TS2304: Cannot find name 'o'. -+a.js(15,3481): error TS2304: Cannot find name 'o'. -+a.js(15,3584): error TS2304: Cannot find name 'o'. -+a.js(15,3761): error TS2304: Cannot find name 'o'. -+a.js(15,3864): error TS2304: Cannot find name 'o'. -+a.js(15,3964): error TS2304: Cannot find name 'o'. -+a.js(15,4055): error TS2304: Cannot find name 'o'. -+a.js(15,4234): error TS2304: Cannot find name 'o'. -+a.js(15,4322): error TS2304: Cannot find name 'o'. -+a.js(15,4415): error TS2304: Cannot find name 'o'. -+a.js(15,4495): error TS2304: Cannot find name 'o'. -+a.js(15,4671): error TS2304: Cannot find name 'o'. -+a.js(15,4762): error TS2304: Cannot find name 'o'. -+a.js(15,4842): error TS2304: Cannot find name 'o'. -+a.js(15,4934): error TS2304: Cannot find name 'o'. -+a.js(15,5122): error TS2304: Cannot find name 'o'. -+a.js(15,5201): error TS2304: Cannot find name 'o'. -+a.js(15,5282): error TS2304: Cannot find name 'o'. -+a.js(15,5374): error TS2304: Cannot find name 'o'. -+a.js(15,5538): error TS2304: Cannot find name 'o'. -+a.js(15,5629): error TS2304: Cannot find name 'o'. -+a.js(15,5721): error TS2304: Cannot find name 'o'. -+a.js(15,5801): error TS2304: Cannot find name 'o'. -+a.js(15,5967): error TS2304: Cannot find name 'o'. -+a.js(15,6049): error TS2304: Cannot find name 'o'. -+a.js(15,6163): error TS2304: Cannot find name 'o'. -+a.js(15,6258): error TS2304: Cannot find name 'o'. -+a.js(15,6425): error TS2304: Cannot find name 'o'. -+a.js(15,6506): error TS2304: Cannot find name 'o'. -+a.js(15,6633): error TS2304: Cannot find name 'o'. -+a.js(15,6725): error TS2304: Cannot find name 'o'. -+a.js(15,6906): error TS2304: Cannot find name 'o'. -+a.js(15,6987): error TS2304: Cannot find name 'o'. -+a.js(15,7112): error TS2304: Cannot find name 'o'. -+a.js(15,7207): error TS2304: Cannot find name 'o'. -+a.js(15,7350): error TS2304: Cannot find name 'o'. -+a.js(15,7443): error TS2304: Cannot find name 'o'. -+a.js(15,7582): error TS2304: Cannot find name 'o'. -+a.js(15,7663): error TS2304: Cannot find name 'o'. -+a.js(15,7755): error TS2304: Cannot find name 'o'. -+a.js(15,7781): error TS2304: Cannot find name 'o'. -+a.js(15,7812): error TS2304: Cannot find name 'o'. -+a.js(15,7846): error TS2304: Cannot find name 'o'. -+a.js(15,7877): error TS2304: Cannot find name 'o'. -+a.js(15,7911): error TS2304: Cannot find name 'o'. -+a.js(15,7942): error TS2304: Cannot find name 'o'. -+a.js(15,7977): error TS2304: Cannot find name 'o'. -+a.js(15,7992): error TS2304: Cannot find name 'f'. -+ -+ -+==== a.js (93 errors) ==== -+ function Y(e, t) { -+ e |= 0, t |= 0; -+ var r, i, a, u, s, c, d, h, p, _, m, g, y, A, T, v, M = 0, -+ E = 0, -+ w = 0, -+ S = 0; -+ v = f, (0 | (f = f + 288 | 0)) >= (0 | l) && b(288), T = v, A = t, M = 0 | o[(y = e) >> 2], E = 0 | o[(y + 4 | 0) >> 2], w = 0 | o[(y + 8 | 0) >> 2], S = 0 | o[(y + 12 | 0) >> 2], -+ ~ -+!!! error TS2304: Cannot find name 'f'. -+ ~ -+!!! error TS2304: Cannot find name 'f'. -+ ~ -+!!! error TS2304: Cannot find name 'f'. -+ ~ -+!!! error TS2304: Cannot find name 'l'. -+ ~ -+!!! error TS2304: Cannot find name 'b'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ function(e, t, r) { -+ e |= 0, t |= 0, r |= 0; -+ var i, a, u, s, c = 0, -+ d = 0, -+ h = 0; -+ for (s = f, (0 | (f = f + 32 | 0)) >= (0 | l) && b(32), i = e, a = t, u = r, d = 0, h = 0; h >>> 0 < u >>> 0;) c = 255 & (0 | n[(a + h | 0) >> 0]) | (255 & (0 | n[(a + (h + 1 | 0) | 0) >> 0])) << 8 | (255 & (0 | n[(a + (h + 2 | 0) | 0) >> 0])) << 16 | (255 & (0 | n[(a + (h + 3 | 0) | 0) >> 0])) << 24, o[(i + (d << 2) | 0) >> 2] = c, d = d + 1 | 0, h = h + 4 | 0; -+ ~ -+!!! error TS2304: Cannot find name 'f'. -+ ~ -+!!! error TS2304: Cannot find name 'f'. -+ ~ -+!!! error TS2304: Cannot find name 'f'. -+ ~ -+!!! error TS2304: Cannot find name 'l'. -+ ~ -+!!! error TS2304: Cannot find name 'b'. -+ ~ -+!!! error TS2304: Cannot find name 'n'. -+ ~ -+!!! error TS2304: Cannot find name 'n'. -+ ~ -+!!! error TS2304: Cannot find name 'n'. -+ ~ -+!!! error TS2304: Cannot find name 'n'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ f = s -+ ~ -+!!! error TS2304: Cannot find name 'f'. -+ }(T, A, 64), E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = (E = E + ((((w = (w = (w = w + (606105819 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E & w | (-1 ^ E) & S) + (0 | o[T >> 2]) | 0) - 680876936 | 0) | 0) << 7 | M >>> 25) + E | 0) & E | (-1 ^ M) & w) + (0 | o[(T + 4 | 0) >> 2]) | 0) - 389564586 | 0) | 0) << 12 | S >>> 20) + M | 0) & M | (-1 ^ S) & E) + (0 | o[(T + 8 | 0) >> 2]) | 0) | 0) | 0) << 17 | w >>> 15) + S | 0) & S | (-1 ^ w) & M) + (0 | o[(T + 12 | 0) >> 2]) | 0) - 1044525330 | 0) | 0) << 22 | E >>> 10) + w | 0) + ((((w = (w = (w = w + ((((S = (S = (S = S + (1200080426 + (((M = (M = (M = M + (((E & w | (-1 ^ E) & S) + (0 | o[(T + 16 | 0) >> 2]) | 0) - 176418897 | 0) | 0) << 7 | M >>> 25) + E | 0) & E | (-1 ^ M) & w) + (0 | o[(T + 20 | 0) >> 2]) | 0) | 0) | 0) << 12 | S >>> 20) + M | 0) & M | (-1 ^ S) & E) + (0 | o[(T + 24 | 0) >> 2]) | 0) - 1473231341 | 0) | 0) << 17 | w >>> 15) + S | 0) & S | (-1 ^ w) & M) + (0 | o[(T + 28 | 0) >> 2]) | 0) - 45705983 | 0) | 0) << 22 | E >>> 10) + w | 0) + ((((w = (w = (w = w + ((((S = (S = (S = S + ((((M = (M = (M = M + (1770035416 + ((E & w | (-1 ^ E) & S) + (0 | o[(T + 32 | 0) >> 2]) | 0) | 0) | 0) << 7 | M >>> 25) + E | 0) & E | (-1 ^ M) & w) + (0 | o[(T + 36 | 0) >> 2]) | 0) - 1958414417 | 0) | 0) << 12 | S >>> 20) + M | 0) & M | (-1 ^ S) & E) + (0 | o[(T + 40 | 0) >> 2]) | 0) - 42063 | 0) | 0) << 17 | w >>> 15) + S | 0) & S | (-1 ^ w) & M) + (0 | o[(T + 44 | 0) >> 2]) | 0) - 1990404162 | 0) | 0) << 22 | E >>> 10) + w | 0) + (1236535329 + (((w = (w = (w = w + ((((S = (S = (S = S + ((((M = (M = (M = M + (1804603682 + ((E & w | (-1 ^ E) & S) + (0 | o[(T + 48 | 0) >> 2]) | 0) | 0) | 0) << 7 | M >>> 25) + E | 0) & E | (-1 ^ M) & w) + (0 | o[(T + 52 | 0) >> 2]) | 0) - 40341101 | 0) | 0) << 12 | S >>> 20) + M | 0) & M | (-1 ^ S) & E) + (0 | o[(T + 56 | 0) >> 2]) | 0) - 1502002290 | 0) | 0) << 17 | w >>> 15) + S | 0) & S | (-1 ^ w) & M) + (0 | o[(T + 60 | 0) >> 2]) | 0) | 0) | 0) << 22 | E >>> 10) + w | 0) + ((((w = (w = (w = w + (643717713 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E & S | w & (-1 ^ S)) + (0 | o[(T + 4 | 0) >> 2]) | 0) - 165796510 | 0) | 0) << 5 | M >>> 27) + E | 0) & w | E & (-1 ^ w)) + (0 | o[(T + 24 | 0) >> 2]) | 0) - 1069501632 | 0) | 0) << 9 | S >>> 23) + M | 0) & E | M & (-1 ^ E)) + (0 | o[(T + 44 | 0) >> 2]) | 0) | 0) | 0) << 14 | w >>> 18) + S | 0) & M | S & (-1 ^ M)) + (0 | o[T >> 2]) | 0) - 373897302 | 0) | 0) << 20 | E >>> 12) + w | 0) + ((((w = (w = (w = w + ((((S = (S = (S = S + (38016083 + (((M = (M = (M = M + (((E & S | w & (-1 ^ S)) + (0 | o[(T + 20 | 0) >> 2]) | 0) - 701558691 | 0) | 0) << 5 | M >>> 27) + E | 0) & w | E & (-1 ^ w)) + (0 | o[(T + 40 | 0) >> 2]) | 0) | 0) | 0) << 9 | S >>> 23) + M | 0) & E | M & (-1 ^ E)) + (0 | o[(T + 60 | 0) >> 2]) | 0) - 660478335 | 0) | 0) << 14 | w >>> 18) + S | 0) & M | S & (-1 ^ M)) + (0 | o[(T + 16 | 0) >> 2]) | 0) - 405537848 | 0) | 0) << 20 | E >>> 12) + w | 0) + (1163531501 + (((w = (w = (w = w + ((((S = (S = (S = S + ((((M = (M = (M = M + (568446438 + ((E & S | w & (-1 ^ S)) + (0 | o[(T + 36 | 0) >> 2]) | 0) | 0) | 0) << 5 | M >>> 27) + E | 0) & w | E & (-1 ^ w)) + (0 | o[(T + 56 | 0) >> 2]) | 0) - 1019803690 | 0) | 0) << 9 | S >>> 23) + M | 0) & E | M & (-1 ^ E)) + (0 | o[(T + 12 | 0) >> 2]) | 0) - 187363961 | 0) | 0) << 14 | w >>> 18) + S | 0) & M | S & (-1 ^ M)) + (0 | o[(T + 32 | 0) >> 2]) | 0) | 0) | 0) << 20 | E >>> 12) + w | 0) + ((((w = (w = (w = w + (1735328473 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E & S | w & (-1 ^ S)) + (0 | o[(T + 52 | 0) >> 2]) | 0) - 1444681467 | 0) | 0) << 5 | M >>> 27) + E | 0) & w | E & (-1 ^ w)) + (0 | o[(T + 8 | 0) >> 2]) | 0) - 51403784 | 0) | 0) << 9 | S >>> 23) + M | 0) & E | M & (-1 ^ E)) + (0 | o[(T + 28 | 0) >> 2]) | 0) | 0) | 0) << 14 | w >>> 18) + S | 0) & M | S & (-1 ^ M)) + (0 | o[(T + 48 | 0) >> 2]) | 0) - 1926607734 | 0) | 0) << 20 | E >>> 12) + w | 0) + ((((w = (w = (w = w + (1839030562 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E ^ w ^ S) + (0 | o[(T + 20 | 0) >> 2]) | 0) - 378558 | 0) | 0) << 4 | M >>> 28) + E | 0) ^ E ^ w) + (0 | o[(T + 32 | 0) >> 2]) | 0) - 2022574463 | 0) | 0) << 11 | S >>> 21) + M | 0) ^ M ^ E) + (0 | o[(T + 44 | 0) >> 2]) | 0) | 0) | 0) << 16 | w >>> 16) + S | 0) ^ S ^ M) + (0 | o[(T + 56 | 0) >> 2]) | 0) - 35309556 | 0) | 0) << 23 | E >>> 9) + w | 0) + ((((w = (w = (w = w + ((((S = (S = (S = S + (1272893353 + (((M = (M = (M = M + (((E ^ w ^ S) + (0 | o[(T + 4 | 0) >> 2]) | 0) - 1530992060 | 0) | 0) << 4 | M >>> 28) + E | 0) ^ E ^ w) + (0 | o[(T + 16 | 0) >> 2]) | 0) | 0) | 0) << 11 | S >>> 21) + M | 0) ^ M ^ E) + (0 | o[(T + 28 | 0) >> 2]) | 0) - 155497632 | 0) | 0) << 16 | w >>> 16) + S | 0) ^ S ^ M) + (0 | o[(T + 40 | 0) >> 2]) | 0) - 1094730640 | 0) | 0) << 23 | E >>> 9) + w | 0) + (76029189 + (((w = (w = (w = w + ((((S = (S = (S = S + ((((M = (M = (M = M + (681279174 + ((E ^ w ^ S) + (0 | o[(T + 52 | 0) >> 2]) | 0) | 0) | 0) << 4 | M >>> 28) + E | 0) ^ E ^ w) + (0 | o[T >> 2]) | 0) - 358537222 | 0) | 0) << 11 | S >>> 21) + M | 0) ^ M ^ E) + (0 | o[(T + 12 | 0) >> 2]) | 0) - 722521979 | 0) | 0) << 16 | w >>> 16) + S | 0) ^ S ^ M) + (0 | o[(T + 24 | 0) >> 2]) | 0) | 0) | 0) << 23 | E >>> 9) + w | 0) + ((((w = (w = (w = w + (530742520 + (((S = (S = (S = S + ((((M = (M = (M = M + (((E ^ w ^ S) + (0 | o[(T + 36 | 0) >> 2]) | 0) - 640364487 | 0) | 0) << 4 | M >>> 28) + E | 0) ^ E ^ w) + (0 | o[(T + 48 | 0) >> 2]) | 0) - 421815835 | 0) | 0) << 11 | S >>> 21) + M | 0) ^ M ^ E) + (0 | o[(T + 60 | 0) >> 2]) | 0) | 0) | 0) << 16 | w >>> 16) + S | 0) ^ S ^ M) + (0 | o[(T + 8 | 0) >> 2]) | 0) - 995338651 | 0) | 0) << 23 | E >>> 9) + w | 0) + ((((S = (S = (S = S + (1126891415 + ((E ^ ((M = (M = (M = M + (((w ^ (E | -1 ^ S)) + (0 | o[T >> 2]) | 0) - 198630844 | 0) | 0) << 6 | M >>> 26) + E | 0) | -1 ^ w)) + (0 | o[(T + 28 | 0) >> 2]) | 0) | 0) | 0) << 10 | S >>> 22) + M | 0) ^ ((w = (w = (w = w + (((M ^ (S | -1 ^ E)) + (0 | o[(T + 56 | 0) >> 2]) | 0) - 1416354905 | 0) | 0) << 15 | w >>> 17) + S | 0) | -1 ^ M)) + (0 | o[(T + 20 | 0) >> 2]) | 0) - 57434055 | 0) | 0) << 21 | E >>> 11) + w | 0) + ((((S = (S = (S = S + (((E ^ ((M = (M = (M = M + (1700485571 + ((w ^ (E | -1 ^ S)) + (0 | o[(T + 48 | 0) >> 2]) | 0) | 0) | 0) << 6 | M >>> 26) + E | 0) | -1 ^ w)) + (0 | o[(T + 12 | 0) >> 2]) | 0) - 1894986606 | 0) | 0) << 10 | S >>> 22) + M | 0) ^ ((w = (w = (w = w + (((M ^ (S | -1 ^ E)) + (0 | o[(T + 40 | 0) >> 2]) | 0) - 1051523 | 0) | 0) << 15 | w >>> 17) + S | 0) | -1 ^ M)) + (0 | o[(T + 4 | 0) >> 2]) | 0) - 2054922799 | 0) | 0) << 21 | E >>> 11) + w | 0) + (1309151649 + (((S = (S = (S = S + (((E ^ ((M = (M = (M = M + (1873313359 + ((w ^ (E | -1 ^ S)) + (0 | o[(T + 32 | 0) >> 2]) | 0) | 0) | 0) << 6 | M >>> 26) + E | 0) | -1 ^ w)) + (0 | o[(T + 60 | 0) >> 2]) | 0) - 30611744 | 0) | 0) << 10 | S >>> 22) + M | 0) ^ ((w = (w = (w = w + (((M ^ (S | -1 ^ E)) + (0 | o[(T + 24 | 0) >> 2]) | 0) - 1560198380 | 0) | 0) << 15 | w >>> 17) + S | 0) | -1 ^ M)) + (0 | o[(T + 52 | 0) >> 2]) | 0) | 0) | 0) << 21 | E >>> 11) + w | 0) + ((((S = (S = (S = S + (((E ^ ((M = (M = (M = M + (((w ^ (E | -1 ^ S)) + (0 | o[(T + 16 | 0) >> 2]) | 0) - 145523070 | 0) | 0) << 6 | M >>> 26) + E | 0) | -1 ^ w)) + (0 | o[(T + 44 | 0) >> 2]) | 0) - 1120210379 | 0) | 0) << 10 | S >>> 22) + M | 0) ^ ((w = (w = (w = w + (718787259 + ((M ^ (S | -1 ^ E)) + (0 | o[(T + 8 | 0) >> 2]) | 0) | 0) | 0) << 15 | w >>> 17) + S | 0) | -1 ^ M)) + (0 | o[(T + 36 | 0) >> 2]) | 0) - 343485551 | 0) | 0) << 21 | E >>> 11) + w | 0, r = M, a = (0 | o[(i = y) >> 2]) + r | 0, o[i >> 2] = a, u = E, c = (0 | o[(s = y + 4 | 0) >> 2]) + u | 0, o[s >> 2] = c, d = w, p = (0 | o[(h = y + 8 | 0) >> 2]) + d | 0, o[h >> 2] = p, _ = S, g = (0 | o[(m = y + 12 | 0) >> 2]) + _ | 0, o[m >> 2] = g, f = v -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'o'. -+ ~ -+!!! error TS2304: Cannot find name 'f'. -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/reactImportDropped.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/reactImportDropped.errors.txt.diff deleted file mode 100644 index 2411246a3d..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/reactImportDropped.errors.txt.diff +++ /dev/null @@ -1,54 +0,0 @@ ---- old.reactImportDropped.errors.txt -+++ new.reactImportDropped.errors.txt -@@= skipped -0, +0 lines =@@ -- -+src/components/TabBar.js(1,16): error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. -+src/modules/navigation/NavigationView.js(2,22): error TS2307: Cannot find module '../../utils/theme' or its corresponding type declarations. -+src/modules/navigation/NavigationView.js(3,12): error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. -+src/modules/navigation/NavigationView.js(3,19): error TS2322: Type '{ height: any; }' is not assignable to type 'ClassicComponentClass'. -+ Property 'height' does not exist on type 'ClassicComponentClass'. -+ -+ -+==== react.d.ts (0 errors) ==== -+ export = React; -+ export as namespace React; -+ -+ declare namespace React { -+ -+ function createClass(spec: any): ClassicComponentClass; -+ -+ interface ClassicComponentClass { -+ new (props?: any): ClassicComponentClass; -+ } -+ } -+ -+ declare global { -+ namespace JSX { -+ interface ElementAttributesProperty { } -+ } -+ } -+ -+ -+==== src/components/TabBar.js (1 errors) ==== -+ export default React.createClass({ -+ ~~~~~ -+!!! error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. -+ render() { -+ return ( -+ null -+ ); -+ } -+ }); -+ -+==== src/modules/navigation/NavigationView.js (3 errors) ==== -+ import TabBar from '../../components/TabBar'; -+ import {layout} from '../../utils/theme'; // <- DO NOT DROP this import -+ ~~~~~~~~~~~~~~~~~~~ -+!!! error TS2307: Cannot find module '../../utils/theme' or its corresponding type declarations. -+ const x = ; -+ ~~~~~~ -+!!! error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. -+ ~~~~~~ -+!!! error TS2322: Type '{ height: any; }' is not assignable to type 'ClassicComponentClass'. -+!!! error TS2322: Property 'height' does not exist on type 'ClassicComponentClass'. -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/requireAsFunctionInExternalModule.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/requireAsFunctionInExternalModule.errors.txt.diff deleted file mode 100644 index 91e5a47b34..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/requireAsFunctionInExternalModule.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.requireAsFunctionInExternalModule.errors.txt -+++ new.requireAsFunctionInExternalModule.errors.txt -@@= skipped -0, +0 lines =@@ -- -+c.js(1,25): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -+m.js(1,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -+ -+ -+==== c.js (1 errors) ==== -+ export default function require(a) { } -+ ~~~~~~~ -+!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -+ export function has(a) { return true } -+ -+==== m.js (1 errors) ==== -+ import require, { has } from "./c" -+ ~~~~~~~ -+!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. -+ export function hello() { } -+ if (has('ember-debug')) { -+ require('ember-debug'); -+ } -+ -+==== m2.ts (0 errors) ==== -+ import { hello } from "./m"; -+ hello(); -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.errors.txt.diff deleted file mode 100644 index 84e49d351c..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/superNoModifiersCrash.errors.txt.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- old.superNoModifiersCrash.errors.txt -+++ new.superNoModifiersCrash.errors.txt -@@= skipped -0, +0 lines =@@ -- -+File.js(3,9): error TS2335: 'super' can only be referenced in a derived class. -+File.js(3,29): error TS2461: Type 'IArguments' is not an array type. -+File.js(9,5): error TS2416: Property 'initialize' in type 'Child' is not assignable to the same property in base type 'Parent'. -+ Type '() => void' is not assignable to type '() => string'. -+ Type 'void' is not assignable to type 'string'. -+ -+ -+==== File.js (3 errors) ==== -+ class Parent { -+ initialize() { -+ super.initialize(...arguments) -+ ~~~~~ -+!!! error TS2335: 'super' can only be referenced in a derived class. -+ ~~~~~~~~~ -+!!! error TS2461: Type 'IArguments' is not an array type. -+ return this.asdf = '' -+ } -+ } -+ -+ class Child extends Parent { -+ initialize() { -+ ~~~~~~~~~~ -+!!! error TS2416: Property 'initialize' in type 'Child' is not assignable to the same property in base type 'Parent'. -+!!! error TS2416: Type '() => void' is not assignable to type '() => string'. -+!!! error TS2416: Type 'void' is not assignable to type 'string'. -+ } -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/usedImportNotElidedInJs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/usedImportNotElidedInJs.errors.txt.diff deleted file mode 100644 index 68c0c24d63..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/usedImportNotElidedInJs.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.usedImportNotElidedInJs.errors.txt -+++ new.usedImportNotElidedInJs.errors.txt -@@= skipped -0, +0 lines =@@ -- -+test.js(1,25): error TS2307: Cannot find module 'moment' or its corresponding type declarations. -+test.js(2,35): error TS2307: Cannot find module 'moment' or its corresponding type declarations. -+test.js(3,48): error TS2448: Block-scoped variable 'moment' used before its declaration. -+ -+ -+==== test.js (3 errors) ==== -+ import * as moment from 'moment'; -+ ~~~~~~~~ -+!!! error TS2307: Cannot find module 'moment' or its corresponding type declarations. -+ import rollupMoment__default from 'moment'; -+ ~~~~~~~~ -+!!! error TS2307: Cannot find module 'moment' or its corresponding type declarations. -+ export const moment = rollupMoment__default || moment; -+ ~~~~~~ -+!!! error TS2448: Block-scoped variable 'moment' used before its declaration. -+!!! related TS2728 test.js:3:14: 'moment' is declared here. -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/computedPropertyNames52(target=es2015).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/computedPropertyNames52(target=es2015).errors.txt.diff deleted file mode 100644 index 58e30f4c51..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/computedPropertyNames52(target=es2015).errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.computedPropertyNames52(target=es2015).errors.txt -+++ new.computedPropertyNames52(target=es2015).errors.txt -@@= skipped -0, +0 lines =@@ -- -+computedPropertyNames52.js(4,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+computedPropertyNames52.js(4,9): error TS2411: Property '[i]' of type '() => typeof C' is not assignable to 'number' index type 'number'. -+computedPropertyNames52.js(5,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ -+ -+==== computedPropertyNames52.js (3 errors) ==== -+ const array = []; -+ for (let i = 0; i < 10; ++i) { -+ array.push(class C { -+ [i] = () => C; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ ~~~ -+!!! error TS2411: Property '[i]' of type '() => typeof C' is not assignable to 'number' index type 'number'. -+ static [i] = 100; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ }) -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/computedPropertyNames52(target=es5).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/computedPropertyNames52(target=es5).errors.txt.diff deleted file mode 100644 index 69c9a03c20..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/computedPropertyNames52(target=es5).errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.computedPropertyNames52(target=es5).errors.txt -+++ new.computedPropertyNames52(target=es5).errors.txt -@@= skipped -0, +0 lines =@@ -- -+computedPropertyNames52.js(4,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+computedPropertyNames52.js(4,9): error TS2411: Property '[i]' of type '() => typeof C' is not assignable to 'number' index type 'number'. -+computedPropertyNames52.js(5,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ -+ -+==== computedPropertyNames52.js (3 errors) ==== -+ const array = []; -+ for (let i = 0; i < 10; ++i) { -+ array.push(class C { -+ [i] = () => C; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ ~~~ -+!!! error TS2411: Property '[i]' of type '() => typeof C' is not assignable to 'number' index type 'number'. -+ static [i] = 100; -+ ~~~ -+!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ }) -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/constructorTagOnNestedBinaryExpression.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/constructorTagOnNestedBinaryExpression.errors.txt.diff deleted file mode 100644 index 057f9ca068..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/constructorTagOnNestedBinaryExpression.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.constructorTagOnNestedBinaryExpression.errors.txt -+++ new.constructorTagOnNestedBinaryExpression.errors.txt -@@= skipped -0, +0 lines =@@ -- -+constructorTagOnNestedBinaryExpression.js(3,1): error TS2304: Cannot find name 'a'. -+constructorTagOnNestedBinaryExpression.js(3,5): error TS2304: Cannot find name 'b'. -+ -+ -+==== constructorTagOnNestedBinaryExpression.js (2 errors) ==== -+ // Fixes #35021 -+ /** @constructor */ -+ a = b = function c () { -+ ~ -+!!! error TS2304: Cannot find name 'a'. -+ ~ -+!!! error TS2304: Cannot find name 'b'. -+ console.log(this) -+ }; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/esDecorators-classDeclaration-exportModifier.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/esDecorators-classDeclaration-exportModifier.errors.txt.diff new file mode 100644 index 0000000000..611a6b4b71 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/esDecorators-classDeclaration-exportModifier.errors.txt.diff @@ -0,0 +1,49 @@ +--- old.esDecorators-classDeclaration-exportModifier.errors.txt ++++ new.esDecorators-classDeclaration-exportModifier.errors.txt +@@= skipped -0, +0 lines =@@ +-file3.js(2,8): error TS1206: Decorators are not valid here. +-file6.js(2,13): error TS8038: Decorators may not appear after 'export' or 'export default' if they also appear before 'export'. +-file7.js(2,21): error TS8038: Decorators may not appear after 'export' or 'export default' if they also appear before 'export'. +- +- +-==== global.js (0 errors) ==== +- /** @type {*} */ +- var dec; +- +-==== file1.js (0 errors) ==== +- // ok +- @dec export class C1 { } +- +-==== file2.js (0 errors) ==== +- // ok +- @dec export default class C2 {} +- +-==== file3.js (1 errors) ==== +- // error +- export @dec default class C3 {} +- ~~~~ +-!!! error TS1206: Decorators are not valid here. +- +-==== file4.js (0 errors) ==== +- // ok +- export @dec class C4 {} +- +-==== file5.js (0 errors) ==== +- // ok +- export default @dec class C5 {} +- +-==== file6.js (1 errors) ==== +- // error +- @dec export @dec class C6 {} +- ~~~~ +-!!! error TS8038: Decorators may not appear after 'export' or 'export default' if they also appear before 'export'. +-!!! related TS1486 file6.js:2:1: Decorator used before 'export' here. +- +-==== file7.js (1 errors) ==== +- // error +- @dec export default @dec class C7 {} +- ~~~~ +-!!! error TS8038: Decorators may not appear after 'export' or 'export default' if they also appear before 'export'. +-!!! related TS1486 file7.js:2:1: Decorator used before 'export' here. +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/exportedAliasedEnumTag.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/exportedAliasedEnumTag.errors.txt.diff deleted file mode 100644 index d4cc297a31..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/exportedAliasedEnumTag.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.exportedAliasedEnumTag.errors.txt -+++ new.exportedAliasedEnumTag.errors.txt -@@= skipped -0, +0 lines =@@ -- -+exportedAliasedEnumTag.js(1,20): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+exportedAliasedEnumTag.js(4,14): error TS2339: Property 'Type' does not exist on type '{}'. -+ -+ -+==== exportedAliasedEnumTag.js (2 errors) ==== -+ var middlewarify = module.exports = {}; -+ ~~~~~~ -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+ -+ /** @enum */ -+ middlewarify.Type = { -+ ~~~~ -+!!! error TS2339: Property 'Type' does not exist on type '{}'. -+ BEFORE: 'before' -+ }; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferingFromAny.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferingFromAny.errors.txt.diff deleted file mode 100644 index a649bee5a8..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferingFromAny.errors.txt.diff +++ /dev/null @@ -1,121 +0,0 @@ ---- old.inferingFromAny.errors.txt -+++ new.inferingFromAny.errors.txt -@@= skipped -0, +0 lines =@@ -- -+a.js(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -+a.js(4,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(5,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(6,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(7,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(9,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -+a.js(14,5): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -+a.js(15,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(16,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(18,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+a.js(19,13): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. -+ -+ -+==== a.ts (0 errors) ==== -+ var a: any; -+ var t: [any, any]; -+ declare function f1(t: T): T -+ declare function f2(t: T[]): T; -+ declare function f3(t: [T, U]): [T, U]; -+ declare function f4(x: { bar: T; baz: T }): T; -+ declare function f5(x: (a: T) => void): T; -+ declare function f6(x: new (a: T) => {}): T; -+ declare function f7(x: (a: any) => a is T): T; -+ declare function f8(x: () => T): T; -+ declare function f9(x: new () => T): T; -+ declare function f10(x: { [x: string]: T }): T; -+ declare function f11(x: { [x: number]: T }): T; -+ declare function f12(x: T | U): [T, U]; -+ declare function f13(x: T & U): [T, U]; -+ declare function f14(x: { a: T | U, b: U & T }): [T, U]; -+ interface I { } -+ declare function f15(x: I): T; -+ declare function f16(x: Partial): T; -+ declare function f17(x: {[P in keyof T]: K}): T; -+ declare function f18(x: {[P in K]: T[P]}): T; -+ declare function f19(k: K, x: T[K]): T; -+ -+==== a.js (18 errors) ==== -+ var a = f1(a); -+ var a = f2(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var t = f3(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -+!!! related TS6203 a.ts:2:5: 't' was also declared here. -+ var a = f4(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f5(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f6(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f7(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f8(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f9(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f10(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f11(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var t = f12(a); -+ var t = f13(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -+!!! related TS6203 a.ts:2:5: 't' was also declared here. -+ var t = f14(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type '[any, any]', but here has type '[unknown, unknown]'. -+!!! related TS6203 a.ts:2:5: 't' was also declared here. -+ var a = f15(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f16(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f17(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f18(a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ var a = f19(a, a); -+ ~ -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'unknown'. -+!!! related TS6203 a.ts:1:5: 'a' was also declared here. -+ ~ -+!!! error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassStaticMembersFromAssignments.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassStaticMembersFromAssignments.errors.txt.diff index 6d052e20dc..8dc4f4a5d8 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassStaticMembersFromAssignments.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassStaticMembersFromAssignments.errors.txt.diff @@ -2,57 +2,39 @@ +++ new.inferringClassStaticMembersFromAssignments.errors.txt @@= skipped -0, +0 lines =@@ - -+a.js(2,4): error TS2339: Property 'staticProp' does not exist on type 'typeof C1'. -+a.js(8,4): error TS2339: Property 'staticProp' does not exist on type 'typeof C2'. -+a.js(11,4): error TS2339: Property 'staticProp' does not exist on type '() => void'. +b.ts(4,14): error TS2339: Property 'staticProp' does not exist on type 'typeof C1'. +b.ts(5,14): error TS2339: Property 'staticProp' does not exist on type 'typeof C2'. +b.ts(7,14): error TS2339: Property 'staticProp' does not exist on type '() => void'. +b.ts(10,12): error TS2339: Property 'staticProp' does not exist on type 'typeof C3'. +b.ts(11,12): error TS2339: Property 'staticProp' does not exist on type 'typeof C4'. +b.ts(13,12): error TS2339: Property 'staticProp' does not exist on type '() => void'. -+global.js(2,4): error TS2339: Property 'staticProp' does not exist on type 'typeof C3'. -+global.js(8,4): error TS2339: Property 'staticProp' does not exist on type 'typeof C4'. -+global.js(11,4): error TS2339: Property 'staticProp' does not exist on type '() => void'. + + -+==== a.js (3 errors) ==== ++==== a.js (0 errors) ==== + export class C1 { } + C1.staticProp = 0; -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'staticProp' does not exist on type 'typeof C1'. + + export function F1() { } + F1.staticProp = 0; + + export var C2 = class { }; + C2.staticProp = 0; -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'staticProp' does not exist on type 'typeof C2'. + + export let F2 = function () { }; + F2.staticProp = 0; -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'staticProp' does not exist on type '() => void'. + -+==== global.js (3 errors) ==== ++==== global.js (0 errors) ==== + class C3 { } + C3.staticProp = 0; -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'staticProp' does not exist on type 'typeof C3'. + + function F3() { } + F3.staticProp = 0; + + var C4 = class { }; + C4.staticProp = 0; -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'staticProp' does not exist on type 'typeof C4'. + + let F4 = function () { }; + F4.staticProp = 0; -+ ~~~~~~~~~~ -+!!! error TS2339: Property 'staticProp' does not exist on type '() => void'. + +==== b.ts (6 errors) ==== + import * as a from "./a"; diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff index 95062c15cb..bcd8506c1b 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff @@ -2,9 +2,6 @@ +++ new.jsObjectsMarkedAsOpenEnded.errors.txt @@= skipped -0, +0 lines =@@ - -+a.js(2,10): error TS2339: Property 'a' does not exist on type '{}'. -+a.js(8,21): error TS2339: Property 'a' does not exist on type '{}'. -+a.js(16,14): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(1,10): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(2,18): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(3,29): error TS2339: Property 'a' does not exist on type '{}'. @@ -13,19 +10,15 @@ +b.ts(6,10): error TS2339: Property 'a' does not exist on type '{}'. + + -+==== a.js (3 errors) ==== ++==== a.js (0 errors) ==== + var variable = {}; + variable.a = 0; -+ ~ -+!!! error TS2339: Property 'a' does not exist on type '{}'. + + class C { + initializedMember = {}; + constructor() { + this.member = {}; + this.member.a = 0; -+ ~ -+!!! error TS2339: Property 'a' does not exist on type '{}'. + } + } + @@ -34,8 +27,6 @@ + }; + + obj.property.a = 0; -+ ~ -+!!! error TS2339: Property 'a' does not exist on type '{}'. + + var arr = [{}]; + diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReturnTag1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReturnTag1.errors.txt.diff deleted file mode 100644 index ce2a434564..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReturnTag1.errors.txt.diff +++ /dev/null @@ -1,37 +0,0 @@ ---- old.jsdocReturnTag1.errors.txt -+++ new.jsdocReturnTag1.errors.txt -@@= skipped -0, +0 lines =@@ -- -+returns.js(5,5): error TS2322: Type 'number' is not assignable to type 'string'. -+returns.js(12,5): error TS2322: Type 'number' is not assignable to type 'string'. -+returns.js(19,12): error TS2872: This kind of expression is always truthy. -+ -+ -+==== returns.js (3 errors) ==== -+ /** -+ * @returns {string} This comment is not currently exposed -+ */ -+ function f() { -+ return 5; -+ ~~~~~~ -+!!! error TS2322: Type 'number' is not assignable to type 'string'. -+ } -+ -+ /** -+ * @returns {string=} This comment is not currently exposed -+ */ -+ function f1() { -+ return 5; -+ ~~~~~~ -+!!! error TS2322: Type 'number' is not assignable to type 'string'. -+ } -+ -+ /** -+ * @returns {string|number} This comment is not currently exposed -+ */ -+ function f2() { -+ return 5 || "hello"; -+ ~ -+!!! error TS2872: This kind of expression is always truthy. -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTag.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTag.errors.txt.diff index 7612097345..1ff5aec39c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTag.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTag.errors.txt.diff @@ -2,13 +2,6 @@ +++ new.jsdocTypeTag.errors.txt @@= skipped -0, +0 lines =@@ - -+a.js(19,12): error TS2304: Cannot find name 'Void'. -+a.js(25,12): error TS2304: Cannot find name 'Undefined'. -+a.js(31,12): error TS2304: Cannot find name 'Null'. -+a.js(37,12): error TS2314: Generic type 'T[]' requires 1 type argument(s). -+a.js(40,12): error TS2552: Cannot find name 'array'. Did you mean 'Array'? -+a.js(43,12): error TS2314: Generic type 'Promise' requires 1 type argument(s). -+a.js(46,12): error TS2552: Cannot find name 'promise'. Did you mean 'Promise'? +b.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'S' must be of type 'String', but here has type 'string'. +b.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'N' must be of type 'Number', but here has type 'number'. +b.ts(5,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'B' must be of type 'Boolean', but here has type 'boolean'. @@ -16,7 +9,7 @@ +b.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'obj' must be of type 'object', but here has type 'any'. + + -+==== a.js (7 errors) ==== ++==== a.js (0 errors) ==== + /** @type {String} */ + var S; + @@ -36,48 +29,33 @@ + var b; + + /** @type {Void} */ -+ ~~~~ -+!!! error TS2304: Cannot find name 'Void'. + var V; + + /** @type {void} */ + var v; + + /** @type {Undefined} */ -+ ~~~~~~~~~ -+!!! error TS2304: Cannot find name 'Undefined'. + var U; + + /** @type {undefined} */ + var u; + + /** @type {Null} */ -+ ~~~~ -+!!! error TS2304: Cannot find name 'Null'. + var Nl; + + /** @type {null} */ + var nl; + + /** @type {Array} */ -+ ~~~~~ -+!!! error TS2314: Generic type 'T[]' requires 1 type argument(s). + var A; + + /** @type {array} */ -+ ~~~~~ -+!!! error TS2552: Cannot find name 'array'. Did you mean 'Array'? -+!!! related TS2728 lib.es5.d.ts:--:--: 'Array' is declared here. + var a; + + /** @type {Promise} */ -+ ~~~~~~~ -+!!! error TS2314: Generic type 'Promise' requires 1 type argument(s). + var P; + + /** @type {promise} */ -+ ~~~~~~~ -+!!! error TS2552: Cannot find name 'promise'. Did you mean 'Promise'? + var p; + + /** @type {?number} */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAlias.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAlias.errors.txt.diff index 356508e4dd..fe5f4f689c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAlias.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/moduleExportAlias.errors.txt.diff @@ -22,39 +22,6 @@ +a.ts(19,3): error TS2339: Property 'func18' does not exist on type '{}'. +a.ts(20,3): error TS2339: Property 'func19' does not exist on type '{}'. +a.ts(21,3): error TS2339: Property 'func20' does not exist on type '{}'. -+b.js(2,14): error TS2339: Property 'func1' does not exist on type 'typeof import("b")'. -+b.js(3,9): error TS2339: Property 'func2' does not exist on type 'typeof import("b")'. -+b.js(6,20): error TS2339: Property 'func3' does not exist on type '{}'. -+b.js(7,16): error TS2339: Property 'func4' does not exist on type '{}'. -+b.js(9,33): error TS2631: Cannot assign to '"b"' because it is a namespace. -+b.js(10,27): error TS2339: Property 'func5' does not exist on type '{}'. -+b.js(13,27): error TS2339: Property 'func6' does not exist on type 'typeof import("b")'. -+b.js(17,27): error TS2339: Property 'func7' does not exist on type 'typeof import("b")'. -+b.js(20,27): error TS2339: Property 'func8' does not exist on type '{}'. -+b.js(22,50): error TS2631: Cannot assign to '"b"' because it is a namespace. -+b.js(23,27): error TS2339: Property 'func9' does not exist on type '{}'. -+b.js(25,33): error TS2631: Cannot assign to '"b"' because it is a namespace. -+b.js(26,27): error TS2339: Property 'func10' does not exist on type '{}'. -+b.js(28,1): error TS2631: Cannot assign to '"b"' because it is a namespace. -+b.js(29,9): error TS2339: Property 'func11' does not exist on type 'typeof import("b")'. -+b.js(30,16): error TS2339: Property 'func12' does not exist on type '{}'. -+b.js(32,1): error TS2631: Cannot assign to '"b"' because it is a namespace. -+b.js(33,9): error TS2339: Property 'func11' does not exist on type 'typeof import("b")'. -+b.js(34,16): error TS2339: Property 'func12' does not exist on type '{}'. -+b.js(36,1): error TS2631: Cannot assign to '"b"' because it is a namespace. -+b.js(37,9): error TS2339: Property 'func13' does not exist on type 'typeof import("b")'. -+b.js(38,16): error TS2339: Property 'func14' does not exist on type '{}'. -+b.js(40,1): error TS2631: Cannot assign to '"b"' because it is a namespace. -+b.js(41,9): error TS2339: Property 'func15' does not exist on type 'typeof import("b")'. -+b.js(42,16): error TS2339: Property 'func16' does not exist on type '{}'. -+b.js(44,1): error TS2300: Duplicate identifier 'export='. -+b.js(44,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -+b.js(44,18): error TS2631: Cannot assign to '"b"' because it is a namespace. -+b.js(45,9): error TS2339: Property 'func17' does not exist on type 'typeof import("b")'. -+b.js(46,16): error TS2339: Property 'func18' does not exist on type '{}'. -+b.js(48,1): error TS2300: Duplicate identifier 'export='. -+b.js(49,9): error TS2339: Property 'func19' does not exist on type 'typeof import("b")'. -+b.js(50,16): error TS2339: Property 'func20' does not exist on type '{}'. + + +==== a.ts (20 errors) ==== @@ -121,122 +88,56 @@ +!!! error TS2339: Property 'func20' does not exist on type '{}'. + + -+==== b.js (33 errors) ==== ++==== b.js (0 errors) ==== + var exportsAlias = exports; + exportsAlias.func1 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func1' does not exist on type 'typeof import("b")'. + exports.func2 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func2' does not exist on type 'typeof import("b")'. + + var moduleExportsAlias = module.exports; + moduleExportsAlias.func3 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func3' does not exist on type '{}'. + module.exports.func4 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func4' does not exist on type '{}'. + + var multipleDeclarationAlias1 = exports = module.exports; -+ ~~~~~~~ -+!!! error TS2631: Cannot assign to '"b"' because it is a namespace. + multipleDeclarationAlias1.func5 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func5' does not exist on type '{}'. + + var multipleDeclarationAlias2 = module.exports = exports; + multipleDeclarationAlias2.func6 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func6' does not exist on type 'typeof import("b")'. + + var someOtherVariable; + var multipleDeclarationAlias3 = someOtherVariable = exports; + multipleDeclarationAlias3.func7 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func7' does not exist on type 'typeof import("b")'. + + var multipleDeclarationAlias4 = someOtherVariable = module.exports; + multipleDeclarationAlias4.func8 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func8' does not exist on type '{}'. + + var multipleDeclarationAlias5 = module.exports = exports = {}; -+ ~~~~~~~ -+!!! error TS2631: Cannot assign to '"b"' because it is a namespace. + multipleDeclarationAlias5.func9 = function () { }; -+ ~~~~~ -+!!! error TS2339: Property 'func9' does not exist on type '{}'. + + var multipleDeclarationAlias6 = exports = module.exports = {}; -+ ~~~~~~~ -+!!! error TS2631: Cannot assign to '"b"' because it is a namespace. + multipleDeclarationAlias6.func10 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func10' does not exist on type '{}'. + + exports = module.exports = someOtherVariable = {}; -+ ~~~~~~~ -+!!! error TS2631: Cannot assign to '"b"' because it is a namespace. + exports.func11 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func11' does not exist on type 'typeof import("b")'. + module.exports.func12 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func12' does not exist on type '{}'. + + exports = module.exports = someOtherVariable = {}; -+ ~~~~~~~ -+!!! error TS2631: Cannot assign to '"b"' because it is a namespace. + exports.func11 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func11' does not exist on type 'typeof import("b")'. + module.exports.func12 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func12' does not exist on type '{}'. + + exports = module.exports = {}; -+ ~~~~~~~ -+!!! error TS2631: Cannot assign to '"b"' because it is a namespace. + exports.func13 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func13' does not exist on type 'typeof import("b")'. + module.exports.func14 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func14' does not exist on type '{}'. + + exports = module.exports = {}; -+ ~~~~~~~ -+!!! error TS2631: Cannot assign to '"b"' because it is a namespace. + exports.func15 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func15' does not exist on type 'typeof import("b")'. + module.exports.func16 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func16' does not exist on type '{}'. + + module.exports = exports = {}; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2300: Duplicate identifier 'export='. -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS2309: An export assignment cannot be used in a module with other exported elements. -+ ~~~~~~~ -+!!! error TS2631: Cannot assign to '"b"' because it is a namespace. + exports.func17 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func17' does not exist on type 'typeof import("b")'. + module.exports.func18 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func18' does not exist on type '{}'. + + module.exports = {}; -+ ~~~~~~~~~~~~~~~~~~~ -+!!! error TS2300: Duplicate identifier 'export='. + exports.func19 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func19' does not exist on type 'typeof import("b")'. + module.exports.func20 = function () { }; -+ ~~~~~~ -+!!! error TS2339: Property 'func20' does not exist on type '{}'. + + \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/multipleDeclarations.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/multipleDeclarations.errors.txt.diff deleted file mode 100644 index 382bf9328a..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/multipleDeclarations.errors.txt.diff +++ /dev/null @@ -1,54 +0,0 @@ ---- old.multipleDeclarations.errors.txt -+++ new.multipleDeclarations.errors.txt -@@= skipped -0, +0 lines =@@ -- -+input.js(10,9): error TS2322: Type 'string' is not assignable to type '() => void'. -+input.js(18,1): error TS2322: Type 'boolean' is not assignable to type '() => void'. -+input.js(28,9): error TS2322: Type 'string' is not assignable to type '() => void'. -+input.js(31,1): error TS2322: Type 'boolean' is not assignable to type '() => void'. -+ -+ -+==== input.js (4 errors) ==== -+ function C() { -+ this.m = null; -+ } -+ C.prototype.m = function() { -+ this.nothing(); -+ } -+ class X { -+ constructor() { -+ this.m = this.m.bind(this); -+ this.mistake = 'frankly, complete nonsense'; -+ ~~~~~~~~~~~~ -+!!! error TS2322: Type 'string' is not assignable to type '() => void'. -+ } -+ m() { -+ } -+ mistake() { -+ } -+ } -+ let x = new X(); -+ X.prototype.mistake = false; -+ ~~~~~~~~~~~~~~~~~~~ -+!!! error TS2322: Type 'boolean' is not assignable to type '() => void'. -+ x.m(); -+ x.mistake; -+ class Y { -+ mistake() { -+ } -+ m() { -+ } -+ constructor() { -+ this.m = this.m.bind(this); -+ this.mistake = 'even more nonsense'; -+ ~~~~~~~~~~~~ -+!!! error TS2322: Type 'string' is not assignable to type '() => void'. -+ } -+ } -+ Y.prototype.mistake = true; -+ ~~~~~~~~~~~~~~~~~~~ -+!!! error TS2322: Type 'boolean' is not assignable to type '() => void'. -+ let y = new Y(); -+ y.m(); -+ y.mistake(); -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/override_js1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/override_js1.errors.txt.diff deleted file mode 100644 index 6d37472310..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/override_js1.errors.txt.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- old.override_js1.errors.txt -+++ new.override_js1.errors.txt -@@= skipped -0, +0 lines =@@ -- -+a.js(7,5): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. -+a.js(9,5): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. -+ -+ -+==== a.js (2 errors) ==== -+ class B { -+ foo (v) {} -+ fooo (v) {} -+ } -+ -+ class D extends B { -+ foo (v) {} -+ ~~~ -+!!! error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. -+ /** @override */ -+ fooo (v) {} -+ ~~~~ -+!!! error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'B'. -+ /** @override */ -+ bar(v) {} -+ } -+ -+ class C { -+ foo () {} -+ /** @override */ -+ fooo (v) {} -+ /** @override */ -+ bar(v) {} -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/plainJSBinderErrors.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/plainJSBinderErrors.errors.txt.diff deleted file mode 100644 index a124c46387..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/plainJSBinderErrors.errors.txt.diff +++ /dev/null @@ -1,56 +0,0 @@ ---- old.plainJSBinderErrors.errors.txt -+++ new.plainJSBinderErrors.errors.txt -@@= skipped -5, +5 lines =@@ - plainJSBinderErrors.js(9,11): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. - plainJSBinderErrors.js(12,5): error TS18012: '#constructor' is a reserved word. - plainJSBinderErrors.js(15,20): error TS1102: 'delete' cannot be called on an identifier in strict mode. -+plainJSBinderErrors.js(15,20): error TS2703: The operand of a 'delete' operator must be a property reference. - plainJSBinderErrors.js(18,16): error TS1102: 'delete' cannot be called on an identifier in strict mode. -+plainJSBinderErrors.js(18,16): error TS2703: The operand of a 'delete' operator must be a property reference. - plainJSBinderErrors.js(19,16): error TS1102: 'delete' cannot be called on an identifier in strict mode. -+plainJSBinderErrors.js(19,16): error TS2703: The operand of a 'delete' operator must be a property reference. - plainJSBinderErrors.js(22,15): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'eval'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. - plainJSBinderErrors.js(23,15): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. - plainJSBinderErrors.js(27,9): error TS1101: 'with' statements are not allowed in strict mode. -+plainJSBinderErrors.js(27,9): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - plainJSBinderErrors.js(33,13): error TS1344: 'A label is not allowed here. - plainJSBinderErrors.js(34,13): error TS1107: Jump target cannot cross function boundary. - plainJSBinderErrors.js(39,7): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. - plainJSBinderErrors.js(40,7): error TS1215: Invalid use of 'arguments'. Modules are automatically in strict mode. - - --==== plainJSBinderErrors.js (17 errors) ==== -+==== plainJSBinderErrors.js (21 errors) ==== - export default 12 - ~~~~~~~~~~~~~~~~~ - !!! error TS2528: A module cannot have multiple default exports. -@@= skipped -45, +49 lines =@@ - delete f - ~ - !!! 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. - } - var g = 6 - delete g - ~ - !!! 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. - delete container - ~~~~~~~~~ - !!! 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. - } - evalArguments() { - const eval = 7 -@@= skipped -22, +28 lines =@@ - with (redundant) { - ~~~~ - !!! error TS1101: 'with' statements are not allowed in strict mode. -+ ~~~~~~~~~~~~~~~~ -+!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - return toFixed() - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/plainJSGrammarErrors.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/plainJSGrammarErrors.errors.txt.diff index e565da34a1..56d5793373 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/plainJSGrammarErrors.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/plainJSGrammarErrors.errors.txt.diff @@ -1,11 +1,6 @@ --- old.plainJSGrammarErrors.errors.txt +++ new.plainJSGrammarErrors.errors.txt -@@= skipped -0, +0 lines =@@ - plainJSGrammarErrors.js(3,9): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression - plainJSGrammarErrors.js(5,9): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression -+plainJSGrammarErrors.js(6,13): error TS2339: Property '#po' does not exist on type 'this'. - plainJSGrammarErrors.js(10,15): error TS2803: Cannot assign to private method '#m'. Private methods are not writable. - plainJSGrammarErrors.js(14,13): error TS18038: 'for await' loops cannot be used inside a class static block. +@@= skipped -4, +4 lines =@@ plainJSGrammarErrors.js(17,9): error TS18041: A 'return' statement cannot be used inside a class static block. plainJSGrammarErrors.js(20,5): error TS1089: 'static' modifier cannot appear on a constructor declaration. plainJSGrammarErrors.js(21,5): error TS1089: 'async' modifier cannot appear on a constructor declaration. @@ -20,13 +15,7 @@ plainJSGrammarErrors.js(30,5): error TS1031: 'export' modifier cannot appear on class elements of this kind. plainJSGrammarErrors.js(34,22): error TS1005: '{' expected. plainJSGrammarErrors.js(35,9): error TS1054: A 'get' accessor cannot have parameters. -@@= skipped -23, +21 lines =@@ - plainJSGrammarErrors.js(46,25): error TS1172: 'extends' clause already seen. - plainJSGrammarErrors.js(47,25): error TS1174: Classes can only extend a single class. - plainJSGrammarErrors.js(49,1): error TS18016: Private identifiers are not allowed outside class bodies. -+plainJSGrammarErrors.js(50,1): error TS2304: Cannot find name 'junk'. - plainJSGrammarErrors.js(50,6): error TS18016: Private identifiers are not allowed outside class bodies. - plainJSGrammarErrors.js(51,9): error TS18013: Property '#m' is not accessible outside class 'C' because it has a private identifier. +@@= skipped -24, +21 lines =@@ plainJSGrammarErrors.js(54,8): error TS1030: 'export' modifier already seen. plainJSGrammarErrors.js(55,8): error TS1044: 'static' modifier cannot appear on a module or namespace element. plainJSGrammarErrors.js(56,22): error TS1090: 'static' modifier cannot appear on a parameter. @@ -43,61 +32,24 @@ plainJSGrammarErrors.js(64,1): error TS1042: 'async' modifier cannot be used here. plainJSGrammarErrors.js(65,1): error TS1042: 'async' modifier cannot be used here. plainJSGrammarErrors.js(66,1): error TS1042: 'async' modifier cannot be used here. - plainJSGrammarErrors.js(67,1): error TS1191: An import declaration cannot have modifiers. - plainJSGrammarErrors.js(68,1): error TS1193: An export declaration cannot have modifiers. - plainJSGrammarErrors.js(70,5): error TS1474: An export declaration can only be used at the top level of a module. -+plainJSGrammarErrors.js(70,14): error TS2303: Circular definition of import alias 'staticParam'. - plainJSGrammarErrors.js(71,5): error TS1473: An import declaration can only be used at the top level of a module. - plainJSGrammarErrors.js(72,5): error TS1258: A default export must be at the top level of a file or module declaration. - plainJSGrammarErrors.js(75,5): error TS1184: Modifiers cannot appear here. -@@= skipped -35, +33 lines =@@ - plainJSGrammarErrors.js(93,42): error TS1186: A rest element cannot have an initializer. - plainJSGrammarErrors.js(96,4): error TS1123: Variable declaration list cannot be empty. - plainJSGrammarErrors.js(97,9): error TS5076: '||' and '??' operations cannot be mixed without parentheses. -+plainJSGrammarErrors.js(98,9): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish. -+plainJSGrammarErrors.js(98,14): error TS2872: This kind of expression is always truthy. - plainJSGrammarErrors.js(98,14): error TS5076: '||' and '??' operations cannot be mixed without parentheses. - plainJSGrammarErrors.js(100,3): error TS1200: Line terminator not permitted before arrow. -+plainJSGrammarErrors.js(102,1): error TS2349: This expression is not callable. -+ Type 'number[]' has no call signatures. - plainJSGrammarErrors.js(102,4): error TS1358: Tagged template expressions are not permitted in an optional chain. - plainJSGrammarErrors.js(104,6): error TS1171: A comma expression is not allowed in a computed property name. - plainJSGrammarErrors.js(105,5): error TS18016: Private identifiers are not allowed outside class bodies. +@@= skipped -38, +34 lines =@@ plainJSGrammarErrors.js(106,5): error TS1042: 'export' modifier cannot be used here. plainJSGrammarErrors.js(108,25): error TS1162: An object member cannot be declared optional. plainJSGrammarErrors.js(109,6): error TS1162: An object member cannot be declared optional. -plainJSGrammarErrors.js(109,6): error TS8009: The '?' modifier can only be used in TypeScript files. -+plainJSGrammarErrors.js(110,5): error TS18004: No value exists in scope for the shorthand property 'definitely'. Either declare one or provide an initializer. plainJSGrammarErrors.js(110,15): error TS1255: A definite assignment assertion '!' is not permitted in this context. plainJSGrammarErrors.js(111,19): error TS1255: A definite assignment assertion '!' is not permitted in this context. plainJSGrammarErrors.js(114,16): error TS1312: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern. -@@= skipped -40, +44 lines =@@ - plainJSGrammarErrors.js(202,22): error TS17012: 'targe' is not a valid meta-property for keyword 'new'. Did you mean 'target'? - plainJSGrammarErrors.js(203,30): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments - plainJSGrammarErrors.js(204,30): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments -+plainJSGrammarErrors.js(204,37): error TS2307: Cannot find module '1' or its corresponding type declarations. -+plainJSGrammarErrors.js(204,42): error TS2559: Type '"2"' has no properties in common with type 'ImportCallOptions'. +@@= skipped -35, +34 lines =@@ plainJSGrammarErrors.js(205,36): error TS1325: Argument of dynamic import cannot be spread element. -- -- + + -==== plainJSGrammarErrors.js (102 errors) ==== -+plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be used within a function body. -+ -+ -+==== plainJSGrammarErrors.js (104 errors) ==== ++==== plainJSGrammarErrors.js (94 errors) ==== class C { // #private mistakes q = #unbound -@@= skipped -14, +17 lines =@@ - ~~ - !!! error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression - if (#po in this) { -+ ~~~ -+!!! error TS2339: Property '#po' does not exist on type 'this'. - } - } - #m() { -@@= skipped -26, +28 lines =@@ +@@= skipped -37, +37 lines =@@ ~~~~~ !!! error TS1089: 'async' modifier cannot appear on a constructor declaration. const x = 1 @@ -120,16 +72,7 @@ export cantExportMethod() { ~~~~~~ !!! error TS1031: 'export' modifier cannot appear on class elements of this kind. -@@= skipped -45, +43 lines =@@ - ~~~~~~~~~~ - !!! error TS18016: Private identifiers are not allowed outside class bodies. - junk.#m -+ ~~~~ -+!!! error TS2304: Cannot find name 'junk'. - ~~ - !!! error TS18016: Private identifiers are not allowed outside class bodies. - new C().#m -@@= skipped -16, +18 lines =@@ +@@= skipped -61, +59 lines =@@ function staticParam(static x = 1) { return x } ~~~~~~ !!! error TS1090: 'static' modifier cannot appear on a parameter. @@ -160,61 +103,12 @@ } async const cantAsyncConst = 2 ~~~~~ -@@= skipped -22, +20 lines =@@ - export { staticParam } - ~~~~~~ - !!! error TS1474: An export declaration can only be used at the top level of a module. -+ ~~~~~~~~~~~ -+!!! error TS2303: Circular definition of import alias 'staticParam'. - import 'fs' - ~~~~~~ - !!! error TS1473: An import declaration can only be used at the top level of a module. -@@= skipped -56, +58 lines =@@ - ~~~~~~ - !!! error TS5076: '||' and '??' operations cannot be mixed without parentheses. - var x = 2 ?? 3 || 4 -+ ~ -+!!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish. -+ ~ -+!!! error TS2872: This kind of expression is always truthy. - ~~~~~~ - !!! error TS5076: '||' and '??' operations cannot be mixed without parentheses. - const arr = x -@@= skipped -8, +12 lines =@@ - !!! error TS1200: Line terminator not permitted before arrow. - var a = [1,2] - a?.`length`; -+ ~ -+!!! error TS2349: This expression is not callable. -+!!! error TS2349: Type 'number[]' has no call signatures. - ~~~~~~~~ - !!! error TS1358: Tagged template expressions are not permitted in an optional chain. - const o = { -@@= skipped -19, +22 lines =@@ +@@= skipped -105, +103 lines =@@ m?() { return 12 }, ~ !!! error TS1162: An object member cannot be declared optional. - ~ -!!! error TS8009: The '?' modifier can only be used in TypeScript files. definitely!, -+ ~~~~~~~~~~ -+!!! error TS18004: No value exists in scope for the shorthand property 'definitely'. Either declare one or provide an initializer. ~ - !!! error TS1255: A definite assignment assertion '!' is not permitted in this context. - definiteMethod!() { return 13 }, -@@= skipped -159, +159 lines =@@ - const trinaryDynamicImport = import('1', '2', '3') - ~~~~~~~~~~~~~~~~~~~~~ - !!! message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments -+ ~~~ -+!!! error TS2307: Cannot find module '1' or its corresponding type declarations. -+ ~~~ -+!!! error TS2559: Type '"2"' has no properties in common with type 'ImportCallOptions'. - const spreadDynamicImport = import(...[]) - ~~~~~ - !!! error TS1325: Argument of dynamic import cannot be spread element. - - return -+ ~~~~~~ -+!!! error TS1108: A 'return' statement can only be used within a function body. - \ No newline at end of file + !!! error TS1255: A definite assignment assertion '!' is not permitted in this context. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/plainJSGrammarErrors4.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/plainJSGrammarErrors4.errors.txt.diff index f00cd18c29..da2dd12cf5 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/plainJSGrammarErrors4.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/plainJSGrammarErrors4.errors.txt.diff @@ -2,16 +2,17 @@ +++ new.plainJSGrammarErrors4.errors.txt @@= skipped -0, +0 lines =@@ -plainJSGrammarErrors4.js(5,14): error TS1111: Private field '#b' must be declared in an enclosing class. -+plainJSGrammarErrors4.js(5,14): error TS2339: Property '#b' does not exist on type 'A'. - - - ==== plainJSGrammarErrors4.js (1 errors) ==== -@@= skipped -7, +7 lines =@@ - this.#a; // ok - this.#b; // error - ~~ +- +- +-==== plainJSGrammarErrors4.js (1 errors) ==== +- class A { +- #a; +- m() { +- this.#a; // ok +- this.#b; // error +- ~~ -!!! error TS1111: Private field '#b' must be declared in an enclosing class. -+!!! error TS2339: Property '#b' does not exist on type 'A'. - } - } - \ No newline at end of file +- } +- } +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/plainJSRedeclare.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/plainJSRedeclare.errors.txt.diff deleted file mode 100644 index 71b4490d5b..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/plainJSRedeclare.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.plainJSRedeclare.errors.txt -+++ new.plainJSRedeclare.errors.txt -@@= skipped -0, +0 lines =@@ - plainJSRedeclare.js(1,7): error TS2451: Cannot redeclare block-scoped variable 'orbitol'. - plainJSRedeclare.js(2,5): error TS2451: Cannot redeclare block-scoped variable 'orbitol'. -- -- --==== plainJSRedeclare.js (2 errors) ==== -+plainJSRedeclare.js(2,15): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. -+ -+ -+==== plainJSRedeclare.js (3 errors) ==== - const orbitol = 1 - ~~~~~~~ - !!! error TS2451: Cannot redeclare block-scoped variable 'orbitol'. - var orbitol = 1 + false - ~~~~~~~ - !!! error TS2451: Cannot redeclare block-scoped variable 'orbitol'. -+ ~~~~~~~~~ -+!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. - orbitol.toExponential() - \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/spellingUncheckedJS.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/spellingUncheckedJS.errors.txt.diff index a951d581cb..23637bb4c5 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/spellingUncheckedJS.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/spellingUncheckedJS.errors.txt.diff @@ -2,38 +2,20 @@ +++ new.spellingUncheckedJS.errors.txt @@= skipped -0, +0 lines =@@ - -+other.js(3,1): error TS2552: Cannot find name 'Jon'. Did you mean 'John'? -+spellingUncheckedJS.js(2,1): error TS2552: Cannot find name 'inmodule'. Did you mean 'inModule'? -+spellingUncheckedJS.js(5,18): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. -+spellingUncheckedJS.js(6,5): error TS2552: Cannot find name 'locale'. Did you mean 'locals'? ++spellingUncheckedJS.js(7,5): error TS2578: Unused '@ts-expect-error' directive. +spellingUncheckedJS.js(9,5): error TS2578: Unused '@ts-expect-error' directive. -+spellingUncheckedJS.js(16,21): error TS2551: Property 'none' does not exist on type 'Classe'. Did you mean 'non'? -+spellingUncheckedJS.js(22,22): error TS2339: Property 'none' does not exist on type 'Classe'. -+spellingUncheckedJS.js(30,8): error TS2551: Property 'spaaaace' does not exist on type '{ spaaace: number; }'. Did you mean 'spaaace'? -+spellingUncheckedJS.js(31,8): error TS2551: Property 'spaace' does not exist on type '{ spaaace: number; }'. Did you mean 'spaaace'? -+spellingUncheckedJS.js(32,8): error TS2339: Property 'fresh' does not exist on type '{ spaaace: number; }'. -+spellingUncheckedJS.js(33,7): error TS2551: Property 'puuuce' does not exist on type '{ puuce: number; }'. Did you mean 'puuce'? -+spellingUncheckedJS.js(34,12): error TS2551: Property 'getGMTDate' does not exist on type 'Date'. Did you mean 'getDate'? -+spellingUncheckedJS.js(37,14): error TS2552: Cannot find name 'setIntegral'. Did you mean 'setInterval'? -+spellingUncheckedJS.js(38,1): error TS2552: Cannot find name 'AudioBuffin'. Did you mean 'AudioBuffer'? -+spellingUncheckedJS.js(40,1): error TS2552: Cannot find name 'Jon'. Did you mean 'John'? + + -+==== spellingUncheckedJS.js (14 errors) ==== ++==== spellingUncheckedJS.js (2 errors) ==== + export var inModule = 1 + inmodule.toFixed() -+ ~~~~~~~~ -+!!! error TS2552: Cannot find name 'inmodule'. Did you mean 'inModule'? + + function f() { + var locals = 2 + true -+ ~~~~~~~~ -+!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. + locale.toFixed() -+ ~~~~~~ -+!!! error TS2552: Cannot find name 'locale'. Did you mean 'locals'? -+!!! related TS2728 spellingUncheckedJS.js:5:9: 'locals' is declared here. + // @ts-expect-error ++ ~~~~~~~~~~~~~~~~~~~ ++!!! error TS2578: Unused '@ts-expect-error' directive. + localf.toExponential() + // @ts-expect-error + ~~~~~~~~~~~~~~~~~~~ @@ -45,17 +27,12 @@ + methode() { + // no error on 'this' references + return this.none -+ ~~~~ -+!!! error TS2551: Property 'none' does not exist on type 'Classe'. Did you mean 'non'? -+!!! related TS2728 spellingUncheckedJS.js:13:5: 'non' is declared here. + } + } + class Derivee extends Classe { + methode() { + // no error on 'super' references + return super.none -+ ~~~~ -+!!! error TS2339: Property 'none' does not exist on type 'Classe'. + } + } + @@ -64,47 +41,21 @@ + spaaace: 3 + } + object.spaaaace // error on read -+ ~~~~~~~~ -+!!! error TS2551: Property 'spaaaace' does not exist on type '{ spaaace: number; }'. Did you mean 'spaaace'? -+!!! related TS2728 spellingUncheckedJS.js:28:5: 'spaaace' is declared here. + object.spaace = 12 // error on write -+ ~~~~~~ -+!!! error TS2551: Property 'spaace' does not exist on type '{ spaaace: number; }'. Did you mean 'spaaace'? -+!!! related TS2728 spellingUncheckedJS.js:28:5: 'spaaace' is declared here. + object.fresh = 12 // OK -+ ~~~~~ -+!!! error TS2339: Property 'fresh' does not exist on type '{ spaaace: number; }'. + other.puuuce // OK, from another file -+ ~~~~~~ -+!!! error TS2551: Property 'puuuce' does not exist on type '{ puuce: number; }'. Did you mean 'puuce'? -+!!! related TS2728 other.js:5:5: 'puuce' is declared here. + new Date().getGMTDate() // OK, from another file -+ ~~~~~~~~~~ -+!!! error TS2551: Property 'getGMTDate' does not exist on type 'Date'. Did you mean 'getDate'? -+!!! related TS2728 lib.es5.d.ts:--:--: 'getDate' is declared here. + + // No suggestions for globals from other files + const atoc = setIntegral(() => console.log('ok'), 500) -+ ~~~~~~~~~~~ -+!!! error TS2552: Cannot find name 'setIntegral'. Did you mean 'setInterval'? -+!!! related TS2728 lib.dom.d.ts:--:--: 'setInterval' is declared here. + AudioBuffin // etc -+ ~~~~~~~~~~~ -+!!! error TS2552: Cannot find name 'AudioBuffin'. Did you mean 'AudioBuffer'? -+!!! related TS2728 lib.dom.d.ts:--:--: 'AudioBuffer' is declared here. + Jimmy + Jon -+ ~~~ -+!!! error TS2552: Cannot find name 'Jon'. Did you mean 'John'? -+!!! related TS2728 other.js:2:5: 'John' is declared here. + -+==== other.js (1 errors) ==== ++==== other.js (0 errors) ==== + var Jimmy = 1 + var John = 2 + Jon // error, it's from the same file -+ ~~~ -+!!! error TS2552: Cannot find name 'Jon'. Did you mean 'John'? -+!!! related TS2728 other.js:2:5: 'John' is declared here. + var other = { + puuce: 4 + }