diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 08d4c098d5..61bde64b91 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -1830,17 +1830,8 @@ func (c *Checker) isBlockScopedNameDeclaredBeforeUse(declaration *ast.Node, usag useFile := ast.GetSourceFileOfNode(usage) declContainer := ast.GetEnclosingBlockScopeContainer(declaration) if declarationFile != useFile { - if (c.moduleKind != core.ModuleKindNone && (declarationFile.ExternalModuleIndicator != nil || useFile.ExternalModuleIndicator != nil)) || c.compilerOptions.OutFile == "" || IsInTypeQuery(usage) || declaration.Flags&ast.NodeFlagsAmbient != 0 { - // nodes are in different files and order cannot be determined - return true - } - // declaration is after usage - // can be legal if usage is deferred (i.e. inside function or in initializer of instance property) - if c.isUsedInFunctionOrInstanceProperty(usage, declaration, declContainer) { - return true - } - sourceFiles := c.program.SourceFiles() - return slices.Index(sourceFiles, declarationFile) <= slices.Index(sourceFiles, useFile) + // nodes are in different files and order cannot be determined + return true } // deferred usage in a type context is always OK regardless of the usage position: if usage.Flags&ast.NodeFlagsJSDoc != 0 || IsInTypeQuery(usage) || c.isInAmbientOrTypeNode(usage) { diff --git a/internal/checker/nodebuilderimpl.go b/internal/checker/nodebuilderimpl.go index 015d42f55b..d4534276bf 100644 --- a/internal/checker/nodebuilderimpl.go +++ b/internal/checker/nodebuilderimpl.go @@ -1073,7 +1073,7 @@ func (b *nodeBuilderImpl) getSpecifierForModuleSymbol(symbol *ast.Symbol, overri if ok { return result } - isBundle := len(b.ch.compilerOptions.OutFile) > 0 + isBundle := false // !!! remove me // For declaration bundles, we need to generate absolute paths relative to the common source dir for imports, // just like how the declaration emitter does for the ambient module declarations - we can easily accomplish this // using the `baseUrl` compiler option (which we would otherwise never use in declaration emit) and a non-relative diff --git a/internal/checker/utilities.go b/internal/checker/utilities.go index 30fd1e7e5b..321d069819 100644 --- a/internal/checker/utilities.go +++ b/internal/checker/utilities.go @@ -44,13 +44,6 @@ func findInMap[K comparable, V any](m map[K]V, predicate func(V) bool) V { return *new(V) } -func boolToTristate(b bool) core.Tristate { - if b { - return core.TSTrue - } - return core.TSFalse -} - func isCompoundAssignment(token ast.Kind) bool { return token >= ast.KindFirstCompoundAssignment && token <= ast.KindLastCompoundAssignment } diff --git a/internal/compiler/emitter.go b/internal/compiler/emitter.go index b031647c26..2193e344bc 100644 --- a/internal/compiler/emitter.go +++ b/internal/compiler/emitter.go @@ -436,7 +436,6 @@ func sourceFileMayBeEmitted(sourceFile *ast.SourceFile, host SourceFileMayBeEmit } func getSourceFilesToEmit(host SourceFileMayBeEmittedHost, targetSourceFile *ast.SourceFile, forceDtsEmit bool) []*ast.SourceFile { - // !!! outFile not yet implemented, may be deprecated var sourceFiles []*ast.SourceFile if targetSourceFile != nil { sourceFiles = []*ast.SourceFile{targetSourceFile} @@ -453,6 +452,7 @@ func isSourceFileNotJson(file *ast.SourceFile) bool { } func getDeclarationDiagnostics(host EmitHost, file *ast.SourceFile) []*ast.Diagnostic { + // TODO: use p.getSourceFilesToEmit cache fullFiles := core.Filter(getSourceFilesToEmit(host, file, false), isSourceFileNotJson) if !core.Some(fullFiles, func(f *ast.SourceFile) bool { return f == file }) { return []*ast.Diagnostic{} diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 41cc605594..1786078277 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -2,8 +2,11 @@ package compiler import ( "context" + "encoding/json" + "fmt" "maps" "slices" + "strings" "sync" "github.com/microsoft/typescript-go/internal/ast" @@ -15,6 +18,7 @@ import ( "github.com/microsoft/typescript-go/internal/module" "github.com/microsoft/typescript-go/internal/modulespecifiers" "github.com/microsoft/typescript-go/internal/outputpaths" + "github.com/microsoft/typescript-go/internal/parser" "github.com/microsoft/typescript-go/internal/printer" "github.com/microsoft/typescript-go/internal/scanner" "github.com/microsoft/typescript-go/internal/sourcemap" @@ -52,6 +56,12 @@ type Program struct { commonSourceDirectoryOnce sync.Once declarationDiagnosticCache collections.SyncMap[*ast.SourceFile, []*ast.Diagnostic] + + programDiagnostics []*ast.Diagnostic + hasEmitBlockingDiagnostics collections.Set[tspath.Path] + + sourceFilesToEmitOnce sync.Once + sourceFilesToEmit []*ast.SourceFile } // FileExists implements checker.Program. @@ -175,6 +185,7 @@ func NewProgram(opts ProgramOptions) *Program { p := &Program{opts: opts} p.initCheckerPool() p.processedFiles = processAllProgramFiles(p.opts, p.singleThreaded()) + p.verifyCompilerOptions() return p } @@ -186,12 +197,15 @@ func (p *Program) UpdateProgram(changedFilePath tspath.Path) (*Program, bool) { if !canReplaceFileInProgram(oldFile, newFile) { return NewProgram(p.opts), false } + // TODO: reverify compiler options when config has changed? result := &Program{ opts: p.opts, nodeModules: p.nodeModules, comparePathsOptions: p.comparePathsOptions, processedFiles: p.processedFiles, usesUriStyleNodeCoreModules: p.usesUriStyleNodeCoreModules, + programDiagnostics: p.programDiagnostics, + hasEmitBlockingDiagnostics: p.hasEmitBlockingDiagnostics, } result.initCheckerPool() index := core.FindIndex(result.files, func(file *ast.SourceFile) bool { return file.Path() == newFile.Path() }) @@ -331,8 +345,492 @@ func (p *Program) GetSuggestionDiagnostics(ctx context.Context, sourceFile *ast. } func (p *Program) GetProgramDiagnostics() []*ast.Diagnostic { - // !!! - return SortAndDeduplicateDiagnostics(p.fileLoadDiagnostics.GetDiagnostics()) + return SortAndDeduplicateDiagnostics(slices.Concat(p.programDiagnostics, p.fileLoadDiagnostics.GetDiagnostics())) +} + +func (p *Program) getSourceFilesToEmit(targetSourceFile *ast.SourceFile, forceDtsEmit bool) []*ast.SourceFile { + if targetSourceFile == nil && !forceDtsEmit { + p.sourceFilesToEmitOnce.Do(func() { + p.sourceFilesToEmit = getSourceFilesToEmit(p, nil, false) + }) + return p.sourceFilesToEmit + } + return getSourceFilesToEmit(p, targetSourceFile, forceDtsEmit) +} + +func (p *Program) verifyCompilerOptions() { + options := p.Options() + + sourceFile := core.Memoize(func() *ast.SourceFile { + configFile := p.opts.Config.ConfigFile + if configFile == nil { + return nil + } + return configFile.SourceFile + }) + + configFilePath := core.Memoize(func() string { + file := sourceFile() + if file != nil { + return file.FileName() + } + return "" + }) + + getCompilerOptionsPropertySyntax := core.Memoize(func() *ast.PropertyAssignment { + return tsoptions.ForEachTsConfigPropArray(sourceFile(), "compilerOptions", core.Identity) + }) + + getCompilerOptionsObjectLiteralSyntax := core.Memoize(func() *ast.ObjectLiteralExpression { + compilerOptionsProperty := getCompilerOptionsPropertySyntax() + if compilerOptionsProperty != nil && + compilerOptionsProperty.Initializer != nil && + ast.IsObjectLiteralExpression(compilerOptionsProperty.Initializer) { + return compilerOptionsProperty.Initializer.AsObjectLiteralExpression() + } + return nil + }) + + createOptionDiagnosticInObjectLiteralSyntax := func(objectLiteral *ast.ObjectLiteralExpression, onKey bool, key1 string, key2 string, message *diagnostics.Message, args ...any) *ast.Diagnostic { + diag := tsoptions.ForEachPropertyAssignment(objectLiteral, key1, func(property *ast.PropertyAssignment) *ast.Diagnostic { + return tsoptions.CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile(), core.IfElse(onKey, property.Name(), property.Initializer), message, args...) + }, key2) + if diag != nil { + p.programDiagnostics = append(p.programDiagnostics, diag) + } + return diag + } + + createCompilerOptionsDiagnostic := func(message *diagnostics.Message, args ...any) *ast.Diagnostic { + compilerOptionsProperty := getCompilerOptionsPropertySyntax() + var diag *ast.Diagnostic + if compilerOptionsProperty != nil { + diag = tsoptions.CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile(), compilerOptionsProperty.Name(), message, args...) + } else { + diag = ast.NewCompilerDiagnostic(message, args...) + } + p.programDiagnostics = append(p.programDiagnostics, diag) + return diag + } + + createDiagnosticForOption := func(onKey bool, option1 string, option2 string, message *diagnostics.Message, args ...any) *ast.Diagnostic { + diag := createOptionDiagnosticInObjectLiteralSyntax(getCompilerOptionsObjectLiteralSyntax(), onKey, option1, option2, message, args...) + if diag == nil { + diag = createCompilerOptionsDiagnostic(message, args...) + } + return diag + } + + createDiagnosticForOptionName := func(message *diagnostics.Message, option1 string, option2 string, args ...any) { + newArgs := make([]any, 0, len(args)+2) + newArgs = append(newArgs, option1, option2) + newArgs = append(newArgs, args...) + createDiagnosticForOption(true /*onKey*/, option1, option2, message, newArgs...) + } + + createOptionValueDiagnostic := func(option1 string, message *diagnostics.Message, args ...any) { + createDiagnosticForOption(false /*onKey*/, option1, "", message, args...) + } + + createRemovedOptionDiagnostic := func(name string, value string, useInstead string) { + var message *diagnostics.Message + var args []any + if value == "" { + message = diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration + args = []any{name} + } else { + message = diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration + args = []any{name, value} + } + + diag := createDiagnosticForOption(value == "", name, "", message, args...) + if useInstead != "" { + diag.AddMessageChain(ast.NewCompilerDiagnostic(diagnostics.Use_0_instead, useInstead)) + } + } + + getStrictOptionValue := func(value core.Tristate) bool { + if value != core.TSUnknown { + return value == core.TSTrue + } + return options.Strict == core.TSTrue + } + + // Removed in TS7 + + if options.BaseUrl != "" { + // BaseUrl will have been turned absolute by this point. + var useInstead string + if configFilePath() != "" { + relative := tspath.GetRelativePathFromFile(configFilePath(), options.BaseUrl, p.comparePathsOptions) + if !(strings.HasPrefix(relative, "./") || strings.HasPrefix(relative, "../")) { + relative = "./" + relative + } + suggestion := tspath.CombinePaths(relative, "*") + useInstead = fmt.Sprintf(`"paths": {"*": %s}`, core.Must(json.Marshal(suggestion))) + } + createRemovedOptionDiagnostic("baseUrl", "", useInstead) + } + + if options.OutFile != "" { + createRemovedOptionDiagnostic("outFile", "", "") + } + + // if options.Target == core.ScriptTargetES3 { + // createRemovedOptionDiagnostic("target", "ES3", "") + // } + // if options.Target == core.ScriptTargetES5 { + // createRemovedOptionDiagnostic("target", "ES5", "") + // } + + if options.Module == core.ModuleKindAMD { + createRemovedOptionDiagnostic("module", "AMD", "") + } + if options.Module == core.ModuleKindSystem { + createRemovedOptionDiagnostic("module", "System", "") + } + if options.Module == core.ModuleKindUMD { + createRemovedOptionDiagnostic("module", "UMD", "") + } + + if options.StrictPropertyInitialization.IsTrue() && !getStrictOptionValue(options.StrictNullChecks) { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks") + } + if options.ExactOptionalPropertyTypes.IsTrue() && !getStrictOptionValue(options.StrictNullChecks) { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "exactOptionalPropertyTypes", "strictNullChecks") + } + + if options.IsolatedDeclarations.IsTrue() { + if options.GetAllowJS() { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "isolatedDeclarations") + } + if !options.GetEmitDeclarations() { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "isolatedDeclarations", "declaration", "composite") + } + } + + if options.InlineSourceMap.IsTrue() { + if options.SourceMap.IsTrue() { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceMap", "inlineSourceMap") + } + if options.MapRoot != "" { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_with_option_1, "mapRoot", "inlineSourceMap") + } + } + + if options.Composite.IsTrue() { + if options.Declaration.IsFalse() { + createDiagnosticForOptionName(diagnostics.Composite_projects_may_not_disable_declaration_emit, "declaration", "") + } + if options.Incremental.IsFalse() { + createDiagnosticForOptionName(diagnostics.Composite_projects_may_not_disable_incremental_compilation, "declaration", "") + } + } + + // !!! Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified + + // !!! verifyProjectReferences + + if options.Composite.IsTrue() { + var rootPaths collections.Set[tspath.Path] + for _, fileName := range p.opts.Config.FileNames() { + rootPaths.Add(p.toPath(fileName)) + } + + for _, file := range p.files { + if sourceFileMayBeEmitted(file, p, false) && !rootPaths.Has(file.Path()) { + p.programDiagnostics = append(p.programDiagnostics, ast.NewDiagnostic( + file, + core.TextRange{}, + diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, + file.FileName(), + configFilePath(), + )) + } + } + } + + forEachOptionPathsSyntax := func(callback func(*ast.PropertyAssignment) *ast.Diagnostic) *ast.Diagnostic { + return tsoptions.ForEachPropertyAssignment(getCompilerOptionsObjectLiteralSyntax(), "paths", callback) + } + + createDiagnosticForOptionPaths := func(onKey bool, key string, message *diagnostics.Message, args ...any) *ast.Diagnostic { + diag := forEachOptionPathsSyntax(func(pathProp *ast.PropertyAssignment) *ast.Diagnostic { + if ast.IsObjectLiteralExpression(pathProp.Initializer) { + return createOptionDiagnosticInObjectLiteralSyntax(pathProp.Initializer.AsObjectLiteralExpression(), onKey, key, "", message, args...) + } + return nil + }) + if diag == nil { + diag = createCompilerOptionsDiagnostic(message, args...) + } + return diag + } + + createDiagnosticForOptionPathKeyValue := func(key string, valueIndex int, message *diagnostics.Message, args ...any) *ast.Diagnostic { + diag := forEachOptionPathsSyntax(func(pathProp *ast.PropertyAssignment) *ast.Diagnostic { + if ast.IsObjectLiteralExpression(pathProp.Initializer) { + return tsoptions.ForEachPropertyAssignment(pathProp.Initializer.AsObjectLiteralExpression(), key, func(keyProps *ast.PropertyAssignment) *ast.Diagnostic { + initializer := keyProps.Initializer + if ast.IsArrayLiteralExpression(initializer) { + elements := initializer.AsArrayLiteralExpression().Elements + if elements != nil && len(elements.Nodes) > valueIndex { + diag := tsoptions.CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile(), elements.Nodes[valueIndex], message, args...) + p.programDiagnostics = append(p.programDiagnostics, diag) + return diag + } + } + return nil + }) + } + return nil + }) + if diag == nil { + diag = createCompilerOptionsDiagnostic(message, args...) + } + return diag + } + + for key, value := range options.Paths.Entries() { + // !!! This code does not handle cases where where the path mappings have the wrong types, + // as that information is mostly lost during the parsing process. + if !hasZeroOrOneAsteriskCharacter(key) { + createDiagnosticForOptionPaths(true /*onKey*/, key, diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character, key) + } + if value == nil { + createDiagnosticForOptionPaths(false /*onKey*/, key, diagnostics.Substitutions_for_pattern_0_should_be_an_array, key) + } else if len(value) == 0 { + createDiagnosticForOptionPaths(false /*onKey*/, key, diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array, key) + } + for i, subst := range value { + if !hasZeroOrOneAsteriskCharacter(subst) { + fmt.Println(key, value, i, subst) + createDiagnosticForOptionPathKeyValue(key, i, diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key) + } + if !tspath.PathIsRelative(subst) && !tspath.PathIsAbsolute(subst) { + // !!! This needs a better message that doesn't mention baseUrl + createDiagnosticForOptionPathKeyValue(key, i, diagnostics.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash) + } + } + } + + if options.SourceMap.IsFalseOrUnknown() && options.InlineSourceMap.IsFalseOrUnknown() { + if options.InlineSources.IsTrue() { + createDiagnosticForOptionName(diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "inlineSources", "") + } + if options.SourceRoot != "" { + createDiagnosticForOptionName(diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "sourceRoot", "") + } + } + + if options.MapRoot != "" && !(options.SourceMap.IsTrue() || options.DeclarationMap.IsTrue()) { + // Error to specify --mapRoot without --sourcemap + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "mapRoot", "sourceMap", "declarationMap") + } + + if options.DeclarationDir != "" { + if !options.GetEmitDeclarations() { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationDir", "declaration", "composite") + } + } + + if options.DeclarationMap.IsTrue() && !options.GetEmitDeclarations() { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationMap", "declaration", "composite") + } + + if options.Lib != nil && options.NoLib.IsTrue() { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib") + } + + languageVersion := options.GetEmitScriptTarget() + + firstNonAmbientExternalModuleSourceFile := core.Find(p.files, func(f *ast.SourceFile) bool { return ast.IsExternalModule(f) && !f.IsDeclarationFile }) + if options.IsolatedModules.IsTrue() || options.VerbatimModuleSyntax.IsTrue() { + if options.Module == core.ModuleKindNone && languageVersion < core.ScriptTargetES2015 && options.IsolatedModules.IsTrue() { + // !!! + // createDiagnosticForOptionName(diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher, "isolatedModules", "target") + } + + if options.PreserveConstEnums.IsFalse() { + createDiagnosticForOptionName(diagnostics.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled, core.IfElse(options.VerbatimModuleSyntax.IsTrue(), "verbatimModuleSyntax", "isolatedModules"), "preserveConstEnums") + } + } else if firstNonAmbientExternalModuleSourceFile != nil && languageVersion < core.ScriptTargetES2015 && options.Module == core.ModuleKindNone { + // !!! + } + + if options.OutDir != "" || + options.RootDir != "" || + options.SourceRoot != "" || + options.MapRoot != "" || + (options.GetEmitDeclarations() && options.DeclarationDir != "") { + dir := p.CommonSourceDirectory() + if options.OutDir != "" && dir == "" && core.Some(p.files, func(f *ast.SourceFile) bool { return tspath.GetRootLength(f.FileName()) > 1 }) { + createDiagnosticForOptionName(diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir", "") + } + } + + if options.CheckJs.IsTrue() && !options.GetAllowJS() { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs") + } + + if options.EmitDeclarationOnly.IsTrue() { + if !options.GetEmitDeclarations() { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "emitDeclarationOnly", "declaration", "composite") + } + } + + // !!! emitDecoratorMetadata + + if options.JsxFactory != "" { + if options.ReactNamespace != "" { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_with_option_1, "reactNamespace", "jsxFactory") + } + if options.Jsx == core.JsxEmitReactJSX || options.Jsx == core.JsxEmitReactJSXDev { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFactory", tsoptions.InverseJsxOptionMap.GetOrZero(options.Jsx)) + } + if parser.ParseIsolatedEntityName(options.JsxFactory) == nil { + createOptionValueDiagnostic("jsxFactory", diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name, options.JsxFactory) + } + } else if options.ReactNamespace != "" && !scanner.IsIdentifierText(options.ReactNamespace, core.LanguageVariantStandard) { + createOptionValueDiagnostic("reactNamespace", diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier, options.ReactNamespace) + } + + if options.JsxFragmentFactory != "" { + if options.JsxFactory == "" { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "jsxFragmentFactory", "jsxFactory") + } + if options.Jsx == core.JsxEmitReactJSX || options.Jsx == core.JsxEmitReactJSXDev { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFragmentFactory", tsoptions.InverseJsxOptionMap.GetOrZero(options.Jsx)) + } + if parser.ParseIsolatedEntityName(options.JsxFragmentFactory) == nil { + createOptionValueDiagnostic("jsxFragmentFactory", diagnostics.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name, options.JsxFragmentFactory) + } + } + + if options.ReactNamespace != "" { + if options.Jsx == core.JsxEmitReactJSX || options.Jsx == core.JsxEmitReactJSXDev { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "reactNamespace", tsoptions.InverseJsxOptionMap.GetOrZero(options.Jsx)) + } + } + + if options.JsxImportSource != "" { + if options.Jsx == core.JsxEmitReact { + createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxImportSource", tsoptions.InverseJsxOptionMap.GetOrZero(options.Jsx)) + } + } + + moduleKind := options.GetEmitModuleKind() + + if options.AllowImportingTsExtensions.IsTrue() && !(options.NoEmit.IsTrue() || options.EmitDeclarationOnly.IsTrue() || options.RewriteRelativeImportExtensions.IsTrue()) { + createOptionValueDiagnostic("allowImportingTsExtensions", diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set) + } + + moduleResolution := options.GetModuleResolutionKind() + if options.ResolvePackageJsonExports.IsTrue() && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) { + createDiagnosticForOptionName(diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonExports", "") + } + if options.ResolvePackageJsonImports.IsTrue() && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) { + createDiagnosticForOptionName(diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonImports", "") + } + if options.CustomConditions != nil && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) { + createDiagnosticForOptionName(diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "customConditions", "") + } + + // !!! Reenable once we don't map old moduleResolution kinds to bundler. + // if moduleResolution == core.ModuleResolutionKindBundler && !emitModuleKindIsNonNodeESM(moduleKind) && moduleKind != core.ModuleKindPreserve { + // createOptionValueDiagnostic("moduleResolution", diagnostics.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later, "bundler") + // } + + if core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext && + !(core.ModuleResolutionKindNode16 <= moduleResolution && moduleResolution <= core.ModuleResolutionKindNodeNext) { + moduleKindName := moduleKind.String() + var moduleResolutionName string + if v, ok := core.ModuleKindToModuleResolutionKind[moduleKind]; ok { + moduleResolutionName = v.String() + } else { + moduleResolutionName = "Node16" + } + createOptionValueDiagnostic("moduleResolution", diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleResolutionName, moduleKindName) + } else if core.ModuleResolutionKindNode16 <= moduleResolution && moduleResolution <= core.ModuleResolutionKindNodeNext && + !(core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext) { + moduleResolutionName := moduleResolution.String() + createOptionValueDiagnostic("module", diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName) + } + + // !!! The below needs filesByName, which is not equivalent to p.filesByPath. + + // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files + if !options.NoEmit.IsTrue() && !options.SuppressOutputPathCheck.IsTrue() { + var emitFilesSeen collections.Set[string] + + // Verify that all the emit files are unique and don't overwrite input files + verifyEmitFilePath := func(emitFileName string) { + if emitFileName != "" { + emitFilePath := p.toPath(emitFileName) + // Report error if the output overwrites input file + if _, ok := p.filesByPath[emitFilePath]; ok { + diag := ast.NewCompilerDiagnostic(diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName) + if configFilePath() == "" { + // The program is from either an inferred project or an external project + diag.AddMessageChain(ast.NewCompilerDiagnostic(diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)) + } + p.blockEmittingOfFile(emitFileName, diag) + } + + var emitFileKey string + if !p.Host().FS().UseCaseSensitiveFileNames() { + emitFileKey = tspath.ToFileNameLowerCase(string(emitFilePath)) + } else { + emitFileKey = string(emitFilePath) + } + + // Report error if multiple files write into same file + if emitFilesSeen.Has(emitFileKey) { + // Already seen the same emit file - report error + p.blockEmittingOfFile(emitFileName, ast.NewCompilerDiagnostic(diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files, emitFileName)) + } else { + emitFilesSeen.Add(emitFileKey) + } + } + } + + outputpaths.ForEachEmittedFile(p, options, func(emitFileNames *outputpaths.OutputPaths, sourceFile *ast.SourceFile) bool { + if !options.EmitDeclarationOnly.IsTrue() { + verifyEmitFilePath(emitFileNames.JsFilePath()) + } + verifyEmitFilePath(emitFileNames.DeclarationFilePath()) + return false + }, p.getSourceFilesToEmit(nil, false), false) + } +} + +func (p *Program) blockEmittingOfFile(emitFileName string, diag *ast.Diagnostic) { + p.hasEmitBlockingDiagnostics.Add(p.toPath(emitFileName)) + p.programDiagnostics = append(p.programDiagnostics, diag) +} + +func hasZeroOrOneAsteriskCharacter(str string) bool { + seenAsterisk := false + for _, ch := range str { + if ch == '*' { + if !seenAsterisk { + seenAsterisk = true + } else { + // have already seen asterisk + return false + } + } + } + return true +} + +func moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution core.ModuleResolutionKind) bool { + return moduleResolution >= core.ModuleResolutionKindNode16 && moduleResolution <= core.ModuleResolutionKindNodeNext || + moduleResolution == core.ModuleResolutionKindBundler +} + +func emitModuleKindIsNonNodeESM(moduleKind core.ModuleKind) bool { + return moduleKind >= core.ModuleKindES2015 && moduleKind <= core.ModuleKindESNext } func (p *Program) GetGlobalDiagnostics(ctx context.Context) []*ast.Diagnostic { @@ -704,7 +1202,7 @@ func (p *Program) Emit(options EmitOptions) *EmitResult { } wg := core.NewWorkGroup(p.singleThreaded()) var emitters []*emitter - sourceFiles := getSourceFilesToEmit(p, options.TargetSourceFile, options.forceDtsEmit) + sourceFiles := p.getSourceFilesToEmit(options.TargetSourceFile, options.forceDtsEmit) for _, sourceFile := range sourceFiles { emitter := &emitter{ @@ -754,15 +1252,19 @@ func (p *Program) Emit(options EmitOptions) *EmitResult { return result } +func (p *Program) toPath(filename string) tspath.Path { + return tspath.ToPath(filename, p.GetCurrentDirectory(), p.UseCaseSensitiveFileNames()) +} + func (p *Program) GetSourceFile(filename string) *ast.SourceFile { - path := tspath.ToPath(filename, p.GetCurrentDirectory(), p.UseCaseSensitiveFileNames()) + path := p.toPath(filename) return p.GetSourceFileByPath(path) } func (p *Program) GetSourceFileForResolvedModule(fileName string) *ast.SourceFile { file := p.GetSourceFile(fileName) if file == nil { - filename := p.projectReferenceFileMapper.getParseFileRedirect(ast.NewHasFileName(fileName, tspath.ToPath(fileName, p.GetCurrentDirectory(), p.UseCaseSensitiveFileNames()))) + filename := p.projectReferenceFileMapper.getParseFileRedirect(ast.NewHasFileName(fileName, p.toPath(fileName))) if filename != "" { return p.GetSourceFile(filename) } diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go index bdfd520a60..e51e07549d 100644 --- a/internal/core/compileroptions.go +++ b/internal/core/compileroptions.go @@ -26,7 +26,6 @@ type CompilerOptions struct { AllowUnusedLabels Tristate `json:"allowUnusedLabels,omitzero"` AssumeChangesOnlyAffectDirectDependencies Tristate `json:"assumeChangesOnlyAffectDirectDependencies,omitzero"` AlwaysStrict Tristate `json:"alwaysStrict,omitzero"` - BaseUrl string `json:"baseUrl,omitzero"` Build Tristate `json:"build,omitzero"` CheckJs Tristate `json:"checkJs,omitzero"` CustomConditions []string `json:"customConditions,omitzero"` @@ -59,7 +58,6 @@ type CompilerOptions struct { JsxFactory string `json:"jsxFactory,omitzero"` JsxFragmentFactory string `json:"jsxFragmentFactory,omitzero"` JsxImportSource string `json:"jsxImportSource,omitzero"` - KeyofStringsOnly Tristate `json:"keyofStringsOnly,omitzero"` Lib []string `json:"lib,omitzero"` LibReplacement Tristate `json:"libReplacement,omitzero"` Locale string `json:"locale,omitzero"` @@ -86,9 +84,7 @@ type CompilerOptions struct { NoResolve Tristate `json:"noResolve,omitzero"` NoImplicitOverride Tristate `json:"noImplicitOverride,omitzero"` NoUncheckedSideEffectImports Tristate `json:"noUncheckedSideEffectImports,omitzero"` - Out string `json:"out,omitzero"` OutDir string `json:"outDir,omitzero"` - OutFile string `json:"outFile,omitzero"` Paths *collections.OrderedMap[string, []string] `json:"paths,omitzero"` PreserveConstEnums Tristate `json:"preserveConstEnums,omitzero"` PreserveSymlinks Tristate `json:"preserveSymlinks,omitzero"` @@ -123,6 +119,11 @@ type CompilerOptions struct { VerbatimModuleSyntax Tristate `json:"verbatimModuleSyntax,omitzero"` MaxNodeModuleJsDepth *int `json:"maxNodeModuleJsDepth,omitzero"` + // Deprecated: Do not use outside of options parsing and validation. + BaseUrl string `json:"baseUrl,omitzero"` + // Deprecated: Do not use outside of options parsing and validation. + OutFile string `json:"outFile,omitzero"` + // Internal fields ConfigFilePath string `json:"configFilePath,omitzero"` NoDtsResolution Tristate `json:"noDtsResolution,omitzero"` @@ -385,9 +386,12 @@ type ModuleKind int32 const ( ModuleKindNone ModuleKind = 0 ModuleKindCommonJS ModuleKind = 1 - ModuleKindAMD ModuleKind = 2 - ModuleKindUMD ModuleKind = 3 - ModuleKindSystem ModuleKind = 4 + // Deprecated: Do not use outside of options parsing and validation. + ModuleKindAMD ModuleKind = 2 + // Deprecated: Do not use outside of options parsing and validation. + ModuleKindUMD ModuleKind = 3 + // Deprecated: Do not use outside of options parsing and validation. + ModuleKindSystem ModuleKind = 4 // NOTE: ES module kinds should be contiguous to more easily check whether a module kind is *any* ES module kind. // Non-ES module kinds should not come between ES2015 (the earliest ES module kind) and ESNext (the last ES // module kind). @@ -435,6 +439,11 @@ const ( ModuleResolutionKindBundler ModuleResolutionKind = 100 ) +var ModuleKindToModuleResolutionKind = map[ModuleKind]ModuleResolutionKind{ + ModuleKindNode16: ModuleResolutionKindNode16, + ModuleKindNodeNext: ModuleResolutionKindNodeNext, +} + // We don't use stringer on this for now, because these values // are user-facing in --traceResolution, and stringer currently // lacks the ability to remove the "ModuleResolutionKind" prefix diff --git a/internal/core/tristate.go b/internal/core/tristate.go index 11b1bc0d36..9e5d436b4c 100644 --- a/internal/core/tristate.go +++ b/internal/core/tristate.go @@ -58,3 +58,10 @@ func (t Tristate) MarshalJSON() ([]byte, error) { return []byte("null"), nil } } + +func BoolToTristate(b bool) Tristate { + if b { + return TSTrue + } + return TSFalse +} diff --git a/internal/modulespecifiers/specifiers.go b/internal/modulespecifiers/specifiers.go index fa05bf937c..cb377869f1 100644 --- a/internal/modulespecifiers/specifiers.go +++ b/internal/modulespecifiers/specifiers.go @@ -413,7 +413,6 @@ func getLocalModuleSpecifier( preferences ModuleSpecifierPreferences, pathsOnly bool, ) string { - baseUrl := compilerOptions.BaseUrl paths := compilerOptions.Paths rootDirs := compilerOptions.RootDirs @@ -434,17 +433,8 @@ func getLocalModuleSpecifier( CurrentDirectory: host.GetCurrentDirectory(), })), allowedEndings, compilerOptions, host) } - if len(baseUrl) == 9 && paths == nil && !compilerOptions.GetResolvePackageJsonImports() && preferences.relativePreference == RelativePreferenceRelative { - if pathsOnly { - return "" - } - return relativePath - } root := compilerOptions.GetPathsBasePath(host.GetCurrentDirectory()) - if len(root) == 0 { - root = compilerOptions.BaseUrl - } baseDirectory := tspath.GetNormalizedAbsolutePath(root, host.GetCurrentDirectory()) relativeToBaseUrl := getRelativePathIfInSameVolume(moduleFileName, baseDirectory, host.UseCaseSensitiveFileNames()) if len(relativeToBaseUrl) == 0 { @@ -485,8 +475,6 @@ func getLocalModuleSpecifier( var maybeNonRelative string if len(fromPackageJsonImports) > 0 { maybeNonRelative = fromPackageJsonImports - } else if len(fromPaths) == 0 && len(baseUrl) > 0 { - maybeNonRelative = processEnding(relativeToBaseUrl, allowedEndings, compilerOptions, host) } else { maybeNonRelative = fromPaths } diff --git a/internal/outputpaths/outputpaths.go b/internal/outputpaths/outputpaths.go index 60cac7d6e2..db4f35caec 100644 --- a/internal/outputpaths/outputpaths.go +++ b/internal/outputpaths/outputpaths.go @@ -71,7 +71,6 @@ func GetOutputPathsFor(sourceFile *ast.SourceFile, options *core.CompilerOptions } func ForEachEmittedFile(host OutputPathsHost, options *core.CompilerOptions, action func(emitFileNames *OutputPaths, sourceFile *ast.SourceFile) bool, sourceFiles []*ast.SourceFile, forceDtsEmit bool) bool { - // !!! outFile not yet implemented, may be deprecated for _, sourceFile := range sourceFiles { if action(GetOutputPathsFor(sourceFile, options, host, forceDtsEmit), sourceFile) { return true diff --git a/internal/testrunner/compiler_runner.go b/internal/testrunner/compiler_runner.go index b026db61aa..e48cc738ec 100644 --- a/internal/testrunner/compiler_runner.go +++ b/internal/testrunner/compiler_runner.go @@ -83,13 +83,28 @@ func (r *CompilerBaselineRunner) EnumerateTestFiles() []string { return files } +// These tests contain options that have been completely removed, so fail to parse. var deprecatedTests = []string{ - // Test deprecated `importsNotUsedAsValue` "preserveUnusedImports.ts", "noCrashWithVerbatimModuleSyntaxAndImportsNotUsedAsValues.ts", "verbatimModuleSyntaxCompat.ts", "preserveValueImports_importsNotUsedAsValues.ts", "importsNotUsedAsValues_error.ts", + "alwaysStrictNoImplicitUseStrict.ts", + "nonPrimitiveIndexingWithForInSupressError.ts", + "parameterInitializerBeforeDestructuringEmit.ts", + "mappedTypeUnionConstraintInferences.ts", + "lateBoundConstraintTypeChecksCorrectly.ts", + "keyofDoesntContainSymbols.ts", + "isolatedModulesOut.ts", + "noStrictGenericChecks.ts", + "noImplicitUseStrict_umd.ts", + "noImplicitUseStrict_system.ts", + "noImplicitUseStrict_es6.ts", + "noImplicitUseStrict_commonjs.ts", + "noImplicitUseStrict_amd.ts", + "noImplicitAnyIndexingSuppressed.ts", + "excessPropertyErrorsSuppressed.ts", } func (r *CompilerBaselineRunner) RunTests(t *testing.T) { @@ -383,6 +398,11 @@ func (c *compilerTest) verifyJavaScriptOutput(t *testing.T, suiteName string, is return } + if c.options.OutFile != "" { + // Just return, no t.Skip; this is unsupported so testing them is not helpful. + return + } + t.Run("output", func(t *testing.T) { if msg, ok := skippedEmitTests[c.basename]; ok { t.Skip(msg) @@ -410,6 +430,11 @@ func (c *compilerTest) verifyJavaScriptOutput(t *testing.T, suiteName string, is } func (c *compilerTest) verifySourceMapOutput(t *testing.T, suiteName string, isSubmodule bool) { + if c.options.OutFile != "" { + // Just return, no t.Skip; this is unsupported so testing them is not helpful. + return + } + t.Run("sourcemap", func(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on creating source map output for test "+c.filename) headerComponents := tspath.GetPathComponentsRelativeTo(repo.TestDataPath, c.filename, tspath.ComparePathsOptions{}) @@ -430,6 +455,11 @@ func (c *compilerTest) verifySourceMapOutput(t *testing.T, suiteName string, isS } func (c *compilerTest) verifySourceMapRecord(t *testing.T, suiteName string, isSubmodule bool) { + if c.options.OutFile != "" { + // Just return, no t.Skip; this is unsupported so testing them is not helpful. + return + } + t.Run("sourcemap record", func(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on creating source map record for test "+c.filename) headerComponents := tspath.GetPathComponentsRelativeTo(repo.TestDataPath, c.filename, tspath.ComparePathsOptions{}) @@ -561,6 +591,9 @@ func (c *compilerTest) containsUnsupportedOptionsForDiagnostics() bool { if c.options.RootDirs != nil { return true } + if c.options.OutFile != "" { + return true + } return false } diff --git a/internal/testutil/harnessutil/harnessutil.go b/internal/testutil/harnessutil/harnessutil.go index ac3f1658b6..80a8452b76 100644 --- a/internal/testutil/harnessutil/harnessutil.go +++ b/internal/testutil/harnessutil/harnessutil.go @@ -54,21 +54,17 @@ type NamedTestConfiguration struct { } type HarnessOptions struct { - AllowNonTsExtensions bool UseCaseSensitiveFileNames bool BaselineFile string IncludeBuiltFile string FileName string LibFiles []string - NoErrorTruncation bool - SuppressOutputPathCheck bool NoImplicitReferences bool CurrentDirectory string Symlink string Link string NoTypesAndSymbols bool FullEmitPaths bool - NoCheck bool ReportDiagnostics bool CaptureSuggestions bool TypescriptVersion string @@ -294,7 +290,7 @@ func setOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compil harnessOption := getHarnessOption(name) if harnessOption != nil { parsedValue := getOptionValue(t, harnessOption, value) - parseHarnessOption(t, harnessOption.Name, parsedValue, harnessOptions) + parseHarnessOption(t, harnessOption.Name, parsedValue, harnessOptions, compilerOptions) continue } @@ -382,44 +378,44 @@ func getHarnessOption(name string) *tsoptions.CommandLineOption { }) } -func parseHarnessOption(t *testing.T, key string, value any, options *HarnessOptions) { +func parseHarnessOption(t *testing.T, key string, value any, harnessOptions *HarnessOptions, compilerOptions *core.CompilerOptions) { switch key { case "allowNonTsExtensions": - options.AllowNonTsExtensions = value.(bool) + compilerOptions.AllowNonTsExtensions = core.BoolToTristate(value.(bool)) case "useCaseSensitiveFileNames": - options.UseCaseSensitiveFileNames = value.(bool) + harnessOptions.UseCaseSensitiveFileNames = value.(bool) case "baselineFile": - options.BaselineFile = value.(string) + harnessOptions.BaselineFile = value.(string) case "includeBuiltFile": - options.IncludeBuiltFile = value.(string) + harnessOptions.IncludeBuiltFile = value.(string) case "fileName": - options.FileName = value.(string) + harnessOptions.FileName = value.(string) case "libFiles": - options.LibFiles = value.([]string) + harnessOptions.LibFiles = value.([]string) case "noErrorTruncation": - options.NoErrorTruncation = value.(bool) + compilerOptions.NoErrorTruncation = core.BoolToTristate(value.(bool)) case "suppressOutputPathCheck": - options.SuppressOutputPathCheck = value.(bool) + compilerOptions.SuppressOutputPathCheck = core.BoolToTristate(value.(bool)) case "noImplicitReferences": - options.NoImplicitReferences = value.(bool) + harnessOptions.NoImplicitReferences = value.(bool) case "currentDirectory": - options.CurrentDirectory = value.(string) + harnessOptions.CurrentDirectory = value.(string) case "symlink": - options.Symlink = value.(string) + harnessOptions.Symlink = value.(string) case "link": - options.Link = value.(string) + harnessOptions.Link = value.(string) case "noTypesAndSymbols": - options.NoTypesAndSymbols = value.(bool) + harnessOptions.NoTypesAndSymbols = value.(bool) case "fullEmitPaths": - options.FullEmitPaths = value.(bool) + harnessOptions.FullEmitPaths = value.(bool) case "noCheck": - options.NoCheck = value.(bool) + compilerOptions.NoCheck = core.BoolToTristate(value.(bool)) case "reportDiagnostics": - options.ReportDiagnostics = value.(bool) + harnessOptions.ReportDiagnostics = value.(bool) case "captureSuggestions": - options.CaptureSuggestions = value.(bool) + harnessOptions.CaptureSuggestions = value.(bool) case "typescriptVersion": - options.TypescriptVersion = value.(string) + harnessOptions.TypescriptVersion = value.(string) default: t.Fatalf("Unknown harness option '%s'.", key) } @@ -648,40 +644,36 @@ func newCompilationResult( } } - if options.OutFile != "" { - /// !!! options.OutFile not yet supported - } else { - // using the order from the inputs, populate the outputs - for _, sourceFile := range program.GetSourceFiles() { - input := &TestFile{UnitName: sourceFile.FileName(), Content: sourceFile.Text()} - c.inputs = append(c.inputs, input) - if !tspath.IsDeclarationFileName(sourceFile.FileName()) { - extname := outputpaths.GetOutputExtension(sourceFile.FileName(), options.Jsx) - outputs := &CompilationOutput{ - Inputs: []*TestFile{input}, - JS: js.GetOrZero(c.getOutputPath(sourceFile.FileName(), extname)), - DTS: dts.GetOrZero(c.getOutputPath(sourceFile.FileName(), tspath.GetDeclarationEmitExtensionForPath(sourceFile.FileName()))), - Map: maps.GetOrZero(c.getOutputPath(sourceFile.FileName(), extname+".map")), - } - c.inputsAndOutputs.Set(sourceFile.FileName(), outputs) - if outputs.JS != nil { - c.inputsAndOutputs.Set(outputs.JS.UnitName, outputs) - c.JS.Set(outputs.JS.UnitName, outputs.JS) - js.Delete(outputs.JS.UnitName) - c.outputs = append(c.outputs, outputs.JS) - } - if outputs.DTS != nil { - c.inputsAndOutputs.Set(outputs.DTS.UnitName, outputs) - c.DTS.Set(outputs.DTS.UnitName, outputs.DTS) - dts.Delete(outputs.DTS.UnitName) - c.outputs = append(c.outputs, outputs.DTS) - } - if outputs.Map != nil { - c.inputsAndOutputs.Set(outputs.Map.UnitName, outputs) - c.Maps.Set(outputs.Map.UnitName, outputs.Map) - maps.Delete(outputs.Map.UnitName) - c.outputs = append(c.outputs, outputs.Map) - } + // using the order from the inputs, populate the outputs + for _, sourceFile := range program.GetSourceFiles() { + input := &TestFile{UnitName: sourceFile.FileName(), Content: sourceFile.Text()} + c.inputs = append(c.inputs, input) + if !tspath.IsDeclarationFileName(sourceFile.FileName()) { + extname := outputpaths.GetOutputExtension(sourceFile.FileName(), options.Jsx) + outputs := &CompilationOutput{ + Inputs: []*TestFile{input}, + JS: js.GetOrZero(c.getOutputPath(sourceFile.FileName(), extname)), + DTS: dts.GetOrZero(c.getOutputPath(sourceFile.FileName(), tspath.GetDeclarationEmitExtensionForPath(sourceFile.FileName()))), + Map: maps.GetOrZero(c.getOutputPath(sourceFile.FileName(), extname+".map")), + } + c.inputsAndOutputs.Set(sourceFile.FileName(), outputs) + if outputs.JS != nil { + c.inputsAndOutputs.Set(outputs.JS.UnitName, outputs) + c.JS.Set(outputs.JS.UnitName, outputs.JS) + js.Delete(outputs.JS.UnitName) + c.outputs = append(c.outputs, outputs.JS) + } + if outputs.DTS != nil { + c.inputsAndOutputs.Set(outputs.DTS.UnitName, outputs) + c.DTS.Set(outputs.DTS.UnitName, outputs.DTS) + dts.Delete(outputs.DTS.UnitName) + c.outputs = append(c.outputs, outputs.DTS) + } + if outputs.Map != nil { + c.inputsAndOutputs.Set(outputs.Map.UnitName, outputs) + c.Maps.Set(outputs.Map.UnitName, outputs.Map) + maps.Delete(outputs.Map.UnitName) + c.outputs = append(c.outputs, outputs.Map) } } } @@ -706,28 +698,24 @@ func compareTestFiles(a *TestFile, b *TestFile) int { } func (c *CompilationResult) getOutputPath(path string, ext string) string { - if c.Options.OutFile != "" { - /// !!! options.OutFile not yet supported - } else { - path = tspath.ResolvePath(c.Program.GetCurrentDirectory(), path) - var outDir string - if ext == ".d.ts" || ext == ".d.mts" || ext == ".d.cts" || (strings.HasSuffix(ext, ".ts") && strings.Contains(ext, ".d.")) { - outDir = c.Options.DeclarationDir - if outDir == "" { - outDir = c.Options.OutDir - } - } else { + path = tspath.ResolvePath(c.Program.GetCurrentDirectory(), path) + var outDir string + if ext == ".d.ts" || ext == ".d.mts" || ext == ".d.cts" || (strings.HasSuffix(ext, ".ts") && strings.Contains(ext, ".d.")) { + outDir = c.Options.DeclarationDir + if outDir == "" { outDir = c.Options.OutDir } - if outDir != "" { - common := c.Program.CommonSourceDirectory() - if common != "" { - path = tspath.GetRelativePathFromDirectory(common, path, tspath.ComparePathsOptions{ - UseCaseSensitiveFileNames: c.Program.UseCaseSensitiveFileNames(), - CurrentDirectory: c.Program.GetCurrentDirectory(), - }) - path = tspath.CombinePaths(tspath.ResolvePath(c.Program.GetCurrentDirectory(), c.Options.OutDir), path) - } + } else { + outDir = c.Options.OutDir + } + if outDir != "" { + common := c.Program.CommonSourceDirectory() + if common != "" { + path = tspath.GetRelativePathFromDirectory(common, path, tspath.ComparePathsOptions{ + UseCaseSensitiveFileNames: c.Program.UseCaseSensitiveFileNames(), + CurrentDirectory: c.Program.GetCurrentDirectory(), + }) + path = tspath.CombinePaths(tspath.ResolvePath(c.Program.GetCurrentDirectory(), c.Options.OutDir), path) } } return tspath.ChangeExtension(path, ext) diff --git a/internal/testutil/tsbaseline/js_emit_baseline.go b/internal/testutil/tsbaseline/js_emit_baseline.go index 5d36acb79b..8b51c19349 100644 --- a/internal/testutil/tsbaseline/js_emit_baseline.go +++ b/internal/testutil/tsbaseline/js_emit_baseline.go @@ -26,11 +26,6 @@ func DoJSEmitBaseline( harnessSettings *harnessutil.HarnessOptions, opts baseline.Options, ) { - if options.OutFile != "" || options.Out != "" { - // Just return, no t.Skip; these options are not going to be supported so noting them is not helpful. - return - } - if !options.NoEmit.IsTrue() && !options.EmitDeclarationOnly.IsTrue() && result.JS.Size() == 0 && len(result.Diagnostics) == 0 { t.Fatal("Expected at least one js file to be emitted or at least one error to be created.") } @@ -205,8 +200,6 @@ func prepareDeclarationCompilationContext( // Is this file going to be emitted separately var sourceFileName string - ////outFile := options.OutFile; - ////if len(outFile) == 0 { if len(options.OutDir) != 0 { sourceFilePath := tspath.GetNormalizedAbsolutePath(sourceFile.FileName(), result.Program.GetCurrentDirectory()) sourceFilePath = strings.Replace(sourceFilePath, result.Program.CommonSourceDirectory(), "", 1) @@ -214,10 +207,6 @@ func prepareDeclarationCompilationContext( } else { sourceFileName = sourceFile.FileName() } - ////} else { - //// // Goes to single --out file - //// sourceFileName = outFile - ////} dTsFileName := tspath.RemoveFileExtension(sourceFileName) + tspath.GetDeclarationEmitExtensionForPath(sourceFileName) return result.DTS.GetOrZero(dTsFileName) diff --git a/internal/transformers/jsxtransforms/jsx.go b/internal/transformers/jsxtransforms/jsx.go index 8cbd03ad35..54a2dcecf3 100644 --- a/internal/transformers/jsxtransforms/jsx.go +++ b/internal/transformers/jsxtransforms/jsx.go @@ -399,7 +399,7 @@ func (tx *JSXTransformer) visitJsxOpeningLikeElementJSX(element *ast.Node, child func (tx *JSXTransformer) transformJsxAttributesToObjectProps(attrs []*ast.Node, childrenProp *ast.Node) *ast.Node { target := tx.compilerOptions.GetEmitScriptTarget() - if target != core.ScriptTargetNone && target >= core.ScriptTargetES2018 { + if target >= core.ScriptTargetES2018 { // target has object spreads, can keep as-is return tx.Factory().NewObjectLiteralExpression(tx.Factory().NewNodeList(tx.transformJsxAttributesToProps(attrs, childrenProp)), false) } diff --git a/internal/transformers/moduletransforms/commonjsmodule.go b/internal/transformers/moduletransforms/commonjsmodule.go index a078399c5b..434e89d6cf 100644 --- a/internal/transformers/moduletransforms/commonjsmodule.go +++ b/internal/transformers/moduletransforms/commonjsmodule.go @@ -229,8 +229,7 @@ func (tx *CommonJSModuleTransformer) visitAssignmentPatternNoStack(node *ast.Nod func (tx *CommonJSModuleTransformer) visitSourceFile(node *ast.SourceFile) *ast.Node { if node.IsDeclarationFile || !(ast.IsEffectiveExternalModule(node, tx.compilerOptions) || - node.SubtreeFacts()&ast.SubtreeContainsDynamicImport != 0 || - ast.IsJsonSourceFile(node) && tx.compilerOptions.HasJsonModuleEmitEnabled() && len(tx.compilerOptions.OutFile) > 0) { + node.SubtreeFacts()&ast.SubtreeContainsDynamicImport != 0) { return node.AsNode() } diff --git a/internal/transformers/moduletransforms/utilities.go b/internal/transformers/moduletransforms/utilities.go index 5214fb0b08..5428fdb987 100644 --- a/internal/transformers/moduletransforms/utilities.go +++ b/internal/transformers/moduletransforms/utilities.go @@ -80,9 +80,6 @@ func tryGetModuleNameFromFile(factory *printer.NodeFactory, file *ast.SourceFile // if file.moduleName { // return factory.createStringLiteral(file.moduleName) // } - if !file.IsDeclarationFile && len(options.OutFile) > 0 { - return factory.NewStringLiteral(getExternalModuleNameFromPath(host, file.FileName(), "" /*referencePath*/)) - } return nil } diff --git a/internal/tsoptions/declscompiler.go b/internal/tsoptions/declscompiler.go index c378ad896a..08adadfebc 100644 --- a/internal/tsoptions/declscompiler.go +++ b/internal/tsoptions/declscompiler.go @@ -939,18 +939,6 @@ var commonOptionsWithBuild = []*CommandLineOption{ DefaultValueDescription: false, }, - { - Name: "out", - Kind: CommandLineOptionTypeString, - AffectsEmit: true, - AffectsBuildInfo: true, - AffectsDeclarationPath: true, - isFilePath: false, // This is intentionally broken to support compatibility with existing tsconfig files - // for correct behaviour, please use outFile - Category: diagnostics.Backwards_Compatibility, - transpileOptionValue: core.TSUnknown, - Description: diagnostics.Deprecated_setting_Use_outFile_instead, - }, { Name: "reactNamespace", Kind: CommandLineOptionTypeString, @@ -969,13 +957,6 @@ var commonOptionsWithBuild = []*CommandLineOption{ Description: diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript, DefaultValueDescription: false, }, - { - Name: "charset", - Kind: CommandLineOptionTypeString, - Category: diagnostics.Backwards_Compatibility, - Description: diagnostics.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files, - DefaultValueDescription: "utf8", - }, { Name: "emitBOM", Kind: CommandLineOptionTypeBoolean, @@ -1066,15 +1047,6 @@ var commonOptionsWithBuild = []*CommandLineOption{ Description: diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript, DefaultValueDescription: false, }, - { - Name: "noImplicitUseStrict", - Kind: CommandLineOptionTypeBoolean, - AffectsSemanticDiagnostics: true, - AffectsBuildInfo: true, - Category: diagnostics.Backwards_Compatibility, - Description: diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files, - DefaultValueDescription: false, - }, { Name: "noEmitHelpers", Kind: CommandLineOptionTypeBoolean, @@ -1143,24 +1115,6 @@ var commonOptionsWithBuild = []*CommandLineOption{ Description: diagnostics.Disable_error_reporting_for_unreachable_code, DefaultValueDescription: core.TSUnknown, }, - { - Name: "suppressExcessPropertyErrors", - Kind: CommandLineOptionTypeBoolean, - AffectsSemanticDiagnostics: true, - AffectsBuildInfo: true, - Category: diagnostics.Backwards_Compatibility, - Description: diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals, - DefaultValueDescription: false, - }, - { - Name: "suppressImplicitAnyIndexErrors", - Kind: CommandLineOptionTypeBoolean, - AffectsSemanticDiagnostics: true, - AffectsBuildInfo: true, - Category: diagnostics.Backwards_Compatibility, - Description: diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures, - DefaultValueDescription: false, - }, { Name: "forceConsistentCasingInFileNames", Kind: CommandLineOptionTypeBoolean, @@ -1177,15 +1131,6 @@ var commonOptionsWithBuild = []*CommandLineOption{ Description: diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs, DefaultValueDescription: 0, }, - { - Name: "noStrictGenericChecks", - Kind: CommandLineOptionTypeBoolean, - AffectsSemanticDiagnostics: true, - AffectsBuildInfo: true, - Category: diagnostics.Backwards_Compatibility, - Description: diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types, - DefaultValueDescription: false, - }, { Name: "useDefineForClassFields", Kind: CommandLineOptionTypeBoolean, @@ -1206,13 +1151,6 @@ var commonOptionsWithBuild = []*CommandLineOption{ DefaultValueDescription: false, }, - { - Name: "keyofStringsOnly", - Kind: CommandLineOptionTypeBoolean, - Category: diagnostics.Backwards_Compatibility, - Description: diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option, - DefaultValueDescription: false, - }, { // A list of plugins to load in the language service Name: "plugins", diff --git a/internal/tsoptions/enummaps.go b/internal/tsoptions/enummaps.go index 3c16cfad03..1d54da8549 100644 --- a/internal/tsoptions/enummaps.go +++ b/internal/tsoptions/enummaps.go @@ -187,6 +187,17 @@ var jsxOptionMap = collections.NewOrderedMapFromList([]collections.MapEntry[stri {Key: "react-jsxdev", Value: core.JsxEmitReactJSXDev}, }) +var InverseJsxOptionMap = collections.NewOrderedMapFromList(func() []collections.MapEntry[core.JsxEmit, string] { + entries := make([]collections.MapEntry[core.JsxEmit, string], 0, jsxOptionMap.Size()) + for key, value := range jsxOptionMap.Entries() { + entries = append(entries, collections.MapEntry[core.JsxEmit, string]{ + Key: value.(core.JsxEmit), + Value: key, + }) + } + return entries +}()) + var newLineOptionMap = collections.NewOrderedMapFromList([]collections.MapEntry[string, any]{ {Key: "crlf", Value: core.NewLineKindCRLF}, {Key: "lf", Value: core.NewLineKindLF}, diff --git a/internal/tsoptions/errors.go b/internal/tsoptions/errors.go index 353a2246d3..305693a9dd 100644 --- a/internal/tsoptions/errors.go +++ b/internal/tsoptions/errors.go @@ -15,7 +15,7 @@ func createDiagnosticForInvalidEnumType(opt *CommandLineOption, sourceFile *ast. namesOfType := slices.Collect(opt.EnumMap().Keys()) stringNames := formatEnumTypeKeys(opt, namesOfType) optName := "--" + opt.Name - return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.Argument_for_0_option_must_be_Colon_1, optName, stringNames) + return CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.Argument_for_0_option_must_be_Colon_1, optName, stringNames) } func formatEnumTypeKeys(opt *CommandLineOption, keys []string) string { @@ -68,17 +68,17 @@ func createUnknownOptionError( if otherOption.Name == "build" { diagnostic = diagnostics.Option_build_must_be_the_first_command_line_argument } - return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostic, unknownOption) + return CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostic, unknownOption) } } if unknownOptionErrorText == "" { unknownOptionErrorText = unknownOption } // TODO: possibleOption := spelling suggestion - return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, unknownOptionDiagnostic, unknownOptionErrorText) + return CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, unknownOptionDiagnostic, unknownOptionErrorText) } -func createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile *ast.SourceFile, node *ast.Node, message *diagnostics.Message, args ...any) *ast.Diagnostic { +func CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile *ast.SourceFile, node *ast.Node, message *diagnostics.Message, args ...any) *ast.Diagnostic { if sourceFile != nil && node != nil { return ast.NewDiagnostic(sourceFile, core.NewTextRange(scanner.SkipTrivia(sourceFile.Text(), node.Loc.Pos()), node.End()), message, args...) } diff --git a/internal/tsoptions/parsinghelpers.go b/internal/tsoptions/parsinghelpers.go index 6f4dd7466e..6b2e11ff6c 100644 --- a/internal/tsoptions/parsinghelpers.go +++ b/internal/tsoptions/parsinghelpers.go @@ -265,8 +265,6 @@ func parseCompilerOptions(key string, value any, allOptions *core.CompilerOption allOptions.JsxFragmentFactory = parseString(value) case "jsxImportSource": allOptions.JsxImportSource = parseString(value) - case "keyofStringsOnly": - allOptions.KeyofStringsOnly = parseTristate(value) case "lib": if _, ok := value.([]string); ok { allOptions.Lib = value.([]string) @@ -327,8 +325,6 @@ func parseCompilerOptions(key string, value any, allOptions *core.CompilerOption allOptions.NoImplicitOverride = parseTristate(value) case "noUncheckedSideEffectImports": allOptions.NoUncheckedSideEffectImports = parseTristate(value) - case "out": - allOptions.Out = parseString(value) case "outFile": allOptions.OutFile = parseString(value) case "noResolve": diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index 5204f58e80..e8b0fd82c7 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -208,7 +208,7 @@ func parseOwnConfigOfJsonSourceFile( propertySetErrors = append(propertySetErrors, err...) } else if option == nil { if keyText == "excludes" { - propertySetErrors = append(propertySetErrors, createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, propertyAssignment.Name(), diagnostics.Unknown_option_excludes_Did_you_mean_exclude)) + propertySetErrors = append(propertySetErrors, CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, propertyAssignment.Name(), diagnostics.Unknown_option_excludes_Did_you_mean_exclude)) } if core.Find(OptionsDeclarations, func(option *CommandLineOption) bool { return option.Name == keyText }) != nil { rootCompilerOptions = append(rootCompilerOptions, propertyAssignment.Name()) @@ -343,7 +343,7 @@ func validateJsonOptionValue( if opt.extraValidation { diag := specToDiagnostic(val.(string), false) if diag != nil { - errors = append(errors, createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, diag)) + errors = append(errors, CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, diag)) return nil, errors } } @@ -419,7 +419,7 @@ func convertJsonOption( if sourceFile == nil && nodeValue == nil { return nil, []*ast.Diagnostic{ast.NewCompilerDiagnostic(diagnostics.Option_0_can_only_be_specified_on_command_line, opt.Name)} } else { - return nil, []*ast.Diagnostic{createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnostics.Option_0_can_only_be_specified_on_command_line, opt.Name)} + return nil, []*ast.Diagnostic{CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnostics.Option_0_can_only_be_specified_on_command_line, opt.Name)} } } if isCompilerOptionsValue(opt, value) { @@ -443,7 +443,7 @@ func convertJsonOption( return normalizeNonListOptionValue(opt, basePath, validatedValue), errors } } else { - return nil, []*ast.Diagnostic{createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.Name, getCompilerOptionValueTypeString(opt))} + return nil, []*ast.Diagnostic{CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.Name, getCompilerOptionValueTypeString(opt))} } } @@ -510,7 +510,7 @@ func getExtendsConfigPath( if !host.FS().FileExists(extendedConfigPath) && !strings.HasSuffix(extendedConfigPath, tspath.ExtensionJson) { extendedConfigPath = extendedConfigPath + tspath.ExtensionJson if !host.FS().FileExists(extendedConfigPath) { - errors = append(errors, createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(errorFile, valueExpression, diagnostics.File_0_not_found, extendedConfig)) + errors = append(errors, CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(errorFile, valueExpression, diagnostics.File_0_not_found, extendedConfig)) return "", errors } } @@ -522,9 +522,9 @@ func getExtendsConfigPath( return resolved.ResolvedFileName, errors } if extendedConfig == "" { - errors = append(errors, createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(errorFile, valueExpression, diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends")) + errors = append(errors, CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(errorFile, valueExpression, diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends")) } else { - errors = append(errors, createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(errorFile, valueExpression, diagnostics.File_0_not_found, extendedConfig)) + errors = append(errors, CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(errorFile, valueExpression, diagnostics.File_0_not_found, extendedConfig)) } return "", errors } @@ -1159,7 +1159,7 @@ func parseJsonConfigFileContentWorker( fileName = "tsconfig.json" } diagnosticMessage := diagnostics.The_files_list_in_config_file_0_is_empty - nodeValue := forEachTsConfigPropArray(sourceFile.SourceFile, "files", func(property *ast.PropertyAssignment) *ast.Node { return property.Initializer }) + nodeValue := ForEachTsConfigPropArray(sourceFile.SourceFile, "files", func(property *ast.PropertyAssignment) *ast.Node { return property.Initializer }) errors = append(errors, ast.NewDiagnostic(sourceFile.SourceFile, core.NewTextRange(scanner.SkipTrivia(sourceFile.SourceFile.Text(), nodeValue.Pos()), nodeValue.End()), diagnosticMessage, fileName)) } else { errors = append(errors, ast.NewCompilerDiagnostic(diagnostics.The_files_list_in_config_file_0_is_empty, configFileName)) @@ -1301,7 +1301,7 @@ func shouldReportNoInputFiles(fileNames []string, canJsonReportNoInputFiles bool func validateSpecs(specs any, disallowTrailingRecursion bool, jsonSourceFile *ast.SourceFile, specKey string) ([]string, []*ast.Diagnostic) { createDiagnostic := func(message *diagnostics.Message, spec string) *ast.Diagnostic { element := getTsConfigPropArrayElementValue(jsonSourceFile, specKey, spec) - return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(jsonSourceFile, element.AsNode(), message, spec) + return CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(jsonSourceFile, element.AsNode(), message, spec) } var errors []*ast.Diagnostic var finalSpecs []string @@ -1367,7 +1367,7 @@ func invalidDotDotAfterRecursiveWildcard(s string) bool { const invalidTrailingRecursionPattern = `(?:^|\/)\*\*\/?$` func getTsConfigPropArrayElementValue(tsConfigSourceFile *ast.SourceFile, propKey string, elementValue string) *ast.StringLiteral { - return forEachTsConfigPropArray(tsConfigSourceFile, propKey, func(property *ast.PropertyAssignment) *ast.StringLiteral { + return ForEachTsConfigPropArray(tsConfigSourceFile, propKey, func(property *ast.PropertyAssignment) *ast.StringLiteral { if ast.IsArrayLiteralExpression(property.Initializer) { value := core.Find(property.Initializer.AsArrayLiteralExpression().Elements.Nodes, func(element *ast.Node) bool { return ast.IsStringLiteral(element) && element.AsStringLiteral().Text == elementValue @@ -1380,14 +1380,14 @@ func getTsConfigPropArrayElementValue(tsConfigSourceFile *ast.SourceFile, propKe }) } -func forEachTsConfigPropArray[T any](tsConfigSourceFile *ast.SourceFile, propKey string, callback func(property *ast.PropertyAssignment) *T) *T { +func ForEachTsConfigPropArray[T any](tsConfigSourceFile *ast.SourceFile, propKey string, callback func(property *ast.PropertyAssignment) *T) *T { if tsConfigSourceFile != nil { - return forEachPropertyAssignment(getTsConfigObjectLiteralExpression(tsConfigSourceFile), propKey, callback) + return ForEachPropertyAssignment(getTsConfigObjectLiteralExpression(tsConfigSourceFile), propKey, callback) } return nil } -func forEachPropertyAssignment[T any](objectLiteral *ast.ObjectLiteralExpression, key string, callback func(property *ast.PropertyAssignment) T, key2 ...string) T { +func ForEachPropertyAssignment[T any](objectLiteral *ast.ObjectLiteralExpression, key string, callback func(property *ast.PropertyAssignment) *T, key2 ...string) *T { if objectLiteral != nil { for _, property := range objectLiteral.Properties.Nodes { if !ast.IsPropertyAssignment(property) { @@ -1400,7 +1400,7 @@ func forEachPropertyAssignment[T any](objectLiteral *ast.ObjectLiteralExpression } } } - return *new(T) + return nil } func getTsConfigObjectLiteralExpression(tsConfigSourceFile *ast.SourceFile) *ast.ObjectLiteralExpression { diff --git a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=false).errors.txt b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=false).errors.txt new file mode 100644 index 0000000000..a799d98368 --- /dev/null +++ b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=false).errors.txt @@ -0,0 +1,29 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'b.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.ts (0 errors) ==== + export class A {} + +==== b.js (0 errors) ==== + import { A } from './a.js'; + + export class B1 extends A { + constructor() { + super(); + } + } + + export class B2 extends A { + constructor() { + super(); + } + } + + export class B3 extends A { + constructor() { + super(); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=false).js b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=false).js index a8ea92d742..08d58dbbaa 100644 --- a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=false).js +++ b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=false).js @@ -70,32 +70,3 @@ export declare class B2 extends A { export declare class B3 extends A { constructor(); } - - -//// [DtsFileErrors] - - -b.d.ts(2,33): error TS2314: Generic type 'A' requires 1 type argument(s). -b.d.ts(8,33): error TS2314: Generic type 'A' requires 1 type argument(s). - - -==== a.d.ts (0 errors) ==== - export declare class A { - } - -==== b.d.ts (2 errors) ==== - import { A } from './a.js'; - export declare class B1 extends A { - ~ -!!! error TS2314: Generic type 'A' requires 1 type argument(s). - constructor(); - } - export declare class B2 extends A { - constructor(); - } - export declare class B3 extends A { - ~~~~~~~~~~~~~~~~~ -!!! error TS2314: Generic type 'A' requires 1 type argument(s). - constructor(); - } - \ No newline at end of file diff --git a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=true).errors.txt b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=true).errors.txt index 85fc3a63f1..1cc1d93aa0 100644 --- a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=true).errors.txt +++ b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount1(strict=true).errors.txt @@ -1,7 +1,11 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. b.js(3,25): error TS8026: Expected A type arguments; provide these with an '@extends' tag. b.js(15,25): error TS8026: Expected A type arguments; provide these with an '@extends' tag. +!!! error TS5055: Cannot write file 'b.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.ts (0 errors) ==== export class A {} diff --git a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=false).errors.txt b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=false).errors.txt new file mode 100644 index 0000000000..ea03590841 --- /dev/null +++ b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=false).errors.txt @@ -0,0 +1,32 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'b.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.ts (0 errors) ==== + export class A {} + +==== b.js (0 errors) ==== + import { A } from './a.js'; + + /** @extends {A} */ + export class B1 extends A { + constructor() { + super(); + } + } + + /** @extends {A} */ + export class B2 extends A { + constructor() { + super(); + } + } + + /** @extends {A} */ + export class B3 extends A { + constructor() { + super(); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=false).js b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=false).js index 732da07a69..331070d2fe 100644 --- a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=false).js +++ b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=false).js @@ -79,35 +79,3 @@ export declare class B2 extends A { export declare class B3 extends A { constructor(); } - - -//// [DtsFileErrors] - - -b.d.ts(3,33): error TS2314: Generic type 'A' requires 1 type argument(s). -b.d.ts(11,33): error TS2314: Generic type 'A' requires 1 type argument(s). - - -==== a.d.ts (0 errors) ==== - export declare class A { - } - -==== b.d.ts (2 errors) ==== - import { A } from './a.js'; - /** @extends {A} */ - export declare class B1 extends A { - ~ -!!! error TS2314: Generic type 'A' requires 1 type argument(s). - constructor(); - } - /** @extends {A} */ - export declare class B2 extends A { - constructor(); - } - /** @extends {A} */ - export declare class B3 extends A { - ~~~~~~~~~~~~~~~~~ -!!! error TS2314: Generic type 'A' requires 1 type argument(s). - constructor(); - } - \ No newline at end of file diff --git a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=true).errors.txt b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=true).errors.txt index a2ad36543e..b114e4bfab 100644 --- a/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=true).errors.txt +++ b/testdata/baselines/reference/compiler/superCallInJSWithWrongBaseTypeArgumentCount2(strict=true).errors.txt @@ -1,7 +1,11 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. b.js(4,25): error TS8026: Expected A type arguments; provide these with an '@extends' tag. b.js(18,25): error TS8026: Expected A type arguments; provide these with an '@extends' tag. +!!! error TS5055: Cannot write file 'b.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.ts (0 errors) ==== export class A {} diff --git a/testdata/baselines/reference/config/tsconfigParsing/issue 1267 scenario - extended files not picked up with json api.js b/testdata/baselines/reference/config/tsconfigParsing/issue 1267 scenario - extended files not picked up with json api.js index 4833e5b0b8..87910ed310 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/issue 1267 scenario - extended files not picked up with json api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/issue 1267 scenario - extended files not picked up with json api.js @@ -89,7 +89,6 @@ CompilerOptions:: { "allowJs": true, "allowSyntheticDefaultImports": true, - "baseUrl": "/", "emitDecoratorMetadata": true, "esModuleInterop": true, "experimentalDecorators": true, @@ -111,6 +110,7 @@ CompilerOptions:: "node", "vitest/globals" ], + "baseUrl": "/", "configFilePath": "/tsconfig.json" } diff --git a/testdata/baselines/reference/config/tsconfigParsing/issue 1267 scenario - extended files not picked up with jsonSourceFile api.js b/testdata/baselines/reference/config/tsconfigParsing/issue 1267 scenario - extended files not picked up with jsonSourceFile api.js index 4833e5b0b8..87910ed310 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/issue 1267 scenario - extended files not picked up with jsonSourceFile api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/issue 1267 scenario - extended files not picked up with jsonSourceFile api.js @@ -89,7 +89,6 @@ CompilerOptions:: { "allowJs": true, "allowSyntheticDefaultImports": true, - "baseUrl": "/", "emitDecoratorMetadata": true, "esModuleInterop": true, "experimentalDecorators": true, @@ -111,6 +110,7 @@ CompilerOptions:: "node", "vitest/globals" ], + "baseUrl": "/", "configFilePath": "/tsconfig.json" } diff --git a/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends and configDir with json api.js b/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends and configDir with json api.js index 63df2cbe6a..a866073de5 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends and configDir with json api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends and configDir with json api.js @@ -32,12 +32,12 @@ Fs:: configFileName:: tsconfig.json CompilerOptions:: { - "baseUrl": "/baseUrl", "declarationDir": "/declarationDir", "outDir": "/outDir", - "outFile": "/outFile", "rootDir": "/rootDir", "tsBuildInfoFile": "/tsBuildInfoFile", + "baseUrl": "/baseUrl", + "outFile": "/outFile", "configFilePath": "/tsconfig.json" } diff --git a/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends and configDir with jsonSourceFile api.js b/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends and configDir with jsonSourceFile api.js index 63df2cbe6a..a866073de5 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends and configDir with jsonSourceFile api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends and configDir with jsonSourceFile api.js @@ -32,12 +32,12 @@ Fs:: configFileName:: tsconfig.json CompilerOptions:: { - "baseUrl": "/baseUrl", "declarationDir": "/declarationDir", "outDir": "/outDir", - "outFile": "/outFile", "rootDir": "/rootDir", "tsBuildInfoFile": "/tsBuildInfoFile", + "baseUrl": "/baseUrl", + "outFile": "/outFile", "configFilePath": "/tsconfig.json" } diff --git a/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends, files, include and other options with json api.js b/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends, files, include and other options with json api.js index f75da7b5d4..0d6a6f28ae 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends, files, include and other options with json api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends, files, include and other options with json api.js @@ -39,10 +39,10 @@ Fs:: configFileName:: tsconfig.json CompilerOptions:: { - "baseUrl": "/", "noImplicitAny": true, "outDir": "/dist", "strict": true, + "baseUrl": "/", "configFilePath": "/tsconfig.json" } diff --git a/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends, files, include and other options with jsonSourceFile api.js b/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends, files, include and other options with jsonSourceFile api.js index f75da7b5d4..0d6a6f28ae 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends, files, include and other options with jsonSourceFile api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/parses tsconfig with extends, files, include and other options with jsonSourceFile api.js @@ -39,10 +39,10 @@ Fs:: configFileName:: tsconfig.json CompilerOptions:: { - "baseUrl": "/", "noImplicitAny": true, "outDir": "/dist", "strict": true, + "baseUrl": "/", "configFilePath": "/tsconfig.json" } diff --git a/testdata/baselines/reference/conformance/typeTagForMultipleVariableDeclarations.errors.txt b/testdata/baselines/reference/conformance/typeTagForMultipleVariableDeclarations.errors.txt new file mode 100644 index 0000000000..b3ec6d167f --- /dev/null +++ b/testdata/baselines/reference/conformance/typeTagForMultipleVariableDeclarations.errors.txt @@ -0,0 +1,13 @@ +error TS5055: Cannot write file 'typeTagForMultipleVariableDeclarations.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'typeTagForMultipleVariableDeclarations.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. +==== typeTagForMultipleVariableDeclarations.js (0 errors) ==== + /** @type {number} */ + var x,y,z; + x + y + z + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt index 54481a89df..eae1ba1ed9 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt @@ -1,7 +1,9 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. a.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== a.ts (1 errors) ==== module M { export function f() { diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt deleted file mode 100644 index eb2cd86e4e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -alwaysStrictNoImplicitUseStrict.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. - - -==== alwaysStrictNoImplicitUseStrict.ts (1 errors) ==== - module M { - export function f() { - var arguments = []; - ~~~~~~~~~ -!!! error TS1100: Invalid use of 'arguments' in strict mode. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt.diff deleted file mode 100644 index 0fbbf4c454..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.alwaysStrictNoImplicitUseStrict.errors.txt -+++ new.alwaysStrictNoImplicitUseStrict.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration. - alwaysStrictNoImplicitUseStrict.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. - - --!!! error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration. - ==== alwaysStrictNoImplicitUseStrict.ts (1 errors) ==== - module M { - export function f() { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.js b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.js deleted file mode 100644 index 39f4ac7296..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.js +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts] //// - -//// [alwaysStrictNoImplicitUseStrict.ts] -module M { - export function f() { - var arguments = []; - } -} - -//// [alwaysStrictNoImplicitUseStrict.js] -var M; -(function (M) { - function f() { - var arguments = []; - } - M.f = f; -})(M || (M = {})); diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.js.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.js.diff deleted file mode 100644 index c00858109c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.alwaysStrictNoImplicitUseStrict.js -+++ new.alwaysStrictNoImplicitUseStrict.js -@@= skipped -7, +7 lines =@@ - } - - //// [alwaysStrictNoImplicitUseStrict.js] --"use strict"; - var M; - (function (M) { - function f() { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.symbols b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.symbols deleted file mode 100644 index d01ffc0a84..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.symbols +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts] //// - -=== alwaysStrictNoImplicitUseStrict.ts === -module M { ->M : Symbol(M, Decl(alwaysStrictNoImplicitUseStrict.ts, 0, 0)) - - export function f() { ->f : Symbol(f, Decl(alwaysStrictNoImplicitUseStrict.ts, 0, 10)) - - var arguments = []; ->arguments : Symbol(arguments, Decl(alwaysStrictNoImplicitUseStrict.ts, 2, 11)) - } -} diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.types b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.types deleted file mode 100644 index ed33e733e6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.types +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts] //// - -=== alwaysStrictNoImplicitUseStrict.ts === -module M { ->M : typeof M - - export function f() { ->f : () => void - - var arguments = []; ->arguments : any[] ->[] : undefined[] - } -} diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedClassDeclarationAcrossFiles.errors.txt b/testdata/baselines/reference/submodule/compiler/blockScopedClassDeclarationAcrossFiles.errors.txt new file mode 100644 index 0000000000..ea94961d68 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedClassDeclarationAcrossFiles.errors.txt @@ -0,0 +1,9 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== c.ts (0 errors) ==== + let foo: typeof C; +==== b.ts (0 errors) ==== + class C { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bundledDtsLateExportRenaming.errors.txt b/testdata/baselines/reference/submodule/compiler/bundledDtsLateExportRenaming.errors.txt new file mode 100644 index 0000000000..dea88727d4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bundledDtsLateExportRenaming.errors.txt @@ -0,0 +1,30 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== index.ts (0 errors) ==== + export * from "./nested"; + +==== nested/base.ts (0 errors) ==== + import { B } from "./shared"; + + export function f() { + return new B(); + } + +==== nested/derived.ts (0 errors) ==== + import { f } from "./base"; + + export function g() { + return f(); + } + +==== nested/index.ts (0 errors) ==== + export * from "./base"; + + export * from "./derived"; + export * from "./shared"; + +==== nested/shared.ts (0 errors) ==== + export class B {} + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.errors.txt b/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.errors.txt index fa22beceb3..91e5fd5a6c 100644 --- a/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/checkIndexConstraintOfJavascriptClassExpression.errors.txt @@ -1,8 +1,10 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. weird.js(1,1): error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? weird.js(1,23): error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. weird.js(9,17): error TS7006: Parameter 'error' implicitly has an 'any' type. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== weird.js (3 errors) ==== someFunction(function(BaseClass) { ~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles6.errors.txt b/testdata/baselines/reference/submodule/compiler/checkJsFiles6.errors.txt new file mode 100644 index 0000000000..ebd8b9890d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles6.errors.txt @@ -0,0 +1,6 @@ +error TS5052: Option 'checkJs' cannot be specified without specifying option 'allowJs'. + + +!!! error TS5052: Option 'checkJs' cannot be specified without specifying option 'allowJs'. +==== a.js (0 errors) ==== + var x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkJsFiles6.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/checkJsFiles6.errors.txt.diff index 4d58497525..52a665c1b5 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsFiles6.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsFiles6.errors.txt.diff @@ -1,16 +1,15 @@ --- old.checkJsFiles6.errors.txt +++ new.checkJsFiles6.errors.txt @@= skipped -0, +0 lines =@@ --error TS5052: Option 'checkJs' cannot be specified without specifying option 'allowJs'. + error TS5052: Option 'checkJs' cannot be specified without specifying option 'allowJs'. -error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? - The file is in the program because: - Root file specified for compilation -- -- --!!! error TS5052: Option 'checkJs' cannot be specified without specifying option 'allowJs'. + + + !!! error TS5052: Option 'checkJs' cannot be specified without specifying option 'allowJs'. -!!! error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? -!!! error TS6504: The file is in the program because: -!!! error TS6504: Root file specified for compilation --==== a.js (0 errors) ==== -- var x; -+ \ No newline at end of file + ==== a.js (0 errors) ==== + var x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commonSourceDir2.errors.txt b/testdata/baselines/reference/submodule/compiler/commonSourceDir2.errors.txt new file mode 100644 index 0000000000..85bcf5d9c7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commonSourceDir2.errors.txt @@ -0,0 +1,9 @@ +error TS5009: Cannot find the common subdirectory path for the input files. + + +!!! error TS5009: Cannot find the common subdirectory path for the input files. +==== A:/foo/bar.ts (0 errors) ==== + var x: number; + +==== B:/foo/baz.ts (0 errors) ==== + var y: number; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commonSourceDir2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/commonSourceDir2.errors.txt.diff deleted file mode 100644 index e4084760ea..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commonSourceDir2.errors.txt.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.commonSourceDir2.errors.txt -+++ new.commonSourceDir2.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5009: Cannot find the common subdirectory path for the input files. -- -- --!!! error TS5009: Cannot find the common subdirectory path for the input files. --==== A:/foo/bar.ts (0 errors) ==== -- var x: number; -- --==== B:/foo/baz.ts (0 errors) ==== -- var y: number; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commonSourceDir4.errors.txt b/testdata/baselines/reference/submodule/compiler/commonSourceDir4.errors.txt new file mode 100644 index 0000000000..f3493504e4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commonSourceDir4.errors.txt @@ -0,0 +1,9 @@ +error TS5009: Cannot find the common subdirectory path for the input files. + + +!!! error TS5009: Cannot find the common subdirectory path for the input files. +==== A:/foo/bar.ts (0 errors) ==== + var x: number; + +==== a:/foo/baz.ts (0 errors) ==== + var y: number; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commonSourceDir4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/commonSourceDir4.errors.txt.diff deleted file mode 100644 index cea59cc620..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commonSourceDir4.errors.txt.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.commonSourceDir4.errors.txt -+++ new.commonSourceDir4.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5009: Cannot find the common subdirectory path for the input files. -- -- --!!! error TS5009: Cannot find the common subdirectory path for the input files. --==== A:/foo/bar.ts (0 errors) ==== -- var x: number; -- --==== a:/foo/baz.ts (0 errors) ==== -- var y: number; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/compilerOptionsOutAndNoEmit.errors.txt b/testdata/baselines/reference/submodule/compiler/compilerOptionsOutAndNoEmit.errors.txt new file mode 100644 index 0000000000..94b49e0bd2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/compilerOptionsOutAndNoEmit.errors.txt @@ -0,0 +1,8 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class c { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/compilerOptionsOutFileAndNoEmit.errors.txt b/testdata/baselines/reference/submodule/compiler/compilerOptionsOutFileAndNoEmit.errors.txt new file mode 100644 index 0000000000..94b49e0bd2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/compilerOptionsOutFileAndNoEmit.errors.txt @@ -0,0 +1,8 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class c { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-useBeforeDefinition2.errors.txt b/testdata/baselines/reference/submodule/compiler/constDeclarations-useBeforeDefinition2.errors.txt index f3d7cc7f4c..18f82cd7e6 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-useBeforeDefinition2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-useBeforeDefinition2.errors.txt @@ -1,11 +1,9 @@ -file1.ts(1,1): error TS2448: Block-scoped variable 'c' used before its declaration. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -==== file1.ts (1 errors) ==== +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== file1.ts (0 errors) ==== c; - ~ -!!! error TS2448: Block-scoped variable 'c' used before its declaration. -!!! related TS2728 file2.ts:1:7: 'c' is declared here. ==== file2.ts (0 errors) ==== const c = 0; diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowJavascript.errors.txt b/testdata/baselines/reference/submodule/compiler/controlFlowJavascript.errors.txt new file mode 100644 index 0000000000..5bb0b8e7eb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowJavascript.errors.txt @@ -0,0 +1,113 @@ +error TS5055: Cannot write file 'controlFlowJavascript.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'controlFlowJavascript.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== controlFlowJavascript.js (0 errors) ==== + let cond = true; + + // CFA for 'let' and no initializer + function f1() { + let x; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } + const y = x; // string | number | undefined + } + + // CFA for 'let' and 'undefined' initializer + function f2() { + let x = undefined; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } + const y = x; // string | number | undefined + } + + // CFA for 'let' and 'null' initializer + function f3() { + let x = null; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } + const y = x; // string | number | null + } + + // CFA for 'var' with no initializer + function f5() { + var x; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } + const y = x; // string | number | undefined + } + + // CFA for 'var' with 'undefined' initializer + function f6() { + var x = undefined; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } + const y = x; // string | number | undefined + } + + // CFA for 'var' with 'null' initializer + function f7() { + var x = null; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } + const y = x; // string | number | null + } + + // No CFA for captured outer variables + function f9() { + let x; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } + const y = x; // string | number | undefined + function f() { + const z = x; // any + } + } + + // No CFA for captured outer variables + function f10() { + let x; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } + const y = x; // string | number | undefined + const f = () => { + const z = x; // any + }; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError1.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError1.errors.txt new file mode 100644 index 0000000000..f8e3a3a11e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError1.errors.txt @@ -0,0 +1,7 @@ +error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. + + +!!! error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. +==== hello.ts (0 errors) ==== + var hello = "yo!"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError1.errors.txt.diff deleted file mode 100644 index 23c036bc35..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError1.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.declFileEmitDeclarationOnlyError1.errors.txt -+++ new.declFileEmitDeclarationOnlyError1.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. -- -- --!!! error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. --==== hello.ts (0 errors) ==== -- var hello = "yo!"; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError2.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError2.errors.txt new file mode 100644 index 0000000000..f8e3a3a11e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError2.errors.txt @@ -0,0 +1,7 @@ +error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. + + +!!! error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. +==== hello.ts (0 errors) ==== + var hello = "yo!"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError2.errors.txt.diff deleted file mode 100644 index bf0ab461a1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileEmitDeclarationOnlyError2.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.declFileEmitDeclarationOnlyError2.errors.txt -+++ new.declFileEmitDeclarationOnlyError2.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. -- -- --!!! error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. --==== hello.ts (0 errors) ==== -- var hello = "yo!"; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt index 9d677e4bf7..5e2e87f6f1 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt @@ -1,9 +1,11 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. declFile.d.ts(2,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. declFile.d.ts(3,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. declFile.d.ts(5,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. declFile.d.ts(7,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== client.ts (0 errors) ==== /// var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBundlePreservesHasNoDefaultLibDirective.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitBundlePreservesHasNoDefaultLibDirective.errors.txt new file mode 100644 index 0000000000..1f41036e73 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBundlePreservesHasNoDefaultLibDirective.errors.txt @@ -0,0 +1,19 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== extensions.ts (0 errors) ==== + /// + class Foo { + public: string; + } +==== core.ts (0 errors) ==== + interface Array {} + interface Boolean {} + interface Function {} + interface IArguments {} + interface Number {} + interface Object {} + interface RegExp {} + interface String {} + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.errors.txt new file mode 100644 index 0000000000..3c20cd1201 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.errors.txt @@ -0,0 +1,16 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /a/index.ts (0 errors) ==== + export * from "./src/" +==== /b/index.ts (0 errors) ==== + export * from "./src/" +==== /b/src/index.ts (0 errors) ==== + export class B {} +==== /a/src/index.ts (0 errors) ==== + import { B } from "b"; + + export default function () { + return new B(); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMonorepoBaseUrl.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitMonorepoBaseUrl.errors.txt new file mode 100644 index 0000000000..1d61ebf6de --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitMonorepoBaseUrl.errors.txt @@ -0,0 +1,59 @@ +/tsconfig.json(6,5): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== /tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "module": "nodenext", + "declaration": true, + "outDir": "temp", + "baseUrl": "." + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + } + } + +==== /packages/compiler-core/src/index.ts (0 errors) ==== + import { PluginConfig } from "@babel/parser"; + +==== /packages/compiler-sfc/src/index.ts (0 errors) ==== + import { createPlugin } from "@babel/parser"; + export function resolveParserPlugins() { + return [createPlugin()]; + } + +==== /node_modules/.pnpm/@babel+parser@7.23.6/node_modules/@babel/parser/package.json (0 errors) ==== + { + "name": "@babel/parser", + "version": "7.23.6", + "main": "./lib/index.js", + "types": "./typings/babel-parser.d.ts" + } + +==== /node_modules/.pnpm/@babel+parser@7.23.6/node_modules/@babel/parser/typings/babel-parser.d.ts (0 errors) ==== + export declare function createPlugin(): PluginConfig; + export declare class PluginConfig {} + +==== /packages/compiler-core/package.json (0 errors) ==== + { + "name": "@vue/compiler-core", + "version": "3.0.0", + "main": "./src/index.ts", + "dependencies": { + "@babel/parser": "^7.0.0" + } + } + +==== /packages/compiler-sfc/package.json (0 errors) ==== + { + "name": "@vue/compiler-sfc", + "version": "3.0.0", + "main": "./src/index.ts", + "dependencies": { + "@babel/parser": "^7.0.0", + "@vue/compiler-core": "^3.0.0" + } + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitOutFileBundlePaths.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitOutFileBundlePaths.errors.txt new file mode 100644 index 0000000000..a25077ced4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitOutFileBundlePaths.errors.txt @@ -0,0 +1,16 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== js/versions.static.js (0 errors) ==== + export default { + "@a/b": "1.0.0", + "@a/c": "1.2.3" + }; +==== js/index.js (0 errors) ==== + import versions from './versions.static.js'; + + export { + versions + }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo.errors.txt new file mode 100644 index 0000000000..a105c4a2c8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo.errors.txt @@ -0,0 +1,34 @@ +packages/b/tsconfig.json(5,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== packages/b/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "outDir": "dist", + "declaration": true, + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "@ts-bug/a": ["../a"] + } + } + } + + +==== packages/b/src/index.ts (0 errors) ==== + import { a } from "@ts-bug/a"; + + export function b(text: string) { + return a(text); + } +==== packages/a/index.d.ts (0 errors) ==== + declare module "@ts-bug/a" { + export type AText = { + value: string; + }; + export function a(text: string): AText; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo2.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo2.errors.txt index 7e0353da00..ede5ed3e40 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo2.errors.txt @@ -1,12 +1,17 @@ packages/lab/src/index.ts(1,31): error TS2307: Cannot find module '@ts-bug/core/utils' or its corresponding type declarations. +packages/lab/tsconfig.json(5,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./../*"}' instead. -==== packages/lab/tsconfig.json (0 errors) ==== +==== packages/lab/tsconfig.json (1 errors) ==== { "compilerOptions": { "outDir": "dist", "declaration": true, "baseUrl": "../", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./../*"}' instead. "paths": { "@ts-bug/core": ["./core/src"], "@ts-bug/core/*": ["./core/src/*"], diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPrefersPathKindBasedOnBundling.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitPrefersPathKindBasedOnBundling.errors.txt new file mode 100644 index 0000000000..2a2158debf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPrefersPathKindBasedOnBundling.errors.txt @@ -0,0 +1,22 @@ +error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +==== src/lib/operators/scalar.ts (0 errors) ==== + export interface Scalar { + (): string; + value: number; + } + + export function scalar(value: string): Scalar { + return null as any; + } +==== src/settings/spacing.ts (0 errors) ==== + import { scalar } from '../lib/operators/scalar'; + + export default { + get xs() { + return scalar("14px"); + } + }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt new file mode 100644 index 0000000000..63ba628173 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt @@ -0,0 +1,16 @@ +/foo/tsconfig.json(2,26): error TS5069: Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'. + + +==== /foo/tsconfig.json (1 errors) ==== + { + "compilerOptions": { "declarationDir": "out" } + ~~~~~~~~~~~~~~~~ +!!! error TS5069: Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'. + } + +==== /foo/test.ts (0 errors) ==== + interface Foo { + x: number; + } + export default Foo; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt.diff deleted file mode 100644 index cbf28e0aeb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt -+++ new.declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt -@@= skipped -0, +0 lines =@@ --/foo/tsconfig.json(2,26): error TS5069: Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'. -- -- --==== /foo/tsconfig.json (1 errors) ==== -- { -- "compilerOptions": { "declarationDir": "out" } -- ~~~~~~~~~~~~~~~~ --!!! error TS5069: Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'. -- } -- --==== /foo/test.ts (0 errors) ==== -- interface Foo { -- x: number; -- } -- export default Foo; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.errors.txt new file mode 100644 index 0000000000..710a1cd24f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.errors.txt @@ -0,0 +1,13 @@ +error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +==== a.d.ts (0 errors) ==== + declare class c { + } + +==== a.ts (0 errors) ==== + class d { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.errors.txt.diff deleted file mode 100644 index dcc166c23e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.declarationFileOverwriteError.errors.txt -+++ new.declarationFileOverwriteError.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --==== a.d.ts (0 errors) ==== -- declare class c { -- } -- --==== a.ts (0 errors) ==== -- class d { -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteErrorWithOut.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteErrorWithOut.errors.txt new file mode 100644 index 0000000000..7d282537b9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteErrorWithOut.errors.txt @@ -0,0 +1,12 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /out.d.ts (0 errors) ==== + declare class c { + } + +==== /a.ts (0 errors) ==== + class d { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationFilesGeneratingTypeReferences.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationFilesGeneratingTypeReferences.errors.txt new file mode 100644 index 0000000000..6a8d2c1cec --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationFilesGeneratingTypeReferences.errors.txt @@ -0,0 +1,15 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /a/node_modules/@types/jquery/index.d.ts (0 errors) ==== + interface JQuery { + + } + +==== /a/app.ts (0 errors) ==== + /// + namespace Test { + export var x: JQuery; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.errors.txt new file mode 100644 index 0000000000..a4cab2ae02 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.errors.txt @@ -0,0 +1,19 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class Foo { + doThing(x: {a: number}) { + return {b: x.a}; + } + static make() { + return new Foo(); + } + } +==== index.ts (0 errors) ==== + const c = new Foo(); + c.doThing({a: 42}); + + let x = c.doThing({a: 12}); + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.js.map b/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.js.map deleted file mode 100644 index d4100af4e8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [a.d.ts.map] -{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,CAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;MAErB;IACD,MAAM,CAAC,IAAI,QAEV;CACJ"} -//// [index.d.ts.map] -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.js.map.diff b/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.js.map.diff deleted file mode 100644 index af692d8435..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.js.map.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.declarationMapsOutFile2.js.map -+++ new.declarationMapsOutFile2.js.map -@@= skipped -0, +0 lines =@@ --//// [bundle.d.ts.map] --{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} --//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7OztJQUd0QixNQUFNLENBQUMsSUFBSTtDQUdkO0FDUEQsUUFBQSxNQUFNLENBQUMsS0FBWSxDQUFDO0FBR3BCLFFBQUEsSUFBSSxDQUFDOztDQUFxQixDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== -+//// [a.d.ts.map] -+{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,CAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;MAErB;IACD,MAAM,CAAC,IAAI,QAEV;CACJ"} -+//// [index.d.ts.map] -+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.sourcemap.txt deleted file mode 100644 index 41476a2b5e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.sourcemap.txt +++ /dev/null @@ -1,158 +0,0 @@ -=================================================================== -JsFile: a.d.ts -mapUrl: a.d.ts.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:a.d.ts -sourceFile:a.ts -------------------------------------------------------------------- ->>>declare class Foo { -1 > -2 >^^^^^^^^^^^^^^ -3 > ^^^ -1 > -2 >class -3 > Foo -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 18) Source(1, 10) + SourceIndex(0) ---- ->>> doThing(x: { -1 >^^^^ -2 > ^^^^^^^ -3 > ^ -4 > ^ -5 > ^^ -6 > ^^^^-> -1 > { - > -2 > doThing -3 > ( -4 > x -5 > : -1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) -2 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) ---- ->>> a: number; -1->^^^^^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ -5 > ^ -1->{ -2 > a -3 > : -4 > number -5 > -1->Emitted(3, 9) Source(2, 17) + SourceIndex(0) -2 >Emitted(3, 10) Source(2, 18) + SourceIndex(0) -3 >Emitted(3, 12) Source(2, 20) + SourceIndex(0) -4 >Emitted(3, 18) Source(2, 26) + SourceIndex(0) -5 >Emitted(3, 19) Source(2, 26) + SourceIndex(0) ---- ->>> }): { -1 >^^^^^ -2 > ^^^^^^^^^^^^^^-> -1 >} -1 >Emitted(4, 6) Source(2, 27) + SourceIndex(0) ---- ->>> b: number; ->>> }; -1->^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^-> -1->) { - > return {b: x.a}; - > } -1->Emitted(6, 7) Source(4, 6) + SourceIndex(0) ---- ->>> static make(): Foo; -1->^^^^ -2 > ^^^^^^ -3 > ^ -4 > ^^^^ -5 > ^^^^^^^^ -1-> - > -2 > static -3 > -4 > make -5 > () { - > return new Foo(); - > } -1->Emitted(7, 5) Source(5, 5) + SourceIndex(0) -2 >Emitted(7, 11) Source(5, 11) + SourceIndex(0) -3 >Emitted(7, 12) Source(5, 12) + SourceIndex(0) -4 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) -5 >Emitted(7, 24) Source(7, 6) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >} -1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.d.ts.map=================================================================== -JsFile: index.d.ts -mapUrl: index.d.ts.map -sourceRoot: -sources: index.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:index.d.ts -sourceFile:index.ts -------------------------------------------------------------------- ->>>declare const c: Foo; -1 > -2 >^^^^^^^^ -3 > ^^^^^^ -4 > ^ -5 > ^^^^^ -6 > ^ -1 > -2 > -3 > const -4 > c -5 > = new Foo() -6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) -3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) -4 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) -5 >Emitted(1, 21) Source(1, 20) + SourceIndex(0) -6 >Emitted(1, 22) Source(1, 21) + SourceIndex(0) ---- ->>>declare let x: { -1 > -2 >^^^^^^^^ -3 > ^^^^ -4 > ^ -5 > ^^-> -1 > - >c.doThing({a: 42}); - > - > -2 > -3 > let -4 > x -1 >Emitted(2, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(2, 9) Source(4, 1) + SourceIndex(0) -3 >Emitted(2, 13) Source(4, 5) + SourceIndex(0) -4 >Emitted(2, 14) Source(4, 6) + SourceIndex(0) ---- ->>> b: number; ->>>}; -1->^ -2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1-> = c.doThing({a: 12}) -2 > ; -1->Emitted(4, 2) Source(4, 27) + SourceIndex(0) -2 >Emitted(4, 3) Source(4, 28) + SourceIndex(0) ---- ->>>//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.sourcemap.txt.diff deleted file mode 100644 index bbcf8c4e76..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsOutFile2.sourcemap.txt.diff +++ /dev/null @@ -1,157 +0,0 @@ ---- old.declarationMapsOutFile2.sourcemap.txt -+++ new.declarationMapsOutFile2.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: bundle.d.ts --mapUrl: bundle.d.ts.map -+JsFile: a.d.ts -+mapUrl: a.d.ts.map - sourceRoot: --sources: a.ts,index.ts -+sources: a.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:bundle.d.ts -+emittedFile:a.d.ts - sourceFile:a.ts - ------------------------------------------------------------------- - >>>declare class Foo { -@@= skipped -22, +22 lines =@@ - 1 >^^^^ - 2 > ^^^^^^^ - 3 > ^ --4 > ^^^ --5 > ^^^^-> -+4 > ^ -+5 > ^^ -+6 > ^^^^-> - 1 > { - > - 2 > doThing - 3 > ( --4 > x: -+4 > x -+5 > : - 1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) - 2 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) - 3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) --4 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -+4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -+5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) - --- - >>> a: number; - 1->^^^^^^^^ -@@= skipped -37, +40 lines =@@ - --- - >>> b: number; - >>> }; -+1->^^^^^^ -+2 > ^^^^^^^^^^^^^^^^^^-> -+1->) { -+ > return {b: x.a}; -+ > } -+1->Emitted(6, 7) Source(4, 6) + SourceIndex(0) -+--- - >>> static make(): Foo; - 1->^^^^ - 2 > ^^^^^^ - 3 > ^ - 4 > ^^^^ --1->) { -- > return {b: x.a}; -- > } -+5 > ^^^^^^^^ -+1-> - > - 2 > static - 3 > - 4 > make -+5 > () { -+ > return new Foo(); -+ > } - 1->Emitted(7, 5) Source(5, 5) + SourceIndex(0) - 2 >Emitted(7, 11) Source(5, 11) + SourceIndex(0) - 3 >Emitted(7, 12) Source(5, 12) + SourceIndex(0) - 4 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) -+5 >Emitted(7, 24) Source(7, 6) + SourceIndex(0) - --- - >>>} - 1 >^ --2 > ^^^^^^^^^^^^^^^^^^^^^-> --1 >() { -- > return new Foo(); -- > } -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+1 > - >} - 1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=a.d.ts.map=================================================================== -+JsFile: index.d.ts -+mapUrl: index.d.ts.map -+sourceRoot: -+sources: index.ts -+=================================================================== - ------------------------------------------------------------------- --emittedFile:bundle.d.ts -+emittedFile:index.d.ts - sourceFile:index.ts - ------------------------------------------------------------------- - >>>declare const c: Foo; --1-> -+1 > - 2 >^^^^^^^^ - 3 > ^^^^^^ - 4 > ^ - 5 > ^^^^^ - 6 > ^ --1-> -+1 > - 2 > - 3 > const - 4 > c - 5 > = new Foo() - 6 > ; --1->Emitted(9, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(9, 9) Source(1, 1) + SourceIndex(1) --3 >Emitted(9, 15) Source(1, 7) + SourceIndex(1) --4 >Emitted(9, 16) Source(1, 8) + SourceIndex(1) --5 >Emitted(9, 21) Source(1, 20) + SourceIndex(1) --6 >Emitted(9, 22) Source(1, 21) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) -+3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) -+4 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) -+5 >Emitted(1, 21) Source(1, 20) + SourceIndex(0) -+6 >Emitted(1, 22) Source(1, 21) + SourceIndex(0) - --- - >>>declare let x: { - 1 > -@@= skipped -63, +77 lines =@@ - 2 > - 3 > let - 4 > x --1 >Emitted(10, 1) Source(4, 1) + SourceIndex(1) --2 >Emitted(10, 9) Source(4, 1) + SourceIndex(1) --3 >Emitted(10, 13) Source(4, 5) + SourceIndex(1) --4 >Emitted(10, 14) Source(4, 6) + SourceIndex(1) -+1 >Emitted(2, 1) Source(4, 1) + SourceIndex(0) -+2 >Emitted(2, 9) Source(4, 1) + SourceIndex(0) -+3 >Emitted(2, 13) Source(4, 5) + SourceIndex(0) -+4 >Emitted(2, 14) Source(4, 6) + SourceIndex(0) - --- - >>> b: number; - >>>}; - 1->^ - 2 > ^ --3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1-> = c.doThing({a: 12}) - 2 > ; --1->Emitted(12, 2) Source(4, 27) + SourceIndex(1) --2 >Emitted(12, 3) Source(4, 28) + SourceIndex(1) -+1->Emitted(4, 2) Source(4, 27) + SourceIndex(0) -+2 >Emitted(4, 3) Source(4, 28) + SourceIndex(0) - --- -->>>//# sourceMappingURL=bundle.d.ts.map -+>>>//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.errors.txt new file mode 100644 index 0000000000..a4cab2ae02 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.errors.txt @@ -0,0 +1,19 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class Foo { + doThing(x: {a: number}) { + return {b: x.a}; + } + static make() { + return new Foo(); + } + } +==== index.ts (0 errors) ==== + const c = new Foo(); + c.doThing({a: 42}); + + let x = c.doThing({a: 12}); + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.js.map b/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.js.map deleted file mode 100644 index 88f75b4b73..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.js.map +++ /dev/null @@ -1,8 +0,0 @@ -//// [a.d.ts.map] -{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,CAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;MAErB;IACD,MAAM,CAAC,IAAI,QAEV;CACJ"} -//// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,GAAG;IACL,OAAO,CAAC,CAAc,EAAE;QACpB,OAAO,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC,CAAC;IAAA,CACnB;IACD,MAAM,CAAC,IAAI,GAAG;QACV,OAAO,IAAI,GAAG,EAAE,CAAC;IAAA,CACpB;CACJ"} -//// [index.d.ts.map] -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} -//// [index.js.map] -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACpB,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC;AAEnB,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.js.map.diff b/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.js.map.diff deleted file mode 100644 index 6830d6ed95..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.js.map.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.declarationMapsWithSourceMap.js.map -+++ new.declarationMapsWithSourceMap.js.map -@@= skipped -0, +0 lines =@@ --//// [bundle.js.map] --{"version":3,"file":"bundle.js","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,MAAM,GAAG;IACL,OAAO,CAAC,CAAc;QAClB,OAAO,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC,CAAC;IACpB,CAAC;IACD,MAAM,CAAC,IAAI;QACP,OAAO,IAAI,GAAG,EAAE,CAAC;IACrB,CAAC;CACJ;ACPD,MAAM,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACpB,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC;AAEnB,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC"} --//// https://sokra.github.io/source-map-visualization#base64,Y2xhc3MgRm9vIHsNCiAgICBkb1RoaW5nKHgpIHsNCiAgICAgICAgcmV0dXJuIHsgYjogeC5hIH07DQogICAgfQ0KICAgIHN0YXRpYyBtYWtlKCkgew0KICAgICAgICByZXR1cm4gbmV3IEZvbygpOw0KICAgIH0NCn0NCmNvbnN0IGMgPSBuZXcgRm9vKCk7DQpjLmRvVGhpbmcoeyBhOiA0MiB9KTsNCmxldCB4ID0gYy5kb1RoaW5nKHsgYTogMTIgfSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1idW5kbGUuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyIsImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sR0FBRztJQUNMLE9BQU8sQ0FBQyxDQUFjO1FBQ2xCLE9BQU8sRUFBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBQyxDQUFDO0lBQ3BCLENBQUM7SUFDRCxNQUFNLENBQUMsSUFBSTtRQUNQLE9BQU8sSUFBSSxHQUFHLEVBQUUsQ0FBQztJQUNyQixDQUFDO0NBQ0o7QUNQRCxNQUFNLENBQUMsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUMsQ0FBQztBQUVuQixJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsT0FBTyxDQUFDLEVBQUMsQ0FBQyxFQUFFLEVBQUUsRUFBQyxDQUFDLENBQUMifQ==,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== -- --//// [bundle.d.ts.map] --{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} --//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7OztJQUd0QixNQUFNLENBQUMsSUFBSTtDQUdkO0FDUEQsUUFBQSxNQUFNLENBQUMsS0FBWSxDQUFDO0FBR3BCLFFBQUEsSUFBSSxDQUFDOztDQUFxQixDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== -+//// [a.d.ts.map] -+{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,CAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;MAErB;IACD,MAAM,CAAC,IAAI,QAEV;CACJ"} -+//// [a.js.map] -+{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,GAAG;IACL,OAAO,CAAC,CAAc,EAAE;QACpB,OAAO,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC,CAAC;IAAA,CACnB;IACD,MAAM,CAAC,IAAI,GAAG;QACV,OAAO,IAAI,GAAG,EAAE,CAAC;IAAA,CACpB;CACJ"} -+//// [index.d.ts.map] -+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} -+//// [index.js.map] -+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACpB,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC;AAEnB,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.sourcemap.txt deleted file mode 100644 index 9a7ff0b626..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.sourcemap.txt +++ /dev/null @@ -1,425 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: a.js.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>class Foo { -1 > -2 >^^^^^^ -3 > ^^^ -4 > ^^^^^^^^-> -1 > -2 >class -3 > Foo -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) ---- ->>> doThing(x) { -1->^^^^ -2 > ^^^^^^^ -3 > ^ -4 > ^ -5 > ^^ -6 > ^^^^^^^^^^^^-> -1-> { - > -2 > doThing -3 > ( -4 > x: {a: number} -5 > ) -1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) -2 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -4 >Emitted(2, 14) Source(2, 27) + SourceIndex(0) -5 >Emitted(2, 16) Source(2, 29) + SourceIndex(0) ---- ->>> return { b: x.a }; -1->^^^^^^^^ -2 > ^^^^^^^ -3 > ^^ -4 > ^ -5 > ^^ -6 > ^ -7 > ^ -8 > ^ -9 > ^^ -10> ^ -1->{ - > -2 > return -3 > { -4 > b -5 > : -6 > x -7 > . -8 > a -9 > } -10> ; -1->Emitted(3, 9) Source(3, 9) + SourceIndex(0) -2 >Emitted(3, 16) Source(3, 16) + SourceIndex(0) -3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 19) Source(3, 18) + SourceIndex(0) -5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) -6 >Emitted(3, 22) Source(3, 21) + SourceIndex(0) -7 >Emitted(3, 23) Source(3, 22) + SourceIndex(0) -8 >Emitted(3, 24) Source(3, 23) + SourceIndex(0) -9 >Emitted(3, 26) Source(3, 24) + SourceIndex(0) -10>Emitted(3, 27) Source(3, 25) + SourceIndex(0) ---- ->>> } -1 >^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^^-> -1 > -2 > - > } -1 >Emitted(4, 5) Source(3, 25) + SourceIndex(0) -2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) ---- ->>> static make() { -1->^^^^ -2 > ^^^^^^ -3 > ^ -4 > ^^^^ -5 > ^^^ -6 > ^^^^^^^^-> -1-> - > -2 > static -3 > -4 > make -5 > () -1->Emitted(5, 5) Source(5, 5) + SourceIndex(0) -2 >Emitted(5, 11) Source(5, 11) + SourceIndex(0) -3 >Emitted(5, 12) Source(5, 12) + SourceIndex(0) -4 >Emitted(5, 16) Source(5, 16) + SourceIndex(0) -5 >Emitted(5, 19) Source(5, 19) + SourceIndex(0) ---- ->>> return new Foo(); -1->^^^^^^^^ -2 > ^^^^^^^ -3 > ^^^^ -4 > ^^^ -5 > ^^ -6 > ^ -1->{ - > -2 > return -3 > new -4 > Foo -5 > () -6 > ; -1->Emitted(6, 9) Source(6, 9) + SourceIndex(0) -2 >Emitted(6, 16) Source(6, 16) + SourceIndex(0) -3 >Emitted(6, 20) Source(6, 20) + SourceIndex(0) -4 >Emitted(6, 23) Source(6, 23) + SourceIndex(0) -5 >Emitted(6, 25) Source(6, 25) + SourceIndex(0) -6 >Emitted(6, 26) Source(6, 26) + SourceIndex(0) ---- ->>> } -1 >^^^^ -2 > ^ -1 > -2 > - > } -1 >Emitted(7, 5) Source(6, 26) + SourceIndex(0) -2 >Emitted(7, 6) Source(7, 6) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >} -1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: a.d.ts -mapUrl: a.d.ts.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:a.d.ts -sourceFile:a.ts -------------------------------------------------------------------- ->>>declare class Foo { -1 > -2 >^^^^^^^^^^^^^^ -3 > ^^^ -1 > -2 >class -3 > Foo -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 18) Source(1, 10) + SourceIndex(0) ---- ->>> doThing(x: { -1 >^^^^ -2 > ^^^^^^^ -3 > ^ -4 > ^ -5 > ^^ -6 > ^^^^-> -1 > { - > -2 > doThing -3 > ( -4 > x -5 > : -1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) -2 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) ---- ->>> a: number; -1->^^^^^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ -5 > ^ -1->{ -2 > a -3 > : -4 > number -5 > -1->Emitted(3, 9) Source(2, 17) + SourceIndex(0) -2 >Emitted(3, 10) Source(2, 18) + SourceIndex(0) -3 >Emitted(3, 12) Source(2, 20) + SourceIndex(0) -4 >Emitted(3, 18) Source(2, 26) + SourceIndex(0) -5 >Emitted(3, 19) Source(2, 26) + SourceIndex(0) ---- ->>> }): { -1 >^^^^^ -2 > ^^^^^^^^^^^^^^-> -1 >} -1 >Emitted(4, 6) Source(2, 27) + SourceIndex(0) ---- ->>> b: number; ->>> }; -1->^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^-> -1->) { - > return {b: x.a}; - > } -1->Emitted(6, 7) Source(4, 6) + SourceIndex(0) ---- ->>> static make(): Foo; -1->^^^^ -2 > ^^^^^^ -3 > ^ -4 > ^^^^ -5 > ^^^^^^^^ -1-> - > -2 > static -3 > -4 > make -5 > () { - > return new Foo(); - > } -1->Emitted(7, 5) Source(5, 5) + SourceIndex(0) -2 >Emitted(7, 11) Source(5, 11) + SourceIndex(0) -3 >Emitted(7, 12) Source(5, 12) + SourceIndex(0) -4 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) -5 >Emitted(7, 24) Source(7, 6) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >} -1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.d.ts.map=================================================================== -JsFile: index.js -mapUrl: index.js.map -sourceRoot: -sources: index.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:index.js -sourceFile:index.ts -------------------------------------------------------------------- ->>>const c = new Foo(); -1 > -2 >^^^^^^ -3 > ^ -4 > ^^^ -5 > ^^^^ -6 > ^^^ -7 > ^^ -8 > ^ -9 > ^^-> -1 > -2 >const -3 > c -4 > = -5 > new -6 > Foo -7 > () -8 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) -4 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -5 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) -6 >Emitted(1, 18) Source(1, 18) + SourceIndex(0) -7 >Emitted(1, 20) Source(1, 20) + SourceIndex(0) -8 >Emitted(1, 21) Source(1, 21) + SourceIndex(0) ---- ->>>c.doThing({ a: 42 }); -1-> -2 >^ -3 > ^ -4 > ^^^^^^^ -5 > ^ -6 > ^^ -7 > ^ -8 > ^^ -9 > ^^ -10> ^^ -11> ^ -12> ^ -13> ^^^^^^^^^-> -1-> - > -2 >c -3 > . -4 > doThing -5 > ( -6 > { -7 > a -8 > : -9 > 42 -10> } -11> ) -12> ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(2, 3) Source(2, 3) + SourceIndex(0) -4 >Emitted(2, 10) Source(2, 10) + SourceIndex(0) -5 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) -6 >Emitted(2, 13) Source(2, 12) + SourceIndex(0) -7 >Emitted(2, 14) Source(2, 13) + SourceIndex(0) -8 >Emitted(2, 16) Source(2, 15) + SourceIndex(0) -9 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -10>Emitted(2, 20) Source(2, 18) + SourceIndex(0) -11>Emitted(2, 21) Source(2, 19) + SourceIndex(0) -12>Emitted(2, 22) Source(2, 20) + SourceIndex(0) ---- ->>>let x = c.doThing({ a: 12 }); -1-> -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^^^^^^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^ -12> ^^ -13> ^^ -14> ^ -15> ^ -16> ^^^-> -1-> - > - > -2 >let -3 > x -4 > = -5 > c -6 > . -7 > doThing -8 > ( -9 > { -10> a -11> : -12> 12 -13> } -14> ) -15> ; -1->Emitted(3, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(4, 5) + SourceIndex(0) -3 >Emitted(3, 6) Source(4, 6) + SourceIndex(0) -4 >Emitted(3, 9) Source(4, 9) + SourceIndex(0) -5 >Emitted(3, 10) Source(4, 10) + SourceIndex(0) -6 >Emitted(3, 11) Source(4, 11) + SourceIndex(0) -7 >Emitted(3, 18) Source(4, 18) + SourceIndex(0) -8 >Emitted(3, 19) Source(4, 19) + SourceIndex(0) -9 >Emitted(3, 21) Source(4, 20) + SourceIndex(0) -10>Emitted(3, 22) Source(4, 21) + SourceIndex(0) -11>Emitted(3, 24) Source(4, 23) + SourceIndex(0) -12>Emitted(3, 26) Source(4, 25) + SourceIndex(0) -13>Emitted(3, 28) Source(4, 26) + SourceIndex(0) -14>Emitted(3, 29) Source(4, 27) + SourceIndex(0) -15>Emitted(3, 30) Source(4, 28) + SourceIndex(0) ---- ->>>//# sourceMappingURL=index.js.map=================================================================== -JsFile: index.d.ts -mapUrl: index.d.ts.map -sourceRoot: -sources: index.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:index.d.ts -sourceFile:index.ts -------------------------------------------------------------------- ->>>declare const c: Foo; -1 > -2 >^^^^^^^^ -3 > ^^^^^^ -4 > ^ -5 > ^^^^^ -6 > ^ -1 > -2 > -3 > const -4 > c -5 > = new Foo() -6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) -3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) -4 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) -5 >Emitted(1, 21) Source(1, 20) + SourceIndex(0) -6 >Emitted(1, 22) Source(1, 21) + SourceIndex(0) ---- ->>>declare let x: { -1 > -2 >^^^^^^^^ -3 > ^^^^ -4 > ^ -5 > ^^-> -1 > - >c.doThing({a: 42}); - > - > -2 > -3 > let -4 > x -1 >Emitted(2, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(2, 9) Source(4, 1) + SourceIndex(0) -3 >Emitted(2, 13) Source(4, 5) + SourceIndex(0) -4 >Emitted(2, 14) Source(4, 6) + SourceIndex(0) ---- ->>> b: number; ->>>}; -1->^ -2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1-> = c.doThing({a: 12}) -2 > ; -1->Emitted(4, 2) Source(4, 27) + SourceIndex(0) -2 >Emitted(4, 3) Source(4, 28) + SourceIndex(0) ---- ->>>//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.sourcemap.txt.diff deleted file mode 100644 index bb443646ee..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithSourceMap.sourcemap.txt.diff +++ /dev/null @@ -1,494 +0,0 @@ ---- old.declarationMapsWithSourceMap.sourcemap.txt -+++ new.declarationMapsWithSourceMap.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: bundle.js --mapUrl: bundle.js.map -+JsFile: a.js -+mapUrl: a.js.map - sourceRoot: --sources: a.ts,index.ts -+sources: a.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:bundle.js -+emittedFile:a.js - sourceFile:a.ts - ------------------------------------------------------------------- - >>>class Foo { -@@= skipped -24, +24 lines =@@ - 2 > ^^^^^^^ - 3 > ^ - 4 > ^ --5 > ^^^^^^^^^^^^^^-> -+5 > ^^ -+6 > ^^^^^^^^^^^^-> - 1-> { - > - 2 > doThing - 3 > ( - 4 > x: {a: number} -+5 > ) - 1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) - 2 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) - 3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) - 4 >Emitted(2, 14) Source(2, 27) + SourceIndex(0) -+5 >Emitted(2, 16) Source(2, 29) + SourceIndex(0) - --- - >>> return { b: x.a }; - 1->^^^^^^^^ -@@= skipped -22, +25 lines =@@ - 8 > ^ - 9 > ^^ - 10> ^ --1->) { -+1->{ - > - 2 > return - 3 > { -@@= skipped -27, +27 lines =@@ - 2 > ^ - 3 > ^^^^^^^^^^^^^^^-> - 1 > -- > --2 > } --1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) -+2 > -+ > } -+1 >Emitted(4, 5) Source(3, 25) + SourceIndex(0) - 2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) - --- - >>> static make() { -@@= skipped -10, +10 lines =@@ - 2 > ^^^^^^ - 3 > ^ - 4 > ^^^^ --5 > ^^^^^^^^^^^-> -+5 > ^^^ -+6 > ^^^^^^^^-> - 1-> - > - 2 > static - 3 > - 4 > make -+5 > () - 1->Emitted(5, 5) Source(5, 5) + SourceIndex(0) - 2 >Emitted(5, 11) Source(5, 11) + SourceIndex(0) - 3 >Emitted(5, 12) Source(5, 12) + SourceIndex(0) - 4 >Emitted(5, 16) Source(5, 16) + SourceIndex(0) -+5 >Emitted(5, 19) Source(5, 19) + SourceIndex(0) - --- - >>> return new Foo(); - 1->^^^^^^^^ -@@= skipped -18, +21 lines =@@ - 4 > ^^^ - 5 > ^^ - 6 > ^ --1->() { -+1->{ - > - 2 > return - 3 > new -@@= skipped -18, +18 lines =@@ - 1 >^^^^ - 2 > ^ - 1 > -- > --2 > } --1 >Emitted(7, 5) Source(7, 5) + SourceIndex(0) -+2 > -+ > } -+1 >Emitted(7, 5) Source(6, 26) + SourceIndex(0) - 2 >Emitted(7, 6) Source(7, 6) + SourceIndex(0) - --- - >>>} - 1 >^ --2 > ^^^^^^^^^^^^^^^^^^^^-> --1 > -- >} --1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) ----- --------------------------------------------------------------------- --emittedFile:bundle.js -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+1 > -+ >} -+1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) -+--- -+>>>//# sourceMappingURL=a.js.map=================================================================== -+JsFile: a.d.ts -+mapUrl: a.d.ts.map -+sourceRoot: -+sources: a.ts -+=================================================================== -+------------------------------------------------------------------- -+emittedFile:a.d.ts -+sourceFile:a.ts -+------------------------------------------------------------------- -+>>>declare class Foo { -+1 > -+2 >^^^^^^^^^^^^^^ -+3 > ^^^ -+1 > -+2 >class -+3 > Foo -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) -+3 >Emitted(1, 18) Source(1, 10) + SourceIndex(0) -+--- -+>>> doThing(x: { -+1 >^^^^ -+2 > ^^^^^^^ -+3 > ^ -+4 > ^ -+5 > ^^ -+6 > ^^^^-> -+1 > { -+ > -+2 > doThing -+3 > ( -+4 > x -+5 > : -+1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) -+2 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -+3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -+4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -+5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -+--- -+>>> a: number; -+1->^^^^^^^^ -+2 > ^ -+3 > ^^ -+4 > ^^^^^^ -+5 > ^ -+1->{ -+2 > a -+3 > : -+4 > number -+5 > -+1->Emitted(3, 9) Source(2, 17) + SourceIndex(0) -+2 >Emitted(3, 10) Source(2, 18) + SourceIndex(0) -+3 >Emitted(3, 12) Source(2, 20) + SourceIndex(0) -+4 >Emitted(3, 18) Source(2, 26) + SourceIndex(0) -+5 >Emitted(3, 19) Source(2, 26) + SourceIndex(0) -+--- -+>>> }): { -+1 >^^^^^ -+2 > ^^^^^^^^^^^^^^-> -+1 >} -+1 >Emitted(4, 6) Source(2, 27) + SourceIndex(0) -+--- -+>>> b: number; -+>>> }; -+1->^^^^^^ -+2 > ^^^^^^^^^^^^^^^^^^-> -+1->) { -+ > return {b: x.a}; -+ > } -+1->Emitted(6, 7) Source(4, 6) + SourceIndex(0) -+--- -+>>> static make(): Foo; -+1->^^^^ -+2 > ^^^^^^ -+3 > ^ -+4 > ^^^^ -+5 > ^^^^^^^^ -+1-> -+ > -+2 > static -+3 > -+4 > make -+5 > () { -+ > return new Foo(); -+ > } -+1->Emitted(7, 5) Source(5, 5) + SourceIndex(0) -+2 >Emitted(7, 11) Source(5, 11) + SourceIndex(0) -+3 >Emitted(7, 12) Source(5, 12) + SourceIndex(0) -+4 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) -+5 >Emitted(7, 24) Source(7, 6) + SourceIndex(0) -+--- -+>>>} -+1 >^ -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+1 > -+ >} -+1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) -+--- -+>>>//# sourceMappingURL=a.d.ts.map=================================================================== -+JsFile: index.js -+mapUrl: index.js.map -+sourceRoot: -+sources: index.ts -+=================================================================== -+------------------------------------------------------------------- -+emittedFile:index.js - sourceFile:index.ts - ------------------------------------------------------------------- - >>>const c = new Foo(); --1-> -+1 > - 2 >^^^^^^ - 3 > ^ - 4 > ^^^ -@@= skipped -26, +131 lines =@@ - 7 > ^^ - 8 > ^ - 9 > ^^-> --1-> -+1 > - 2 >const - 3 > c - 4 > = -@@= skipped -8, +8 lines =@@ - 6 > Foo - 7 > () - 8 > ; --1->Emitted(9, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(9, 7) Source(1, 7) + SourceIndex(1) --3 >Emitted(9, 8) Source(1, 8) + SourceIndex(1) --4 >Emitted(9, 11) Source(1, 11) + SourceIndex(1) --5 >Emitted(9, 15) Source(1, 15) + SourceIndex(1) --6 >Emitted(9, 18) Source(1, 18) + SourceIndex(1) --7 >Emitted(9, 20) Source(1, 20) + SourceIndex(1) --8 >Emitted(9, 21) Source(1, 21) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -+3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) -+4 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -+5 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) -+6 >Emitted(1, 18) Source(1, 18) + SourceIndex(0) -+7 >Emitted(1, 20) Source(1, 20) + SourceIndex(0) -+8 >Emitted(1, 21) Source(1, 21) + SourceIndex(0) - --- - >>>c.doThing({ a: 42 }); - 1-> -@@= skipped -36, +36 lines =@@ - 10> } - 11> ) - 12> ; --1->Emitted(10, 1) Source(2, 1) + SourceIndex(1) --2 >Emitted(10, 2) Source(2, 2) + SourceIndex(1) --3 >Emitted(10, 3) Source(2, 3) + SourceIndex(1) --4 >Emitted(10, 10) Source(2, 10) + SourceIndex(1) --5 >Emitted(10, 11) Source(2, 11) + SourceIndex(1) --6 >Emitted(10, 13) Source(2, 12) + SourceIndex(1) --7 >Emitted(10, 14) Source(2, 13) + SourceIndex(1) --8 >Emitted(10, 16) Source(2, 15) + SourceIndex(1) --9 >Emitted(10, 18) Source(2, 17) + SourceIndex(1) --10>Emitted(10, 20) Source(2, 18) + SourceIndex(1) --11>Emitted(10, 21) Source(2, 19) + SourceIndex(1) --12>Emitted(10, 22) Source(2, 20) + SourceIndex(1) -+1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -+2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) -+3 >Emitted(2, 3) Source(2, 3) + SourceIndex(0) -+4 >Emitted(2, 10) Source(2, 10) + SourceIndex(0) -+5 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) -+6 >Emitted(2, 13) Source(2, 12) + SourceIndex(0) -+7 >Emitted(2, 14) Source(2, 13) + SourceIndex(0) -+8 >Emitted(2, 16) Source(2, 15) + SourceIndex(0) -+9 >Emitted(2, 18) Source(2, 17) + SourceIndex(0) -+10>Emitted(2, 20) Source(2, 18) + SourceIndex(0) -+11>Emitted(2, 21) Source(2, 19) + SourceIndex(0) -+12>Emitted(2, 22) Source(2, 20) + SourceIndex(0) - --- - >>>let x = c.doThing({ a: 12 }); - 1-> -@@= skipped -29, +29 lines =@@ - 13> ^^ - 14> ^ - 15> ^ --16> ^^^^-> -+16> ^^^-> - 1-> - > - > -@@= skipped -18, +18 lines =@@ - 13> } - 14> ) - 15> ; --1->Emitted(11, 1) Source(4, 1) + SourceIndex(1) --2 >Emitted(11, 5) Source(4, 5) + SourceIndex(1) --3 >Emitted(11, 6) Source(4, 6) + SourceIndex(1) --4 >Emitted(11, 9) Source(4, 9) + SourceIndex(1) --5 >Emitted(11, 10) Source(4, 10) + SourceIndex(1) --6 >Emitted(11, 11) Source(4, 11) + SourceIndex(1) --7 >Emitted(11, 18) Source(4, 18) + SourceIndex(1) --8 >Emitted(11, 19) Source(4, 19) + SourceIndex(1) --9 >Emitted(11, 21) Source(4, 20) + SourceIndex(1) --10>Emitted(11, 22) Source(4, 21) + SourceIndex(1) --11>Emitted(11, 24) Source(4, 23) + SourceIndex(1) --12>Emitted(11, 26) Source(4, 25) + SourceIndex(1) --13>Emitted(11, 28) Source(4, 26) + SourceIndex(1) --14>Emitted(11, 29) Source(4, 27) + SourceIndex(1) --15>Emitted(11, 30) Source(4, 28) + SourceIndex(1) -+1->Emitted(3, 1) Source(4, 1) + SourceIndex(0) -+2 >Emitted(3, 5) Source(4, 5) + SourceIndex(0) -+3 >Emitted(3, 6) Source(4, 6) + SourceIndex(0) -+4 >Emitted(3, 9) Source(4, 9) + SourceIndex(0) -+5 >Emitted(3, 10) Source(4, 10) + SourceIndex(0) -+6 >Emitted(3, 11) Source(4, 11) + SourceIndex(0) -+7 >Emitted(3, 18) Source(4, 18) + SourceIndex(0) -+8 >Emitted(3, 19) Source(4, 19) + SourceIndex(0) -+9 >Emitted(3, 21) Source(4, 20) + SourceIndex(0) -+10>Emitted(3, 22) Source(4, 21) + SourceIndex(0) -+11>Emitted(3, 24) Source(4, 23) + SourceIndex(0) -+12>Emitted(3, 26) Source(4, 25) + SourceIndex(0) -+13>Emitted(3, 28) Source(4, 26) + SourceIndex(0) -+14>Emitted(3, 29) Source(4, 27) + SourceIndex(0) -+15>Emitted(3, 30) Source(4, 28) + SourceIndex(0) - --- -->>>//# sourceMappingURL=bundle.js.map=================================================================== --JsFile: bundle.d.ts --mapUrl: bundle.d.ts.map -+>>>//# sourceMappingURL=index.js.map=================================================================== -+JsFile: index.d.ts -+mapUrl: index.d.ts.map - sourceRoot: --sources: a.ts,index.ts -+sources: index.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:bundle.d.ts --sourceFile:a.ts --------------------------------------------------------------------- -->>>declare class Foo { --1 > --2 >^^^^^^^^^^^^^^ --3 > ^^^ --1 > --2 >class --3 > Foo --1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) --2 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) --3 >Emitted(1, 18) Source(1, 10) + SourceIndex(0) ----- -->>> doThing(x: { --1 >^^^^ --2 > ^^^^^^^ --3 > ^ --4 > ^^^ --5 > ^^^^-> --1 > { -- > --2 > doThing --3 > ( --4 > x: --1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) --2 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) --3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) --4 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) ----- -->>> a: number; --1->^^^^^^^^ --2 > ^ --3 > ^^ --4 > ^^^^^^ --5 > ^ --1->{ --2 > a --3 > : --4 > number --5 > --1->Emitted(3, 9) Source(2, 17) + SourceIndex(0) --2 >Emitted(3, 10) Source(2, 18) + SourceIndex(0) --3 >Emitted(3, 12) Source(2, 20) + SourceIndex(0) --4 >Emitted(3, 18) Source(2, 26) + SourceIndex(0) --5 >Emitted(3, 19) Source(2, 26) + SourceIndex(0) ----- -->>> }): { --1 >^^^^^ --2 > ^^^^^^^^^^^^^^-> --1 >} --1 >Emitted(4, 6) Source(2, 27) + SourceIndex(0) ----- -->>> b: number; -->>> }; -->>> static make(): Foo; --1->^^^^ --2 > ^^^^^^ --3 > ^ --4 > ^^^^ --1->) { -- > return {b: x.a}; -- > } -- > --2 > static --3 > --4 > make --1->Emitted(7, 5) Source(5, 5) + SourceIndex(0) --2 >Emitted(7, 11) Source(5, 11) + SourceIndex(0) --3 >Emitted(7, 12) Source(5, 12) + SourceIndex(0) --4 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) ----- -->>>} --1 >^ --2 > ^^^^^^^^^^^^^^^^^^^^^-> --1 >() { -- > return new Foo(); -- > } -- >} --1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) ----- --------------------------------------------------------------------- --emittedFile:bundle.d.ts -+emittedFile:index.d.ts - sourceFile:index.ts - ------------------------------------------------------------------- - >>>declare const c: Foo; --1-> -+1 > - 2 >^^^^^^^^ - 3 > ^^^^^^ - 4 > ^ - 5 > ^^^^^ - 6 > ^ --1-> -+1 > - 2 > - 3 > const - 4 > c - 5 > = new Foo() - 6 > ; --1->Emitted(9, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(9, 9) Source(1, 1) + SourceIndex(1) --3 >Emitted(9, 15) Source(1, 7) + SourceIndex(1) --4 >Emitted(9, 16) Source(1, 8) + SourceIndex(1) --5 >Emitted(9, 21) Source(1, 20) + SourceIndex(1) --6 >Emitted(9, 22) Source(1, 21) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) -+3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) -+4 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) -+5 >Emitted(1, 21) Source(1, 20) + SourceIndex(0) -+6 >Emitted(1, 22) Source(1, 21) + SourceIndex(0) - --- - >>>declare let x: { - 1 > -@@= skipped -141, +59 lines =@@ - 2 > - 3 > let - 4 > x --1 >Emitted(10, 1) Source(4, 1) + SourceIndex(1) --2 >Emitted(10, 9) Source(4, 1) + SourceIndex(1) --3 >Emitted(10, 13) Source(4, 5) + SourceIndex(1) --4 >Emitted(10, 14) Source(4, 6) + SourceIndex(1) -+1 >Emitted(2, 1) Source(4, 1) + SourceIndex(0) -+2 >Emitted(2, 9) Source(4, 1) + SourceIndex(0) -+3 >Emitted(2, 13) Source(4, 5) + SourceIndex(0) -+4 >Emitted(2, 14) Source(4, 6) + SourceIndex(0) - --- - >>> b: number; - >>>}; - 1->^ - 2 > ^ --3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1-> = c.doThing({a: 12}) - 2 > ; --1->Emitted(12, 2) Source(4, 27) + SourceIndex(1) --2 >Emitted(12, 3) Source(4, 28) + SourceIndex(1) -+1->Emitted(4, 2) Source(4, 27) + SourceIndex(0) -+2 >Emitted(4, 3) Source(4, 28) + SourceIndex(0) - --- -->>>//# sourceMappingURL=bundle.d.ts.map -+>>>//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt new file mode 100644 index 0000000000..ba3e9d6c33 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt @@ -0,0 +1,23 @@ +error TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'. + + +!!! error TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'. +==== declarationMapsWithoutDeclaration.ts (0 errors) ==== + module m2 { + export interface connectModule { + (res, req, next): void; + } + export interface connectExport { + use: (mod: connectModule) => connectExport; + listen: (port: number) => void; + } + + } + + var m2: { + (): m2.connectExport; + test1: m2.connectModule; + test2(): m2.connectModule; + }; + + export = m2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt.diff deleted file mode 100644 index ce4264b9de..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.declarationMapsWithoutDeclaration.errors.txt -+++ new.declarationMapsWithoutDeclaration.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'. -- -- --!!! error TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'. --==== declarationMapsWithoutDeclaration.ts (0 errors) ==== -- module m2 { -- export interface connectModule { -- (res, req, next): void; -- } -- export interface connectExport { -- use: (mod: connectModule) => connectExport; -- listen: (port: number) => void; -- } -- -- } -- -- var m2: { -- (): m2.connectExport; -- test1: m2.connectModule; -- test2(): m2.connectModule; -- }; -- -- export = m2; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions1.js b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions1.js new file mode 100644 index 0000000000..353733f4b8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions1.js @@ -0,0 +1,8 @@ +//// [tests/cases/compiler/deprecatedCompilerOptions1.ts] //// + +//// [a.ts] +const a = 1; + + +//// [a.js] +const a = 1; diff --git a/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions3.js b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions3.js new file mode 100644 index 0000000000..702c0f3a0c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions3.js @@ -0,0 +1,8 @@ +//// [tests/cases/compiler/deprecatedCompilerOptions3.ts] //// + +//// [a.ts] +const a = 1; + + +//// [a.js] +const a = 1; diff --git a/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions4.js b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions4.js new file mode 100644 index 0000000000..3497aaae05 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions4.js @@ -0,0 +1,8 @@ +//// [tests/cases/compiler/deprecatedCompilerOptions4.ts] //// + +//// [a.ts] +const a = 1; + + +//// [a.js] +const a = 1; diff --git a/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions5.js b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions5.js new file mode 100644 index 0000000000..d7a4348820 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions5.js @@ -0,0 +1,8 @@ +//// [tests/cases/compiler/deprecatedCompilerOptions5.ts] //// + +//// [a.ts] +const a = 1; + + +//// [a.js] +const a = 1; diff --git a/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=commonjs).errors.txt b/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=commonjs).errors.txt new file mode 100644 index 0000000000..bdf82a87b7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=commonjs).errors.txt @@ -0,0 +1,31 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== index.js (0 errors) ==== + import { Foo } from "./other.js"; + import * as other from "./other.js"; + import defaultFoo from "./other.js"; + + const x = new Foo(); + const y = other.Foo(); + const z = new defaultFoo(); + +==== other.d.ts (0 errors) ==== + export interface Foo { + bar: number; + } + + export default interface Bar { + foo: number; + } + +==== other.js (0 errors) ==== + export class Foo { + bar = 2.4; + } + + export default class Bar { + foo = 1.2; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=es2022).errors.txt b/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=es2022).errors.txt new file mode 100644 index 0000000000..bdf82a87b7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=es2022).errors.txt @@ -0,0 +1,31 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== index.js (0 errors) ==== + import { Foo } from "./other.js"; + import * as other from "./other.js"; + import defaultFoo from "./other.js"; + + const x = new Foo(); + const y = other.Foo(); + const z = new defaultFoo(); + +==== other.d.ts (0 errors) ==== + export interface Foo { + bar: number; + } + + export default interface Bar { + foo: number; + } + +==== other.js (0 errors) ==== + export class Foo { + bar = 2.4; + } + + export default class Bar { + foo = 1.2; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node16).errors.txt b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node16).errors.txt new file mode 100644 index 0000000000..67291b1f97 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node16).errors.txt @@ -0,0 +1,12 @@ +error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'. + + +!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'. +==== a.ts (0 errors) ==== + declare var dec: any, __decorate: any; + @dec export class A { + } + + const o = { a: 1 }; + const y = { ...o }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node16).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node16).errors.txt.diff deleted file mode 100644 index dd52e78275..0000000000 --- a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node16).errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.emitHelpersWithLocalCollisions(module=node16).errors.txt -+++ new.emitHelpersWithLocalCollisions(module=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'. -- -- --!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'. --==== a.ts (0 errors) ==== -- declare var dec: any, __decorate: any; -- @dec export class A { -- } -- -- const o = { a: 1 }; -- const y = { ...o }; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node18).errors.txt b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node18).errors.txt new file mode 100644 index 0000000000..7dfd532d52 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node18).errors.txt @@ -0,0 +1,12 @@ +error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. + + +!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. +==== a.ts (0 errors) ==== + declare var dec: any, __decorate: any; + @dec export class A { + } + + const o = { a: 1 }; + const y = { ...o }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node18).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node18).errors.txt.diff deleted file mode 100644 index 192e91c48e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=node18).errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.emitHelpersWithLocalCollisions(module=node18).errors.txt -+++ new.emitHelpersWithLocalCollisions(module=node18).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. -- -- --!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. --==== a.ts (0 errors) ==== -- declare var dec: any, __decorate: any; -- @dec export class A { -- } -- -- const o = { a: 1 }; -- const y = { ...o }; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=nodenext).errors.txt b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=nodenext).errors.txt new file mode 100644 index 0000000000..4b7e63ced9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=nodenext).errors.txt @@ -0,0 +1,12 @@ +error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. + + +!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. +==== a.ts (0 errors) ==== + declare var dec: any, __decorate: any; + @dec export class A { + } + + const o = { a: 1 }; + const y = { ...o }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=nodenext).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=nodenext).errors.txt.diff deleted file mode 100644 index 48108943be..0000000000 --- a/testdata/baselines/reference/submodule/compiler/emitHelpersWithLocalCollisions(module=nodenext).errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.emitHelpersWithLocalCollisions(module=nodenext).errors.txt -+++ new.emitHelpersWithLocalCollisions(module=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. -- -- --!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. --==== a.ts (0 errors) ==== -- declare var dec: any, __decorate: any; -- @dec export class A { -- } -- -- const o = { a: 1 }; -- const y = { ...o }; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.errors.txt b/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.errors.txt deleted file mode 100644 index 14a045d137..0000000000 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -excessPropertyErrorsSuppressed.ts(1,38): error TS2353: Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'. - - -==== excessPropertyErrorsSuppressed.ts (1 errors) ==== - var x: { a: string } = { a: "hello", b: 42 }; // No error - ~ -!!! error TS2353: Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.errors.txt.diff deleted file mode 100644 index e89d509039..0000000000 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.excessPropertyErrorsSuppressed.errors.txt -+++ new.excessPropertyErrorsSuppressed.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'suppressExcessPropertyErrors' has been removed. Please remove it from your configuration. - excessPropertyErrorsSuppressed.ts(1,38): error TS2353: Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'. - - --!!! error TS5102: Option 'suppressExcessPropertyErrors' has been removed. Please remove it from your configuration. - ==== excessPropertyErrorsSuppressed.ts (1 errors) ==== - var x: { a: string } = { a: "hello", b: 42 }; // No error - ~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.js b/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.js deleted file mode 100644 index f32fcad2c0..0000000000 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.js +++ /dev/null @@ -1,8 +0,0 @@ -//// [tests/cases/compiler/excessPropertyErrorsSuppressed.ts] //// - -//// [excessPropertyErrorsSuppressed.ts] -var x: { a: string } = { a: "hello", b: 42 }; // No error - - -//// [excessPropertyErrorsSuppressed.js] -var x = { a: "hello", b: 42 }; // No error diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.symbols b/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.symbols deleted file mode 100644 index 97ed648a32..0000000000 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.symbols +++ /dev/null @@ -1,9 +0,0 @@ -//// [tests/cases/compiler/excessPropertyErrorsSuppressed.ts] //// - -=== excessPropertyErrorsSuppressed.ts === -var x: { a: string } = { a: "hello", b: 42 }; // No error ->x : Symbol(x, Decl(excessPropertyErrorsSuppressed.ts, 0, 3)) ->a : Symbol(a, Decl(excessPropertyErrorsSuppressed.ts, 0, 8)) ->a : Symbol(a, Decl(excessPropertyErrorsSuppressed.ts, 0, 24)) ->b : Symbol(b, Decl(excessPropertyErrorsSuppressed.ts, 0, 36)) - diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.types b/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.types deleted file mode 100644 index fe330e00e7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorsSuppressed.types +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/compiler/excessPropertyErrorsSuppressed.ts] //// - -=== excessPropertyErrorsSuppressed.ts === -var x: { a: string } = { a: "hello", b: 42 }; // No error ->x : { a: string; } ->a : string ->{ a: "hello", b: 42 } : { a: string; b: number; } ->a : string ->"hello" : "hello" ->b : number ->42 : 42 - diff --git a/testdata/baselines/reference/submodule/compiler/filesEmittingIntoSameOutput.errors.txt b/testdata/baselines/reference/submodule/compiler/filesEmittingIntoSameOutput.errors.txt new file mode 100644 index 0000000000..c1f0cd4e5a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/filesEmittingIntoSameOutput.errors.txt @@ -0,0 +1,12 @@ +error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. + + +!!! error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. +==== a.ts (0 errors) ==== + class c { + } + +==== a.tsx (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/filesEmittingIntoSameOutput.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/filesEmittingIntoSameOutput.errors.txt.diff deleted file mode 100644 index cbaa2ce260..0000000000 --- a/testdata/baselines/reference/submodule/compiler/filesEmittingIntoSameOutput.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.filesEmittingIntoSameOutput.errors.txt -+++ new.filesEmittingIntoSameOutput.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. -- -- --!!! error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. --==== a.ts (0 errors) ==== -- class c { -- } -- --==== a.tsx (0 errors) ==== -- function foo() { -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incrementalOut.errors.txt b/testdata/baselines/reference/submodule/compiler/incrementalOut.errors.txt new file mode 100644 index 0000000000..387178c402 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/incrementalOut.errors.txt @@ -0,0 +1,8 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== incrementalOut.ts (0 errors) ==== + const x = 10; + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.errors.txt b/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.errors.txt new file mode 100644 index 0000000000..6578302a29 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.errors.txt @@ -0,0 +1,14 @@ +error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. +error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. +!!! error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== inlineSourceMap2.ts (0 errors) ==== + // configuration errors + + var x = 0; + console.log(x); + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.errors.txt.diff deleted file mode 100644 index 770532aff3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.inlineSourceMap2.errors.txt -+++ new.inlineSourceMap2.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. --error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. -- -- --!!! error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. --!!! error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. --==== inlineSourceMap2.ts (0 errors) ==== -- // configuration errors -- -- var x = 0; -- console.log(x); -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.sourcemap.txt deleted file mode 100644 index cbeae1817d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.sourcemap.txt +++ /dev/null @@ -1,70 +0,0 @@ -=================================================================== -JsFile: inlineSourceMap2.js -mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwMi5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== -sourceRoot: file:///folder/ -sources: inlineSourceMap2.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:inlineSourceMap2.js -sourceFile:inlineSourceMap2.ts -------------------------------------------------------------------- ->>>// configuration errors -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 >// configuration errors -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 24) Source(1, 24) + SourceIndex(0) ---- ->>>var x = 0; -1 > -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^^^^^^-> -1 > - > - > -2 >var -3 > x -4 > = -5 > 0 -6 > ; -1 >Emitted(2, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(3, 5) + SourceIndex(0) -3 >Emitted(2, 6) Source(3, 6) + SourceIndex(0) -4 >Emitted(2, 9) Source(3, 9) + SourceIndex(0) -5 >Emitted(2, 10) Source(3, 10) + SourceIndex(0) -6 >Emitted(2, 11) Source(3, 11) + SourceIndex(0) ---- ->>>console.log(x); -1-> -2 >^^^^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1-> - > -2 >console -3 > . -4 > log -5 > ( -6 > x -7 > ) -8 > ; -1->Emitted(3, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(3, 8) Source(4, 8) + SourceIndex(0) -3 >Emitted(3, 9) Source(4, 9) + SourceIndex(0) -4 >Emitted(3, 12) Source(4, 12) + SourceIndex(0) -5 >Emitted(3, 13) Source(4, 13) + SourceIndex(0) -6 >Emitted(3, 14) Source(4, 14) + SourceIndex(0) -7 >Emitted(3, 15) Source(4, 15) + SourceIndex(0) -8 >Emitted(3, 16) Source(4, 16) + SourceIndex(0) ---- ->>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwMi5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.sourcemap.txt.diff deleted file mode 100644 index ef6dfd04a7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSourceMap2.sourcemap.txt.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.inlineSourceMap2.sourcemap.txt -+++ new.inlineSourceMap2.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: outfile.js --mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0ZmlsZS5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== -+JsFile: inlineSourceMap2.js -+mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwMi5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== - sourceRoot: file:///folder/ - sources: inlineSourceMap2.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:outfile.js -+emittedFile:inlineSourceMap2.js - sourceFile:inlineSourceMap2.ts - ------------------------------------------------------------------- - >>>// configuration errors -@@= skipped -47, +47 lines =@@ - 6 > ^ - 7 > ^ - 8 > ^ --9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1-> - > - 2 >console -@@= skipped -19, +19 lines =@@ - 7 >Emitted(3, 15) Source(4, 15) + SourceIndex(0) - 8 >Emitted(3, 16) Source(4, 16) + SourceIndex(0) - --- -->>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0ZmlsZS5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== -+>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwMi5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSources.errors.txt b/testdata/baselines/reference/submodule/compiler/inlineSources.errors.txt new file mode 100644 index 0000000000..aa0cba9278 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inlineSources.errors.txt @@ -0,0 +1,12 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + var a = 0; + console.log(a); + +==== b.ts (0 errors) ==== + var b = 0; + console.log(b); + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSources.js.map b/testdata/baselines/reference/submodule/compiler/inlineSources.js.map deleted file mode 100644 index ef36fd259b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSources.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC","sourcesContent":["var a = 0;\nconsole.log(a);\n"]} -//// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC","sourcesContent":["var b = 0;\nconsole.log(b);\n"]} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSources.js.map.diff b/testdata/baselines/reference/submodule/compiler/inlineSources.js.map.diff deleted file mode 100644 index d614532872..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSources.js.map.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.inlineSources.js.map -+++ new.inlineSources.js.map -@@= skipped -0, +0 lines =@@ --//// [out.js.map] --{"version":3,"file":"out.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACDf,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC","sourcesContent":["var a = 0;\nconsole.log(a);\n","var b = 0;\nconsole.log(b);\n"]} --//// https://sokra.github.io/source-map-visualization#base64,dmFyIGEgPSAwOw0KY29uc29sZS5sb2coYSk7DQp2YXIgYiA9IDA7DQpjb25zb2xlLmxvZyhiKTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPW91dC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyIsImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQ0RmLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYSA9IDA7XG5jb25zb2xlLmxvZyhhKTtcbiIsInZhciBiID0gMDtcbmNvbnNvbGUubG9nKGIpO1xuIl19,dmFyIGEgPSAwOwpjb25zb2xlLmxvZyhhKTsK,dmFyIGIgPSAwOwpjb25zb2xlLmxvZyhiKTsK -+//// [a.js.map] -+{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC","sourcesContent":["var a = 0;\nconsole.log(a);\n"]} -+//// [b.js.map] -+{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC","sourcesContent":["var b = 0;\nconsole.log(b);\n"]} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSources.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/inlineSources.sourcemap.txt deleted file mode 100644 index bfeeecbeb7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSources.sourcemap.txt +++ /dev/null @@ -1,121 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: a.js.map -sourceRoot: -sources: a.ts -sourcesContent: ["var a = 0;\nconsole.log(a);\n"] -=================================================================== -------------------------------------------------------------------- -emittedFile:a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>var a = 0; -1 > -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^^^^^^-> -1 > -2 >var -3 > a -4 > = -5 > 0 -6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) ---- ->>>console.log(a); -1-> -2 >^^^^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^ -8 > ^ -9 > ^^^^^^^^^^^^^-> -1-> - > -2 >console -3 > . -4 > log -5 > ( -6 > a -7 > ) -8 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js -mapUrl: b.js.map -sourceRoot: -sources: b.ts -sourcesContent: ["var b = 0;\nconsole.log(b);\n"] -=================================================================== -------------------------------------------------------------------- -emittedFile:b.js -sourceFile:b.ts -------------------------------------------------------------------- ->>>var b = 0; -1 > -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^^^^^^-> -1 > -2 >var -3 > b -4 > = -5 > 0 -6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) ---- ->>>console.log(b); -1-> -2 >^^^^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^ -8 > ^ -9 > ^^^^^^^^^^^^^-> -1-> - > -2 >console -3 > . -4 > log -5 > ( -6 > b -7 > ) -8 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) ---- ->>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSources.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/inlineSources.sourcemap.txt.diff deleted file mode 100644 index 52cada7aba..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSources.sourcemap.txt.diff +++ /dev/null @@ -1,96 +0,0 @@ ---- old.inlineSources.sourcemap.txt -+++ new.inlineSources.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: out.js --mapUrl: out.js.map -+JsFile: a.js -+mapUrl: a.js.map - sourceRoot: --sources: a.ts,b.ts --sourcesContent: ["var a = 0;\nconsole.log(a);\n","var b = 0;\nconsole.log(b);\n"] -+sources: a.ts -+sourcesContent: ["var a = 0;\nconsole.log(a);\n"] - =================================================================== - ------------------------------------------------------------------- --emittedFile:out.js -+emittedFile:a.js - sourceFile:a.ts - ------------------------------------------------------------------- - >>>var a = 0; -@@= skipped -38, +38 lines =@@ - 6 > ^ - 7 > ^ - 8 > ^ -+9 > ^^^^^^^^^^^^^-> - 1-> - > - 2 >console -@@= skipped -18, +19 lines =@@ - 7 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) - 8 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=a.js.map=================================================================== -+JsFile: b.js -+mapUrl: b.js.map -+sourceRoot: -+sources: b.ts -+sourcesContent: ["var b = 0;\nconsole.log(b);\n"] -+=================================================================== - ------------------------------------------------------------------- --emittedFile:out.js -+emittedFile:b.js - sourceFile:b.ts - ------------------------------------------------------------------- - >>>var b = 0; -@@= skipped -18, +25 lines =@@ - 4 > = - 5 > 0 - 6 > ; --1 >Emitted(3, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(3, 5) Source(1, 5) + SourceIndex(1) --3 >Emitted(3, 6) Source(1, 6) + SourceIndex(1) --4 >Emitted(3, 9) Source(1, 9) + SourceIndex(1) --5 >Emitted(3, 10) Source(1, 10) + SourceIndex(1) --6 >Emitted(3, 11) Source(1, 11) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -+3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -+4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -+5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -+6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) - --- - >>>console.log(b); - 1-> -@@= skipped -16, +16 lines =@@ - 6 > ^ - 7 > ^ - 8 > ^ --9 > ^^^^^^^^^^^^^^^-> -+9 > ^^^^^^^^^^^^^-> - 1-> - > - 2 >console -@@= skipped -10, +10 lines =@@ - 6 > b - 7 > ) - 8 > ; --1->Emitted(4, 1) Source(2, 1) + SourceIndex(1) --2 >Emitted(4, 8) Source(2, 8) + SourceIndex(1) --3 >Emitted(4, 9) Source(2, 9) + SourceIndex(1) --4 >Emitted(4, 12) Source(2, 12) + SourceIndex(1) --5 >Emitted(4, 13) Source(2, 13) + SourceIndex(1) --6 >Emitted(4, 14) Source(2, 14) + SourceIndex(1) --7 >Emitted(4, 15) Source(2, 15) + SourceIndex(1) --8 >Emitted(4, 16) Source(2, 16) + SourceIndex(1) -+1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -+2 >Emitted(2, 8) Source(2, 8) + SourceIndex(0) -+3 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) -+4 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -+5 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -+6 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -+7 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) -+8 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) - --- -->>>//# sourceMappingURL=out.js.map -+>>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSources2.errors.txt b/testdata/baselines/reference/submodule/compiler/inlineSources2.errors.txt new file mode 100644 index 0000000000..aa0cba9278 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inlineSources2.errors.txt @@ -0,0 +1,12 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + var a = 0; + console.log(a); + +==== b.ts (0 errors) ==== + var b = 0; + console.log(b); + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSources2.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/inlineSources2.sourcemap.txt deleted file mode 100644 index b76d61dbcf..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSources2.sourcemap.txt +++ /dev/null @@ -1,121 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBhID0gMDtcbmNvbnNvbGUubG9nKGEpO1xuIl19 -sourceRoot: -sources: a.ts -sourcesContent: ["var a = 0;\nconsole.log(a);\n"] -=================================================================== -------------------------------------------------------------------- -emittedFile:a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>var a = 0; -1 > -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^^^^^^-> -1 > -2 >var -3 > a -4 > = -5 > 0 -6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) ---- ->>>console.log(a); -1-> -2 >^^^^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1-> - > -2 >console -3 > . -4 > log -5 > ( -6 > a -7 > ) -8 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) ---- ->>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBhID0gMDtcbmNvbnNvbGUubG9nKGEpO1xuIl19=================================================================== -JsFile: b.js -mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBiID0gMDtcbmNvbnNvbGUubG9nKGIpO1xuIl19 -sourceRoot: -sources: b.ts -sourcesContent: ["var b = 0;\nconsole.log(b);\n"] -=================================================================== -------------------------------------------------------------------- -emittedFile:b.js -sourceFile:b.ts -------------------------------------------------------------------- ->>>var b = 0; -1 > -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^^^^^^-> -1 > -2 >var -3 > b -4 > = -5 > 0 -6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) ---- ->>>console.log(b); -1-> -2 >^^^^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1-> - > -2 >console -3 > . -4 > log -5 > ( -6 > b -7 > ) -8 > ; -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(2, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) ---- ->>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBiID0gMDtcbmNvbnNvbGUubG9nKGIpO1xuIl19 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlineSources2.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/inlineSources2.sourcemap.txt.diff deleted file mode 100644 index c3250f23e2..0000000000 --- a/testdata/baselines/reference/submodule/compiler/inlineSources2.sourcemap.txt.diff +++ /dev/null @@ -1,96 +0,0 @@ ---- old.inlineSources2.sourcemap.txt -+++ new.inlineSources2.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: out.js --mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyIsImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQ0RmLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYSA9IDA7XG5jb25zb2xlLmxvZyhhKTtcbiIsInZhciBiID0gMDtcbmNvbnNvbGUubG9nKGIpO1xuIl19 -+JsFile: a.js -+mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBhID0gMDtcbmNvbnNvbGUubG9nKGEpO1xuIl19 - sourceRoot: --sources: a.ts,b.ts --sourcesContent: ["var a = 0;\nconsole.log(a);\n","var b = 0;\nconsole.log(b);\n"] -+sources: a.ts -+sourcesContent: ["var a = 0;\nconsole.log(a);\n"] - =================================================================== - ------------------------------------------------------------------- --emittedFile:out.js -+emittedFile:a.js - sourceFile:a.ts - ------------------------------------------------------------------- - >>>var a = 0; -@@= skipped -38, +38 lines =@@ - 6 > ^ - 7 > ^ - 8 > ^ -+9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1-> - > - 2 >console -@@= skipped -18, +19 lines =@@ - 7 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) - 8 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBhID0gMDtcbmNvbnNvbGUubG9nKGEpO1xuIl19=================================================================== -+JsFile: b.js -+mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBiID0gMDtcbmNvbnNvbGUubG9nKGIpO1xuIl19 -+sourceRoot: -+sources: b.ts -+sourcesContent: ["var b = 0;\nconsole.log(b);\n"] -+=================================================================== - ------------------------------------------------------------------- --emittedFile:out.js -+emittedFile:b.js - sourceFile:b.ts - ------------------------------------------------------------------- - >>>var b = 0; -@@= skipped -18, +25 lines =@@ - 4 > = - 5 > 0 - 6 > ; --1 >Emitted(3, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(3, 5) Source(1, 5) + SourceIndex(1) --3 >Emitted(3, 6) Source(1, 6) + SourceIndex(1) --4 >Emitted(3, 9) Source(1, 9) + SourceIndex(1) --5 >Emitted(3, 10) Source(1, 10) + SourceIndex(1) --6 >Emitted(3, 11) Source(1, 11) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -+3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -+4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -+5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -+6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) - --- - >>>console.log(b); - 1-> -@@= skipped -16, +16 lines =@@ - 6 > ^ - 7 > ^ - 8 > ^ --9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1-> - > - 2 >console -@@= skipped -10, +10 lines =@@ - 6 > b - 7 > ) - 8 > ; --1->Emitted(4, 1) Source(2, 1) + SourceIndex(1) --2 >Emitted(4, 8) Source(2, 8) + SourceIndex(1) --3 >Emitted(4, 9) Source(2, 9) + SourceIndex(1) --4 >Emitted(4, 12) Source(2, 12) + SourceIndex(1) --5 >Emitted(4, 13) Source(2, 13) + SourceIndex(1) --6 >Emitted(4, 14) Source(2, 14) + SourceIndex(1) --7 >Emitted(4, 15) Source(2, 15) + SourceIndex(1) --8 >Emitted(4, 16) Source(2, 16) + SourceIndex(1) -+1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -+2 >Emitted(2, 8) Source(2, 8) + SourceIndex(0) -+3 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) -+4 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -+5 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -+6 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -+7 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) -+8 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) - --- -->>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyIsImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQ0RmLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYSA9IDA7XG5jb25zb2xlLmxvZyhhKTtcbiIsInZhciBiID0gMDtcbmNvbnNvbGUubG9nKGIpO1xuIl19 -+>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBiID0gMDtcbmNvbnNvbGUubG9nKGIpO1xuIl19 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAllowJs.errors.txt b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAllowJs.errors.txt new file mode 100644 index 0000000000..079434a32a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAllowJs.errors.txt @@ -0,0 +1,12 @@ +error TS5053: Option 'allowJs' cannot be specified with option 'isolatedDeclarations'. +error TS5055: Cannot write file 'file2.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5053: Option 'allowJs' cannot be specified with option 'isolatedDeclarations'. +!!! error TS5055: Cannot write file 'file2.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. +==== file1.ts (0 errors) ==== + export var x; +==== file2.js (0 errors) ==== + export var y; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsRequiresDeclaration.errors.txt b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsRequiresDeclaration.errors.txt new file mode 100644 index 0000000000..2142bd5a83 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsRequiresDeclaration.errors.txt @@ -0,0 +1,8 @@ +error TS5069: Option 'isolatedDeclarations' cannot be specified without specifying option 'declaration' or option 'composite'. + + +!!! error TS5069: Option 'isolatedDeclarations' cannot be specified without specifying option 'declaration' or option 'composite'. +==== file1.ts (0 errors) ==== + export var x = 1; +==== file2.ts (0 errors) ==== + export var y = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsRequiresDeclaration.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsRequiresDeclaration.errors.txt.diff deleted file mode 100644 index ecbf3f8e83..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsRequiresDeclaration.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.isolatedDeclarationsRequiresDeclaration.errors.txt -+++ new.isolatedDeclarationsRequiresDeclaration.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5069: Option 'isolatedDeclarations' cannot be specified without specifying option 'declaration' or option 'composite'. -- -- --!!! error TS5069: Option 'isolatedDeclarations' cannot be specified without specifying option 'declaration' or option 'composite'. --==== file1.ts (0 errors) ==== -- export var x = 1; --==== file2.ts (0 errors) ==== -- export var y = 1; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.errors.txt.diff deleted file mode 100644 index 0f4d705520..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.isolatedModulesOut.errors.txt -+++ new.isolatedModulesOut.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'out' has been removed. Please remove it from your configuration. -- Use 'outFile' instead. -- -- --!!! error TS5102: Option 'out' has been removed. Please remove it from your configuration. --!!! error TS5102: Use 'outFile' instead. --==== file1.ts (0 errors) ==== -- export var x; --==== file2.ts (0 errors) ==== -- var y; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.symbols b/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.symbols deleted file mode 100644 index d8ce1e67be..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.symbols +++ /dev/null @@ -1,10 +0,0 @@ -//// [tests/cases/compiler/isolatedModulesOut.ts] //// - -=== file1.ts === -export var x; ->x : Symbol(x, Decl(file1.ts, 0, 10)) - -=== file2.ts === -var y; ->y : Symbol(y, Decl(file2.ts, 0, 3)) - diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.types b/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.types deleted file mode 100644 index 3bacdbc0f8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesOut.types +++ /dev/null @@ -1,10 +0,0 @@ -//// [tests/cases/compiler/isolatedModulesOut.ts] //// - -=== file1.ts === -export var x; ->x : any - -=== file2.ts === -var y; ->y : any - diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesRequiresPreserveConstEnum.errors.txt b/testdata/baselines/reference/submodule/compiler/isolatedModulesRequiresPreserveConstEnum.errors.txt new file mode 100644 index 0000000000..b672a4b20e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesRequiresPreserveConstEnum.errors.txt @@ -0,0 +1,8 @@ +error TS5091: Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled. + + +!!! error TS5091: Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled. +==== file1.ts (0 errors) ==== + export {}; + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesRequiresPreserveConstEnum.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesRequiresPreserveConstEnum.errors.txt.diff deleted file mode 100644 index 732a429437..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesRequiresPreserveConstEnum.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.isolatedModulesRequiresPreserveConstEnum.errors.txt -+++ new.isolatedModulesRequiresPreserveConstEnum.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5091: Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled. -- -- --!!! error TS5091: Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled. --==== file1.ts (0 errors) ==== -- export {}; -- -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportedClassWithExtends.errors.txt b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportedClassWithExtends.errors.txt new file mode 100644 index 0000000000..798a410414 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportedClassWithExtends.errors.txt @@ -0,0 +1,44 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== node_modules/lit/package.json (0 errors) ==== + { + "name": "lit", + "version": "0.0.1", + "type": "module", + "exports": { + ".": { + "types": "./development/index.d.ts" + } + } + } +==== node_modules/lit/development/index.d.ts (0 errors) ==== + export * from "lit-element/lit-element.js"; +==== node_modules/lit-element/package.json (0 errors) ==== + { + "name": "lit-element", + "version": "0.0.1", + "type": "module", + "exports": { + ".": { + "types": "./development/index.d.ts" + }, + "./lit-element.js": { + "types": "./development/lit-element.d.ts" + } + } + } +==== node_modules/lit-element/development/index.d.ts (0 errors) ==== + export * from "./lit-element.js"; +==== node_modules/lit-element/development/lit-element.d.ts (0 errors) ==== + export class LitElement {} +==== package.json (0 errors) ==== + { + "type": "module", + "private": true + } +==== index.js (0 errors) ==== + import { LitElement, LitElement as LitElement2 } from "lit"; + export class ElementB extends LitElement {} + export class ElementC extends LitElement2 {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationAbstractModifier.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationAbstractModifier.errors.txt new file mode 100644 index 0000000000..dd02778d17 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationAbstractModifier.errors.txt @@ -0,0 +1,10 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + abstract class c { + abstract x; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt new file mode 100644 index 0000000000..37eb955360 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + declare var v; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationClassMethodContainingArrowFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationClassMethodContainingArrowFunction.errors.txt new file mode 100644 index 0000000000..db630a3221 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationClassMethodContainingArrowFunction.errors.txt @@ -0,0 +1,15 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! 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. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.js (0 errors) ==== + class c { + method(a) { + let x = a => this.method(a); + } + } + \ 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 51e16b7a0c..e246e2ba5d 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt @@ -1,6 +1,12 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. a.ts(1,10): error TS2393: Duplicate function implementation. +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== b.js (0 errors) ==== function foo() { return 10; diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt index 142ed1352d..2171b2715c 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt @@ -1,6 +1,12 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. a.ts(1,10): error TS2393: Duplicate function implementation. +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== a.ts (1 errors) ==== function foo() { ~~~ diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariable.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariable.errors.txt new file mode 100644 index 0000000000..17fcb9ecac --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariable.errors.txt @@ -0,0 +1,14 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + var x = 10; + +==== b.js (0 errors) ==== + var x = "hello"; // Error is recorded here, but suppressed because the js file isn't checked + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariableErrorReported.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariableErrorReported.errors.txt index a44b8c591d..9501bfbd57 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariableErrorReported.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationDuplicateVariableErrorReported.errors.txt @@ -1,6 +1,12 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. a.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'. +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== b.js (0 errors) ==== var x = "hello"; diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitBlockedCorrectly.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitBlockedCorrectly.errors.txt new file mode 100644 index 0000000000..e311fb131b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitBlockedCorrectly.errors.txt @@ -0,0 +1,21 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. + + +!!! 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. +!!! error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. +==== a.ts (0 errors) ==== + class c { + } + +==== b.ts (0 errors) ==== + // this should be emitted + class d { + } + +==== a.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitDeclarations.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitDeclarations.errors.txt new file mode 100644 index 0000000000..e54b4b5efe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitDeclarations.errors.txt @@ -0,0 +1,16 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class c { + } + +==== b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitTrippleSlashReference.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitTrippleSlashReference.errors.txt new file mode 100644 index 0000000000..31f187a95a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationEmitTrippleSlashReference.errors.txt @@ -0,0 +1,25 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5055: Cannot write file 'c.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5055: Cannot write file 'c.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class c { + } + +==== b.js (0 errors) ==== + /// + function foo() { + } + +==== c.js (0 errors) ==== + function bar() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationEnumSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationEnumSyntax.errors.txt new file mode 100644 index 0000000000..c5ff5ff9ac --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationEnumSyntax.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + enum E { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt new file mode 100644 index 0000000000..73149c42bd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -0,0 +1,19 @@ +error TS5055: Cannot write file 'c.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'c.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.ts (0 errors) ==== + class c { + } + +==== b.ts (0 errors) ==== + /// + // b.d.ts should have c.d.ts as the reference path + function foo() { + } + +==== c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt new file mode 100644 index 0000000000..2d0b682034 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt @@ -0,0 +1,21 @@ +error TS5055: Cannot write file 'c.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'c.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class c { + } + +==== b.ts (0 errors) ==== + /// + function foo() { + } + +==== c.js (0 errors) ==== + function bar() { + } + \ 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 new file mode 100644 index 0000000000..f141ba456e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + export = b; \ 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 new file mode 100644 index 0000000000..553b43effa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + class C implements 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 new file mode 100644 index 0000000000..b172ac39e3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationImportEqualsSyntax.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + import a = b; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationInterfaceSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationInterfaceSyntax.errors.txt new file mode 100644 index 0000000000..e2fb064081 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationInterfaceSyntax.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + interface I { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetBeingRenamed.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetBeingRenamed.errors.txt new file mode 100644 index 0000000000..71d995fb16 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetBeingRenamed.errors.txt @@ -0,0 +1,15 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! 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. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.js (0 errors) ==== + function foo(a) { + for (let a = 0; a < 10; a++) { + // do something + } + } + \ 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 new file mode 100644 index 0000000000..b04087814f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetDeclarationOrder.errors.txt @@ -0,0 +1,16 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== b.js (0 errors) ==== + let a = 10; + b = 30; + +==== a.ts (0 errors) ==== + let b = 30; + a = 10; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetDeclarationOrder2.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetDeclarationOrder2.errors.txt index 7085a34f80..6fcc471480 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetDeclarationOrder2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationLetDeclarationOrder2.errors.txt @@ -1,12 +1,14 @@ -a.ts(2,1): error TS2448: Block-scoped variable 'a' used before its declaration. +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -==== a.ts (1 errors) ==== +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== let b = 30; a = 10; - ~ -!!! error TS2448: Block-scoped variable 'a' used before its declaration. -!!! related TS2728 b.js:1:5: 'a' is declared here. ==== b.js (0 errors) ==== let a = 10; b = 30; diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.errors.txt new file mode 100644 index 0000000000..06a0de832e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + module M { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt new file mode 100644 index 0000000000..e1947c63dc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -0,0 +1,19 @@ +error TS5055: Cannot write file 'c.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'c.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.ts (0 errors) ==== + class c { + } + +==== b.ts (0 errors) ==== + /// + // no error on above reference path since not emitting declarations + function foo() { + } + +==== c.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.errors.txt new file mode 100644 index 0000000000..0bc8b29be8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.errors.txt @@ -0,0 +1,22 @@ +error TS5055: Cannot write file 'c.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'c.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class c { + } + +==== b.ts (0 errors) ==== + /// + //no error on above reference since not emitting declarations + function foo() { + } + +==== c.js (0 errors) ==== + function bar() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationNonNullAssertion.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationNonNullAssertion.errors.txt new file mode 100644 index 0000000000..ac3f77f625 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationNonNullAssertion.errors.txt @@ -0,0 +1,11 @@ +error TS5055: Cannot write file '/src/a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file '/src/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. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /src/a.js (0 errors) ==== + 0! + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt new file mode 100644 index 0000000000..667303c917 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + class C { + foo?() { + } + bar? = 1; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationOptionalParameter.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationOptionalParameter.errors.txt new file mode 100644 index 0000000000..4bfa438887 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationOptionalParameter.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + function F(p?) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt new file mode 100644 index 0000000000..63a92e4e09 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -0,0 +1,11 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + class C { + public foo() { + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationPublicParameterModifier.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationPublicParameterModifier.errors.txt new file mode 100644 index 0000000000..c1570e779e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationPublicParameterModifier.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + class C { constructor(public x) { }} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationRestParameter.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationRestParameter.errors.txt new file mode 100644 index 0000000000..0a4d382583 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationRestParameter.errors.txt @@ -0,0 +1,11 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! 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. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.js (0 errors) ==== + function foo(...a) { } + \ 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 new file mode 100644 index 0000000000..a3f6c03f55 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + function F(): number { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationShortHandProperty.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationShortHandProperty.errors.txt new file mode 100644 index 0000000000..d3d29142c5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationShortHandProperty.errors.txt @@ -0,0 +1,18 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! 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. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.js (0 errors) ==== + function foo() { + var a = 10; + var b = "Hello"; + return { + a, + b + }; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationSyntaxError.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationSyntaxError.errors.txt new file mode 100644 index 0000000000..0d3b751162 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationSyntaxError.errors.txt @@ -0,0 +1,13 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + /** + * @type {number} + * @type {string} + */ + var v; + \ 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 new file mode 100644 index 0000000000..d2178618fc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAliasSyntax.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + type a = 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 616eb435af..06124a6082 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 : error +>a : b diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAssertions.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAssertions.errors.txt index b4e67ebf93..e176d8159b 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAssertions.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeAssertions.errors.txt @@ -1,7 +1,13 @@ +error TS5055: Cannot write file '/src/a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. /src/a.js(2,10): error TS17008: JSX element 'string' has no corresponding closing tag. /src/a.js(3,1): error TS1005: 'undefined; diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeOfParameter.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeOfParameter.errors.txt new file mode 100644 index 0000000000..555cd30eaa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeOfParameter.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + function F(a: number) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt new file mode 100644 index 0000000000..4711eb262c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + class C { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt new file mode 100644 index 0000000000..8c0597d88c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + function F() { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeSyntaxOfVar.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeSyntaxOfVar.errors.txt new file mode 100644 index 0000000000..2a6c537beb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! 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 (0 errors) ==== + var v: () => number; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt new file mode 100644 index 0000000000..a35842a64e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt @@ -0,0 +1,12 @@ +error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +==== a.ts (0 errors) ==== + class c { + } + +==== a.d.ts (0 errors) ==== + declare function isC(): boolean; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt.diff deleted file mode 100644 index be2f73ae02..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt -+++ new.jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --==== a.ts (0 errors) ==== -- class c { -- } -- --==== a.d.ts (0 errors) ==== -- declare function isC(): boolean; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithEnabledCompositeOption.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithEnabledCompositeOption.errors.txt new file mode 100644 index 0000000000..e54b4b5efe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithEnabledCompositeOption.errors.txt @@ -0,0 +1,16 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class c { + } + +==== b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt new file mode 100644 index 0000000000..bf21d1901a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt @@ -0,0 +1,16 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. + + +!!! 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. +!!! error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. +==== a.ts (0 errors) ==== + class c { + } + +==== a.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.errors.txt new file mode 100644 index 0000000000..52bf704e06 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.errors.txt @@ -0,0 +1,17 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'b.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.ts (0 errors) ==== + class c { + } + +==== b.js.map (0 errors) ==== + function foo() { + } + +==== b.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt new file mode 100644 index 0000000000..52bf704e06 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@ -0,0 +1,17 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'b.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.ts (0 errors) ==== + class c { + } + +==== b.js.map (0 errors) ==== + function foo() { + } + +==== b.js (0 errors) ==== + function bar() { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOut.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOut.errors.txt new file mode 100644 index 0000000000..e54b4b5efe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOut.errors.txt @@ -0,0 +1,16 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class c { + } + +==== b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt new file mode 100644 index 0000000000..d18c2df691 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt @@ -0,0 +1,11 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /a.ts (0 errors) ==== + class c { + } + +==== /b.d.ts (0 errors) ==== + declare function foo(): boolean; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt new file mode 100644 index 0000000000..863ab21fdb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@ -0,0 +1,16 @@ +error TS5055: Cannot write file '/b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file '/b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /a.ts (0 errors) ==== + class c { + } + +==== /b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithoutOut.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithoutOut.errors.txt new file mode 100644 index 0000000000..3f490f8acb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithoutOut.errors.txt @@ -0,0 +1,14 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'b.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.ts (0 errors) ==== + class c { + } + +==== b.js (0 errors) ==== + function foo() { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt new file mode 100644 index 0000000000..c324b90276 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt @@ -0,0 +1,9 @@ +error TS18035: Invalid value for 'jsxFragmentFactory'. '234' is not a valid identifier or qualified-name. + + +!!! error TS18035: Invalid value for 'jsxFragmentFactory'. '234' is not a valid identifier or qualified-name. +==== jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.tsx (0 errors) ==== + declare var h: any; + + <>; + <>1<>2.12.2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt.diff deleted file mode 100644 index b53df3c904..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt -+++ new.jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt -@@= skipped -0, +0 lines =@@ --error TS18035: Invalid value for 'jsxFragmentFactory'. '234' is not a valid identifier or qualified-name. -- -- --!!! error TS18035: Invalid value for 'jsxFragmentFactory'. '234' is not a valid identifier or qualified-name. --==== jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.tsx (0 errors) ==== -- declare var h: any; -- -- <>; -- <>1<>2.12.2; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryAndReactNamespace.errors.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryAndReactNamespace.errors.txt new file mode 100644 index 0000000000..3784948d57 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryAndReactNamespace.errors.txt @@ -0,0 +1,52 @@ +error TS5053: Option 'reactNamespace' cannot be specified with option 'jsxFactory'. + + +!!! error TS5053: Option 'reactNamespace' cannot be specified with option 'jsxFactory'. +==== Element.ts (0 errors) ==== + declare namespace JSX { + interface Element { + name: string; + isIntrinsic: boolean; + isCustomElement: boolean; + toString(renderId?: number): string; + bindDOM(renderId?: number): number; + resetComponent(): void; + instantiateComponents(renderId?: number): number; + props: any; + } + } + export namespace Element { + export function isElement(el: any): el is JSX.Element { + return el.markAsChildOfRootElement !== undefined; + } + + export function createElement(args: any[]) { + + return { + } + } + } + + export let createElement = Element.createElement; + + function toCamelCase(text: string): string { + return text[0].toLowerCase() + text.substring(1); + } + +==== test.tsx (0 errors) ==== + import { Element} from './Element'; + + let c: { + a?: { + b: string + } + }; + + class A { + view() { + return [ + , + + ]; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryAndReactNamespace.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryAndReactNamespace.errors.txt.diff deleted file mode 100644 index 41354d9870..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryAndReactNamespace.errors.txt.diff +++ /dev/null @@ -1,56 +0,0 @@ ---- old.jsxFactoryAndReactNamespace.errors.txt -+++ new.jsxFactoryAndReactNamespace.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5053: Option 'reactNamespace' cannot be specified with option 'jsxFactory'. -- -- --!!! error TS5053: Option 'reactNamespace' cannot be specified with option 'jsxFactory'. --==== Element.ts (0 errors) ==== -- declare namespace JSX { -- interface Element { -- name: string; -- isIntrinsic: boolean; -- isCustomElement: boolean; -- toString(renderId?: number): string; -- bindDOM(renderId?: number): number; -- resetComponent(): void; -- instantiateComponents(renderId?: number): number; -- props: any; -- } -- } -- export namespace Element { -- export function isElement(el: any): el is JSX.Element { -- return el.markAsChildOfRootElement !== undefined; -- } -- -- export function createElement(args: any[]) { -- -- return { -- } -- } -- } -- -- export let createElement = Element.createElement; -- -- function toCamelCase(text: string): string { -- return text[0].toLowerCase() + text.substring(1); -- } -- --==== test.tsx (0 errors) ==== -- import { Element} from './Element'; -- -- let c: { -- a?: { -- b: string -- } -- }; -- -- class A { -- view() { -- return [ -- , -- -- ]; -- } -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName.errors.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName.errors.txt index 528ac39a55..eb27397177 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName.errors.txt @@ -1,7 +1,9 @@ +error TS5067: Invalid value for 'jsxFactory'. 'Element.createElement=' is not a valid identifier or qualified-name. test.tsx(12,5): error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found. test.tsx(13,5): error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found. +!!! error TS5067: Invalid value for 'jsxFactory'. 'Element.createElement=' is not a valid identifier or qualified-name. ==== Element.ts (0 errors) ==== declare namespace JSX { interface Element { diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName.errors.txt.diff deleted file mode 100644 index 4c9a2f1ed1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.jsxFactoryNotIdentifierOrQualifiedName.errors.txt -+++ new.jsxFactoryNotIdentifierOrQualifiedName.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5067: Invalid value for 'jsxFactory'. 'Element.createElement=' is not a valid identifier or qualified-name. - test.tsx(12,5): error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found. - test.tsx(13,5): error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found. - - --!!! error TS5067: Invalid value for 'jsxFactory'. 'Element.createElement=' is not a valid identifier or qualified-name. - ==== Element.ts (0 errors) ==== - declare namespace JSX { - interface Element { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName2.errors.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName2.errors.txt index 528ac39a55..1e0a70a8de 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName2.errors.txt @@ -1,7 +1,9 @@ +error TS5067: Invalid value for 'jsxFactory'. 'id1 id2' is not a valid identifier or qualified-name. test.tsx(12,5): error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found. test.tsx(13,5): error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found. +!!! error TS5067: Invalid value for 'jsxFactory'. 'id1 id2' is not a valid identifier or qualified-name. ==== Element.ts (0 errors) ==== declare namespace JSX { interface Element { diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName2.errors.txt.diff deleted file mode 100644 index f4d94e065d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryNotIdentifierOrQualifiedName2.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.jsxFactoryNotIdentifierOrQualifiedName2.errors.txt -+++ new.jsxFactoryNotIdentifierOrQualifiedName2.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5067: Invalid value for 'jsxFactory'. 'id1 id2' is not a valid identifier or qualified-name. - test.tsx(12,5): error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found. - test.tsx(13,5): error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found. - - --!!! error TS5067: Invalid value for 'jsxFactory'. 'id1 id2' is not a valid identifier or qualified-name. - ==== Element.ts (0 errors) ==== - declare namespace JSX { - interface Element { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.errors.txt b/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.errors.txt deleted file mode 100644 index 325facf6f4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.errors.txt +++ /dev/null @@ -1,30 +0,0 @@ -keyofDoesntContainSymbols.ts(11,30): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. - - -==== keyofDoesntContainSymbols.ts (1 errors) ==== - const sym = Symbol(); - const num = 0; - const obj = { num: 0, str: 's', [num]: num as 0, [sym]: sym }; - - function set (obj: T, key: K, value: T[K]): T[K] { - return obj[key] = value; - } - - const val = set(obj, 'str', ''); - // string - const valB = set(obj, 'num', ''); - ~~ -!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. - // Expect type error - // Argument of type '""' is not assignable to parameter of type 'number'. - const valC = set(obj, sym, sym); - // Expect type error - // Argument of type 'unique symbol' is not assignable to parameter of type "str" | "num" - const valD = set(obj, num, num); - // Expect type error - // Argument of type '0' is not assignable to parameter of type "str" | "num" - type KeyofObj = keyof typeof obj; - // "str" | "num" - type Values = T[keyof T]; - - type ValuesOfObj = Values; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.errors.txt.diff deleted file mode 100644 index fa2b836da9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.keyofDoesntContainSymbols.errors.txt -+++ new.keyofDoesntContainSymbols.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'keyofStringsOnly' has been removed. Please remove it from your configuration. - keyofDoesntContainSymbols.ts(11,30): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. - - --!!! error TS5102: Option 'keyofStringsOnly' has been removed. Please remove it from your configuration. - ==== keyofDoesntContainSymbols.ts (1 errors) ==== - const sym = Symbol(); - const num = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.js b/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.js deleted file mode 100644 index f28d5dc712..0000000000 --- a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.js +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/keyofDoesntContainSymbols.ts] //// - -//// [keyofDoesntContainSymbols.ts] -const sym = Symbol(); -const num = 0; -const obj = { num: 0, str: 's', [num]: num as 0, [sym]: sym }; - -function set (obj: T, key: K, value: T[K]): T[K] { - return obj[key] = value; -} - -const val = set(obj, 'str', ''); -// string -const valB = set(obj, 'num', ''); -// Expect type error -// Argument of type '""' is not assignable to parameter of type 'number'. -const valC = set(obj, sym, sym); -// Expect type error -// Argument of type 'unique symbol' is not assignable to parameter of type "str" | "num" -const valD = set(obj, num, num); -// Expect type error -// Argument of type '0' is not assignable to parameter of type "str" | "num" -type KeyofObj = keyof typeof obj; -// "str" | "num" -type Values = T[keyof T]; - -type ValuesOfObj = Values; - -//// [keyofDoesntContainSymbols.js] -const sym = Symbol(); -const num = 0; -const obj = { num: 0, str: 's', [num]: num, [sym]: sym }; -function set(obj, key, value) { - return obj[key] = value; -} -const val = set(obj, 'str', ''); -// string -const valB = set(obj, 'num', ''); -// Expect type error -// Argument of type '""' is not assignable to parameter of type 'number'. -const valC = set(obj, sym, sym); -// Expect type error -// Argument of type 'unique symbol' is not assignable to parameter of type "str" | "num" -const valD = set(obj, num, num); diff --git a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.symbols b/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.symbols deleted file mode 100644 index 845e520c42..0000000000 --- a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.symbols +++ /dev/null @@ -1,89 +0,0 @@ -//// [tests/cases/compiler/keyofDoesntContainSymbols.ts] //// - -=== keyofDoesntContainSymbols.ts === -const sym = Symbol(); ->sym : Symbol(sym, Decl(keyofDoesntContainSymbols.ts, 0, 5)) ->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) - -const num = 0; ->num : Symbol(num, Decl(keyofDoesntContainSymbols.ts, 1, 5)) - -const obj = { num: 0, str: 's', [num]: num as 0, [sym]: sym }; ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 2, 5)) ->num : Symbol(num, Decl(keyofDoesntContainSymbols.ts, 2, 13)) ->str : Symbol(str, Decl(keyofDoesntContainSymbols.ts, 2, 21)) ->[num] : Symbol([num], Decl(keyofDoesntContainSymbols.ts, 2, 31)) ->num : Symbol(num, Decl(keyofDoesntContainSymbols.ts, 1, 5)) ->num : Symbol(num, Decl(keyofDoesntContainSymbols.ts, 1, 5)) ->[sym] : Symbol([sym], Decl(keyofDoesntContainSymbols.ts, 2, 48)) ->sym : Symbol(sym, Decl(keyofDoesntContainSymbols.ts, 0, 5)) ->sym : Symbol(sym, Decl(keyofDoesntContainSymbols.ts, 0, 5)) - -function set (obj: T, key: K, value: T[K]): T[K] { ->set : Symbol(set, Decl(keyofDoesntContainSymbols.ts, 2, 62)) ->T : Symbol(T, Decl(keyofDoesntContainSymbols.ts, 4, 14)) ->K : Symbol(K, Decl(keyofDoesntContainSymbols.ts, 4, 31)) ->T : Symbol(T, Decl(keyofDoesntContainSymbols.ts, 4, 14)) ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 4, 52)) ->T : Symbol(T, Decl(keyofDoesntContainSymbols.ts, 4, 14)) ->key : Symbol(key, Decl(keyofDoesntContainSymbols.ts, 4, 59)) ->K : Symbol(K, Decl(keyofDoesntContainSymbols.ts, 4, 31)) ->value : Symbol(value, Decl(keyofDoesntContainSymbols.ts, 4, 67)) ->T : Symbol(T, Decl(keyofDoesntContainSymbols.ts, 4, 14)) ->K : Symbol(K, Decl(keyofDoesntContainSymbols.ts, 4, 31)) ->T : Symbol(T, Decl(keyofDoesntContainSymbols.ts, 4, 14)) ->K : Symbol(K, Decl(keyofDoesntContainSymbols.ts, 4, 31)) - - return obj[key] = value; ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 4, 52)) ->key : Symbol(key, Decl(keyofDoesntContainSymbols.ts, 4, 59)) ->value : Symbol(value, Decl(keyofDoesntContainSymbols.ts, 4, 67)) -} - -const val = set(obj, 'str', ''); ->val : Symbol(val, Decl(keyofDoesntContainSymbols.ts, 8, 5)) ->set : Symbol(set, Decl(keyofDoesntContainSymbols.ts, 2, 62)) ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 2, 5)) - -// string -const valB = set(obj, 'num', ''); ->valB : Symbol(valB, Decl(keyofDoesntContainSymbols.ts, 10, 5)) ->set : Symbol(set, Decl(keyofDoesntContainSymbols.ts, 2, 62)) ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 2, 5)) - -// Expect type error -// Argument of type '""' is not assignable to parameter of type 'number'. -const valC = set(obj, sym, sym); ->valC : Symbol(valC, Decl(keyofDoesntContainSymbols.ts, 13, 5)) ->set : Symbol(set, Decl(keyofDoesntContainSymbols.ts, 2, 62)) ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 2, 5)) ->sym : Symbol(sym, Decl(keyofDoesntContainSymbols.ts, 0, 5)) ->sym : Symbol(sym, Decl(keyofDoesntContainSymbols.ts, 0, 5)) - -// Expect type error -// Argument of type 'unique symbol' is not assignable to parameter of type "str" | "num" -const valD = set(obj, num, num); ->valD : Symbol(valD, Decl(keyofDoesntContainSymbols.ts, 16, 5)) ->set : Symbol(set, Decl(keyofDoesntContainSymbols.ts, 2, 62)) ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 2, 5)) ->num : Symbol(num, Decl(keyofDoesntContainSymbols.ts, 1, 5)) ->num : Symbol(num, Decl(keyofDoesntContainSymbols.ts, 1, 5)) - -// Expect type error -// Argument of type '0' is not assignable to parameter of type "str" | "num" -type KeyofObj = keyof typeof obj; ->KeyofObj : Symbol(KeyofObj, Decl(keyofDoesntContainSymbols.ts, 16, 32)) ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 2, 5)) - -// "str" | "num" -type Values = T[keyof T]; ->Values : Symbol(Values, Decl(keyofDoesntContainSymbols.ts, 19, 33)) ->T : Symbol(T, Decl(keyofDoesntContainSymbols.ts, 21, 12)) ->T : Symbol(T, Decl(keyofDoesntContainSymbols.ts, 21, 12)) ->T : Symbol(T, Decl(keyofDoesntContainSymbols.ts, 21, 12)) - -type ValuesOfObj = Values; ->ValuesOfObj : Symbol(ValuesOfObj, Decl(keyofDoesntContainSymbols.ts, 21, 28)) ->Values : Symbol(Values, Decl(keyofDoesntContainSymbols.ts, 19, 33)) ->obj : Symbol(obj, Decl(keyofDoesntContainSymbols.ts, 2, 5)) - diff --git a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.types b/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.types deleted file mode 100644 index eff9b7cb18..0000000000 --- a/testdata/baselines/reference/submodule/compiler/keyofDoesntContainSymbols.types +++ /dev/null @@ -1,92 +0,0 @@ -//// [tests/cases/compiler/keyofDoesntContainSymbols.ts] //// - -=== keyofDoesntContainSymbols.ts === -const sym = Symbol(); ->sym : unique symbol ->Symbol() : unique symbol ->Symbol : SymbolConstructor - -const num = 0; ->num : 0 ->0 : 0 - -const obj = { num: 0, str: 's', [num]: num as 0, [sym]: sym }; ->obj : { num: number; str: string; 0: 0; [sym]: symbol; } ->{ num: 0, str: 's', [num]: num as 0, [sym]: sym } : { num: number; str: string; 0: 0; [sym]: symbol; } ->num : number ->0 : 0 ->str : string ->'s' : "s" ->[num] : 0 ->num : 0 ->num as 0 : 0 ->num : 0 ->[sym] : symbol ->sym : unique symbol ->sym : unique symbol - -function set (obj: T, key: K, value: T[K]): T[K] { ->set : (obj: T, key: K, value: T[K]) => T[K] ->obj : T ->key : K ->value : T[K] - - return obj[key] = value; ->obj[key] = value : T[K] ->obj[key] : T[K] ->obj : T ->key : K ->value : T[K] -} - -const val = set(obj, 'str', ''); ->val : string ->set(obj, 'str', '') : string ->set : (obj: T, key: K, value: T[K]) => T[K] ->obj : { num: number; str: string; 0: 0; [sym]: symbol; } ->'str' : "str" ->'' : "" - -// string -const valB = set(obj, 'num', ''); ->valB : number ->set(obj, 'num', '') : number ->set : (obj: T, key: K, value: T[K]) => T[K] ->obj : { num: number; str: string; 0: 0; [sym]: symbol; } ->'num' : "num" ->'' : "" - -// Expect type error -// Argument of type '""' is not assignable to parameter of type 'number'. -const valC = set(obj, sym, sym); ->valC : symbol ->set(obj, sym, sym) : symbol ->set : (obj: T, key: K, value: T[K]) => T[K] ->obj : { num: number; str: string; 0: 0; [sym]: symbol; } ->sym : unique symbol ->sym : unique symbol - -// Expect type error -// Argument of type 'unique symbol' is not assignable to parameter of type "str" | "num" -const valD = set(obj, num, num); ->valD : 0 ->set(obj, num, num) : 0 ->set : (obj: T, key: K, value: T[K]) => T[K] ->obj : { num: number; str: string; 0: 0; [sym]: symbol; } ->num : 0 ->num : 0 - -// Expect type error -// Argument of type '0' is not assignable to parameter of type "str" | "num" -type KeyofObj = keyof typeof obj; ->KeyofObj : "num" | "str" | 0 | unique symbol ->obj : { num: number; str: string; 0: 0; [sym]: symbol; } - -// "str" | "num" -type Values = T[keyof T]; ->Values : Values - -type ValuesOfObj = Values; ->ValuesOfObj : ValuesOfObj ->obj : { num: number; str: string; 0: 0; [sym]: symbol; } - diff --git a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.errors.txt.diff deleted file mode 100644 index 3794fc291a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.errors.txt.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.lateBoundConstraintTypeChecksCorrectly.errors.txt -+++ new.lateBoundConstraintTypeChecksCorrectly.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'keyofStringsOnly' has been removed. Please remove it from your configuration. -- -- --!!! error TS5102: Option 'keyofStringsOnly' has been removed. Please remove it from your configuration. --==== lateBoundConstraintTypeChecksCorrectly.ts (0 errors) ==== -- declare const fooProp: unique symbol; -- declare const barProp: unique symbol; -- -- type BothProps = typeof fooProp | typeof barProp; -- -- export interface Foo { -- [fooProp]: T; -- [barProp]: string; -- } -- -- function f>(x: T) { -- const abc = x[fooProp]; // expected: 'T[typeof fooProp]' -- -- /** -- * Expected: no error -- */ -- const def: T[typeof fooProp] = x[fooProp]; -- const def2: T[typeof barProp] = x[barProp]; -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.js b/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.js deleted file mode 100644 index 7d9699e9af..0000000000 --- a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.js +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/compiler/lateBoundConstraintTypeChecksCorrectly.ts] //// - -//// [lateBoundConstraintTypeChecksCorrectly.ts] -declare const fooProp: unique symbol; -declare const barProp: unique symbol; - -type BothProps = typeof fooProp | typeof barProp; - -export interface Foo { - [fooProp]: T; - [barProp]: string; -} - -function f>(x: T) { - const abc = x[fooProp]; // expected: 'T[typeof fooProp]' - - /** - * Expected: no error - */ - const def: T[typeof fooProp] = x[fooProp]; - const def2: T[typeof barProp] = x[barProp]; -} - - -//// [lateBoundConstraintTypeChecksCorrectly.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function f(x) { - const abc = x[fooProp]; // expected: 'T[typeof fooProp]' - /** - * Expected: no error - */ - const def = x[fooProp]; - const def2 = x[barProp]; -} diff --git a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.symbols b/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.symbols deleted file mode 100644 index cfbf6c695d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.symbols +++ /dev/null @@ -1,58 +0,0 @@ -//// [tests/cases/compiler/lateBoundConstraintTypeChecksCorrectly.ts] //// - -=== lateBoundConstraintTypeChecksCorrectly.ts === -declare const fooProp: unique symbol; ->fooProp : Symbol(fooProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 0, 13)) - -declare const barProp: unique symbol; ->barProp : Symbol(barProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 1, 13)) - -type BothProps = typeof fooProp | typeof barProp; ->BothProps : Symbol(BothProps, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 1, 37)) ->fooProp : Symbol(fooProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 0, 13)) ->barProp : Symbol(barProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 1, 13)) - -export interface Foo { ->Foo : Symbol(Foo, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 3, 49)) ->T : Symbol(T, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 5, 21)) - - [fooProp]: T; ->[fooProp] : Symbol([fooProp], Decl(lateBoundConstraintTypeChecksCorrectly.ts, 5, 25)) ->fooProp : Symbol(fooProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 0, 13)) ->T : Symbol(T, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 5, 21)) - - [barProp]: string; ->[barProp] : Symbol([barProp], Decl(lateBoundConstraintTypeChecksCorrectly.ts, 6, 15)) ->barProp : Symbol(barProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 1, 13)) -} - -function f>(x: T) { ->f : Symbol(f, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 8, 1)) ->T : Symbol(T, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 10, 11)) ->Foo : Symbol(Foo, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 3, 49)) ->x : Symbol(x, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 10, 34)) ->T : Symbol(T, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 10, 11)) - - const abc = x[fooProp]; // expected: 'T[typeof fooProp]' ->abc : Symbol(abc, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 11, 9)) ->x : Symbol(x, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 10, 34)) ->fooProp : Symbol(fooProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 0, 13)) - - /** - * Expected: no error - */ - const def: T[typeof fooProp] = x[fooProp]; ->def : Symbol(def, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 16, 9)) ->T : Symbol(T, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 10, 11)) ->fooProp : Symbol(fooProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 0, 13)) ->x : Symbol(x, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 10, 34)) ->fooProp : Symbol(fooProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 0, 13)) - - const def2: T[typeof barProp] = x[barProp]; ->def2 : Symbol(def2, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 17, 9)) ->T : Symbol(T, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 10, 11)) ->barProp : Symbol(barProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 1, 13)) ->x : Symbol(x, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 10, 34)) ->barProp : Symbol(barProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 1, 13)) -} - diff --git a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.symbols.diff b/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.symbols.diff deleted file mode 100644 index 237d7ba1f4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.symbols.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.lateBoundConstraintTypeChecksCorrectly.symbols -+++ new.lateBoundConstraintTypeChecksCorrectly.symbols -@@= skipped -16, +16 lines =@@ - >T : Symbol(T, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 5, 21)) - - [fooProp]: T; -->[fooProp] : Symbol(Foo[fooProp], Decl(lateBoundConstraintTypeChecksCorrectly.ts, 5, 25)) -+>[fooProp] : Symbol([fooProp], Decl(lateBoundConstraintTypeChecksCorrectly.ts, 5, 25)) - >fooProp : Symbol(fooProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 0, 13)) - >T : Symbol(T, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 5, 21)) - - [barProp]: string; -->[barProp] : Symbol(Foo[barProp], Decl(lateBoundConstraintTypeChecksCorrectly.ts, 6, 15)) -+>[barProp] : Symbol([barProp], Decl(lateBoundConstraintTypeChecksCorrectly.ts, 6, 15)) - >barProp : Symbol(barProp, Decl(lateBoundConstraintTypeChecksCorrectly.ts, 1, 13)) - } diff --git a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.types b/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.types deleted file mode 100644 index b6b59f85a7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/lateBoundConstraintTypeChecksCorrectly.types +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/compiler/lateBoundConstraintTypeChecksCorrectly.ts] //// - -=== lateBoundConstraintTypeChecksCorrectly.ts === -declare const fooProp: unique symbol; ->fooProp : unique symbol - -declare const barProp: unique symbol; ->barProp : unique symbol - -type BothProps = typeof fooProp | typeof barProp; ->BothProps : BothProps ->fooProp : unique symbol ->barProp : unique symbol - -export interface Foo { - [fooProp]: T; ->[fooProp] : T ->fooProp : unique symbol - - [barProp]: string; ->[barProp] : string ->barProp : unique symbol -} - -function f>(x: T) { ->f : >(x: T) => void ->x : T - - const abc = x[fooProp]; // expected: 'T[typeof fooProp]' ->abc : number ->x[fooProp] : number ->x : T ->fooProp : unique symbol - - /** - * Expected: no error - */ - const def: T[typeof fooProp] = x[fooProp]; ->def : T[unique symbol] ->fooProp : unique symbol ->x[fooProp] : number ->x : T ->fooProp : unique symbol - - const def2: T[typeof barProp] = x[barProp]; ->def2 : T[unique symbol] ->barProp : unique symbol ->x[barProp] : string ->x : T ->barProp : unique symbol -} - diff --git a/testdata/baselines/reference/submodule/compiler/letDeclarations-useBeforeDefinition2.errors.txt b/testdata/baselines/reference/submodule/compiler/letDeclarations-useBeforeDefinition2.errors.txt index cc9de6e37d..e44935216b 100644 --- a/testdata/baselines/reference/submodule/compiler/letDeclarations-useBeforeDefinition2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/letDeclarations-useBeforeDefinition2.errors.txt @@ -1,11 +1,9 @@ -file1.ts(1,1): error TS2448: Block-scoped variable 'l' used before its declaration. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -==== file1.ts (1 errors) ==== +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== file1.ts (0 errors) ==== l; - ~ -!!! error TS2448: Block-scoped variable 'l' used before its declaration. -!!! related TS2728 file2.ts:1:7: 'l' is declared here. ==== file2.ts (0 errors) ==== const l = 0; diff --git a/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.errors.txt.diff deleted file mode 100644 index 275c32cbca..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.mappedTypeUnionConstraintInferences.errors.txt -+++ new.mappedTypeUnionConstraintInferences.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'keyofStringsOnly' has been removed. Please remove it from your configuration. -- -- --!!! error TS5102: Option 'keyofStringsOnly' has been removed. Please remove it from your configuration. --==== mappedTypeUnionConstraintInferences.ts (0 errors) ==== -- export declare type Omit = Pick>; -- export declare type PartialProperties = Partial> & Omit; -- export function doSomething_Actual(a: T) { -- const x: { [P in keyof PartialProperties]: PartialProperties[P]; } = null as any; -- return x; -- } -- export declare function doSomething_Expected(a: T): { [P in keyof PartialProperties]: PartialProperties[P]; }; -- -- export let a = doSomething_Actual({ prop: "test" }); -- a = {} // should be fine, equivalent to below -- -- export let b = doSomething_Expected({ prop: "test" }); -- b = {} // fine -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.js b/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.js deleted file mode 100644 index e1926809ba..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.js +++ /dev/null @@ -1,54 +0,0 @@ -//// [tests/cases/compiler/mappedTypeUnionConstraintInferences.ts] //// - -//// [mappedTypeUnionConstraintInferences.ts] -export declare type Omit = Pick>; -export declare type PartialProperties = Partial> & Omit; -export function doSomething_Actual(a: T) { - const x: { [P in keyof PartialProperties]: PartialProperties[P]; } = null as any; - return x; -} -export declare function doSomething_Expected(a: T): { [P in keyof PartialProperties]: PartialProperties[P]; }; - -export let a = doSomething_Actual({ prop: "test" }); -a = {} // should be fine, equivalent to below - -export let b = doSomething_Expected({ prop: "test" }); -b = {} // fine - - -//// [mappedTypeUnionConstraintInferences.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.b = exports.a = void 0; -exports.doSomething_Actual = doSomething_Actual; -function doSomething_Actual(a) { - const x = null; - return x; -} -exports.a = doSomething_Actual({ prop: "test" }); -exports.a = {}; // should be fine, equivalent to below -exports.b = doSomething_Expected({ prop: "test" }); -exports.b = {}; // fine - - -//// [mappedTypeUnionConstraintInferences.d.ts] -export declare type Omit = Pick>; -export declare type PartialProperties = Partial> & Omit; -export declare function doSomething_Actual(a: T): { [P in keyof PartialProperties]: PartialProperties[P]; }; -export declare function doSomething_Expected(a: T): { - [P in keyof PartialProperties]: PartialProperties[P]; -}; -export declare let a: { - prop?: string; -}; -export declare let b: { - prop?: string; -}; diff --git a/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.symbols b/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.symbols deleted file mode 100644 index d38e4a47c4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.symbols +++ /dev/null @@ -1,83 +0,0 @@ -//// [tests/cases/compiler/mappedTypeUnionConstraintInferences.ts] //// - -=== mappedTypeUnionConstraintInferences.ts === -export declare type Omit = Pick>; ->Omit : Symbol(Omit, Decl(mappedTypeUnionConstraintInferences.ts, 0, 0)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 0, 25)) ->K : Symbol(K, Decl(mappedTypeUnionConstraintInferences.ts, 0, 27)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 0, 25)) ->Pick : Symbol(Pick, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 0, 25)) ->Exclude : Symbol(Exclude, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 0, 25)) ->K : Symbol(K, Decl(mappedTypeUnionConstraintInferences.ts, 0, 27)) - -export declare type PartialProperties = Partial> & Omit; ->PartialProperties : Symbol(PartialProperties, Decl(mappedTypeUnionConstraintInferences.ts, 0, 78)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 1, 38)) ->K : Symbol(K, Decl(mappedTypeUnionConstraintInferences.ts, 1, 40)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 1, 38)) ->Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) ->Pick : Symbol(Pick, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 1, 38)) ->K : Symbol(K, Decl(mappedTypeUnionConstraintInferences.ts, 1, 40)) ->Omit : Symbol(Omit, Decl(mappedTypeUnionConstraintInferences.ts, 0, 0)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 1, 38)) ->K : Symbol(K, Decl(mappedTypeUnionConstraintInferences.ts, 1, 40)) - -export function doSomething_ActualdoSomething_Actual : Symbol(doSomething_Actual, Decl(mappedTypeUnionConstraintInferences.ts, 1, 95)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 2, 35)) - - prop: string; ->prop : Symbol(prop, Decl(mappedTypeUnionConstraintInferences.ts, 2, 46)) - -}>(a: T) { ->a : Symbol(a, Decl(mappedTypeUnionConstraintInferences.ts, 4, 3)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 2, 35)) - - const x: { [P in keyof PartialProperties]: PartialProperties[P]; } = null as any; ->x : Symbol(x, Decl(mappedTypeUnionConstraintInferences.ts, 5, 9)) ->P : Symbol(P, Decl(mappedTypeUnionConstraintInferences.ts, 5, 16)) ->PartialProperties : Symbol(PartialProperties, Decl(mappedTypeUnionConstraintInferences.ts, 0, 78)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 2, 35)) ->PartialProperties : Symbol(PartialProperties, Decl(mappedTypeUnionConstraintInferences.ts, 0, 78)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 2, 35)) ->P : Symbol(P, Decl(mappedTypeUnionConstraintInferences.ts, 5, 16)) - - return x; ->x : Symbol(x, Decl(mappedTypeUnionConstraintInferences.ts, 5, 9)) -} -export declare function doSomething_ExpecteddoSomething_Expected : Symbol(doSomething_Expected, Decl(mappedTypeUnionConstraintInferences.ts, 7, 1)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 8, 45)) - - prop: string; ->prop : Symbol(prop, Decl(mappedTypeUnionConstraintInferences.ts, 8, 56)) - -}>(a: T): { [P in keyof PartialProperties]: PartialProperties[P]; }; ->a : Symbol(a, Decl(mappedTypeUnionConstraintInferences.ts, 10, 3)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 8, 45)) ->P : Symbol(P, Decl(mappedTypeUnionConstraintInferences.ts, 10, 13)) ->PartialProperties : Symbol(PartialProperties, Decl(mappedTypeUnionConstraintInferences.ts, 0, 78)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 8, 45)) ->PartialProperties : Symbol(PartialProperties, Decl(mappedTypeUnionConstraintInferences.ts, 0, 78)) ->T : Symbol(T, Decl(mappedTypeUnionConstraintInferences.ts, 8, 45)) ->P : Symbol(P, Decl(mappedTypeUnionConstraintInferences.ts, 10, 13)) - -export let a = doSomething_Actual({ prop: "test" }); ->a : Symbol(a, Decl(mappedTypeUnionConstraintInferences.ts, 12, 10)) ->doSomething_Actual : Symbol(doSomething_Actual, Decl(mappedTypeUnionConstraintInferences.ts, 1, 95)) ->prop : Symbol(prop, Decl(mappedTypeUnionConstraintInferences.ts, 12, 35)) - -a = {} // should be fine, equivalent to below ->a : Symbol(a, Decl(mappedTypeUnionConstraintInferences.ts, 12, 10)) - -export let b = doSomething_Expected({ prop: "test" }); ->b : Symbol(b, Decl(mappedTypeUnionConstraintInferences.ts, 15, 10)) ->doSomething_Expected : Symbol(doSomething_Expected, Decl(mappedTypeUnionConstraintInferences.ts, 7, 1)) ->prop : Symbol(prop, Decl(mappedTypeUnionConstraintInferences.ts, 15, 37)) - -b = {} // fine ->b : Symbol(b, Decl(mappedTypeUnionConstraintInferences.ts, 15, 10)) - diff --git a/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.types b/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.types deleted file mode 100644 index d07bcb482e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mappedTypeUnionConstraintInferences.types +++ /dev/null @@ -1,60 +0,0 @@ -//// [tests/cases/compiler/mappedTypeUnionConstraintInferences.ts] //// - -=== mappedTypeUnionConstraintInferences.ts === -export declare type Omit = Pick>; ->Omit : Omit - -export declare type PartialProperties = Partial> & Omit; ->PartialProperties : PartialProperties - -export function doSomething_ActualdoSomething_Actual : (a: T) => { [P in keyof PartialProperties]: PartialProperties[P]; } - - prop: string; ->prop : string - -}>(a: T) { ->a : T - - const x: { [P in keyof PartialProperties]: PartialProperties[P]; } = null as any; ->x : { [P in keyof PartialProperties]: PartialProperties[P]; } ->null as any : any - - return x; ->x : { [P in keyof PartialProperties]: PartialProperties[P]; } -} -export declare function doSomething_ExpecteddoSomething_Expected : (a: T) => { [P in keyof PartialProperties]: PartialProperties[P]; } - - prop: string; ->prop : string - -}>(a: T): { [P in keyof PartialProperties]: PartialProperties[P]; }; ->a : T - -export let a = doSomething_Actual({ prop: "test" }); ->a : { prop?: string; } ->doSomething_Actual({ prop: "test" }) : { prop?: string; } ->doSomething_Actual : (a: T) => { [P in keyof PartialProperties]: PartialProperties[P]; } ->{ prop: "test" } : { prop: string; } ->prop : string ->"test" : "test" - -a = {} // should be fine, equivalent to below ->a = {} : {} ->a : { prop?: string; } ->{} : {} - -export let b = doSomething_Expected({ prop: "test" }); ->b : { prop?: string; } ->doSomething_Expected({ prop: "test" }) : { prop?: string; } ->doSomething_Expected : (a: T) => { [P in keyof PartialProperties]: PartialProperties[P]; } ->{ prop: "test" } : { prop: string; } ->prop : string ->"test" : "test" - -b = {} // fine ->b = {} : {} ->b : { prop?: string; } ->{} : {} - diff --git a/testdata/baselines/reference/submodule/compiler/moduleExportNonStructured.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleExportNonStructured.errors.txt new file mode 100644 index 0000000000..958728c943 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleExportNonStructured.errors.txt @@ -0,0 +1,36 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== package.json (0 errors) ==== + { + "name": "test", + "version": "1.0.0", + "description": "", + "type": "module", + "module": "index.mjs" + } + +==== index.mts (0 errors) ==== + import * as exportAny from "./exportAny.cjs"; + import * as exportUnknown from "./exportUnknown.cjs"; + import * as exportSymbol from "./exportSymbol.cjs"; + + import type * as exportAnyType from "./exportAny.cjs"; + import type * as exportUnknownType from "./exportUnknown.cjs"; + import type * as exportSymbolType from "./exportSymbol.cjs"; + +==== exportAny.d.cts (0 errors) ==== + declare const __: any; + export = __; + + +==== exportUnknown.d.cts (0 errors) ==== + declare const __: unknown; + export = __; + + +==== exportSymbol.d.cts (0 errors) ==== + declare const __: symbol; + export = __; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleExportNonStructured.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleExportNonStructured.errors.txt.diff deleted file mode 100644 index 2e6c86ac5d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleExportNonStructured.errors.txt.diff +++ /dev/null @@ -1,40 +0,0 @@ ---- old.moduleExportNonStructured.errors.txt -+++ new.moduleExportNonStructured.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== package.json (0 errors) ==== -- { -- "name": "test", -- "version": "1.0.0", -- "description": "", -- "type": "module", -- "module": "index.mjs" -- } -- --==== index.mts (0 errors) ==== -- import * as exportAny from "./exportAny.cjs"; -- import * as exportUnknown from "./exportUnknown.cjs"; -- import * as exportSymbol from "./exportSymbol.cjs"; -- -- import type * as exportAnyType from "./exportAny.cjs"; -- import type * as exportUnknownType from "./exportUnknown.cjs"; -- import type * as exportSymbolType from "./exportSymbol.cjs"; -- --==== exportAny.d.cts (0 errors) ==== -- declare const __: any; -- export = __; -- -- --==== exportUnknown.d.cts (0 errors) ==== -- declare const __: unknown; -- export = __; -- -- --==== exportSymbol.d.cts (0 errors) ==== -- declare const __: symbol; -- export = __; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleNoneDynamicImport(target=es2015).errors.txt b/testdata/baselines/reference/submodule/compiler/moduleNoneDynamicImport(target=es2015).errors.txt index bd330c253e..8371c6cefb 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleNoneDynamicImport(target=es2015).errors.txt +++ b/testdata/baselines/reference/submodule/compiler/moduleNoneDynamicImport(target=es2015).errors.txt @@ -1,6 +1,12 @@ +error TS5055: Cannot write file '/b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. /a.ts(1,13): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'. +!!! error TS5055: Cannot write file '/b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== /a.ts (1 errors) ==== const foo = import("./b"); ~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/moduleNoneDynamicImport(target=es2020).errors.txt b/testdata/baselines/reference/submodule/compiler/moduleNoneDynamicImport(target=es2020).errors.txt index bd330c253e..8371c6cefb 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleNoneDynamicImport(target=es2020).errors.txt +++ b/testdata/baselines/reference/submodule/compiler/moduleNoneDynamicImport(target=es2020).errors.txt @@ -1,6 +1,12 @@ +error TS5055: Cannot write file '/b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. /a.ts(1,13): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'. +!!! error TS5055: Cannot write file '/b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== /a.ts (1 errors) ==== const foo = import("./b"); ~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/moduleNoneOutFile.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleNoneOutFile.errors.txt new file mode 100644 index 0000000000..97b0cf2349 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleNoneOutFile.errors.txt @@ -0,0 +1,8 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== first.ts (0 errors) ==== + class Foo {} +==== second.ts (0 errors) ==== + class Bar extends Foo {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt new file mode 100644 index 0000000000..f72c66ca0d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt @@ -0,0 +1,55 @@ +/project/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== /project/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "@shared/*": ["../shared/*"] + } + }, + //"files": ["src/app.ts"] + } +==== /project/src/app.ts (0 errors) ==== + import * as t from "anotherLib"; // Include the lib that recursively includes option as relative module resolution in this directory + import { makeSharedOption } from "@shared/lib/app"; // Includes option as module in shared folder but as module in node_modules folder + +==== /shared/node_modules/troublesome-lib/package.json (0 errors) ==== + { + "name": "troublesome-lib", + "version": "1.17.1" + } +==== /shared/node_modules/troublesome-lib/lib/Compactable.d.ts (0 errors) ==== + import { Option } from './Option'; + export class Compactable { + option: Option; + } +==== /shared/node_modules/troublesome-lib/lib/Option.d.ts (0 errors) ==== + export class Option { + someProperty: string; + } +==== /shared/lib/app.d.ts (0 errors) ==== + import { Option } from "troublesome-lib/lib/Option"; + export class SharedOption extends Option { } + export const makeSharedOption: () => SharedOption; +==== /project/node_modules/anotherLib/index.d.ts (0 errors) ==== + import { Compactable } from "troublesome-lib/lib/Compactable"; // Including this will resolve Option as relative through the imports of compactable +==== /project/node_modules/troublesome-lib/package.json (0 errors) ==== + { + "name": "troublesome-lib", + "version": "1.17.1" + } +==== /project/node_modules/troublesome-lib/lib/Compactable.d.ts (0 errors) ==== + import { Option } from './Option'; + export class Compactable { + option: Option; + } +==== /project/node_modules/troublesome-lib/lib/Option.d.ts (0 errors) ==== + export class Option { + someProperty: string; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_withPaths.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_withPaths.errors.txt new file mode 100644 index 0000000000..4d02f72683 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_withPaths.errors.txt @@ -0,0 +1,51 @@ +/tsconfig.json(6,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +/tsconfig.json(11,14): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== /tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "outDir": "lib", + "target": "ES6", + "module": "ES6", + "baseUrl": "/", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "moduleResolution": "Node", + "noImplicitAny": true, + "traceResolution": true, + "paths": { + "foo/*": ["node_modules/foo/lib/*"] + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } + +==== /relative.d.ts (0 errors) ==== + export declare function relative(): void; + + +==== /test.ts (0 errors) ==== + import { test } from "foo/test.js"; + import { test as test2 } from "foo/test"; + import { relative } from "./relative.js"; + import { relative as relative2 } from "./relative"; + + + +==== /node_modules/foo/lib/test.js (0 errors) ==== + export function test() { + console.log("test"); + } + +==== /node_modules/foo/lib/test.d.ts (0 errors) ==== + export declare function test(): void; + +==== /relative.js (0 errors) ==== + export function relative() { + console.log("test"); + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).errors.txt new file mode 100644 index 0000000000..1e3d0c11fd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).errors.txt @@ -0,0 +1,15 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": "./entrypoint.js" + } +==== node_modules/pkg/entrypoint.d.ts (0 errors) ==== + export declare function thing(): void; +==== index.ts (0 errors) ==== + import * as p from "pkg"; + p.thing(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).errors.txt.diff deleted file mode 100644 index 9e4d2f6506..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.moduleResolutionWithModule(module=commonjs,moduleresolution=node16).errors.txt -+++ new.moduleResolutionWithModule(module=commonjs,moduleresolution=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== node_modules/pkg/package.json (0 errors) ==== -- { -- "name": "pkg", -- "version": "0.0.1", -- "exports": "./entrypoint.js" -- } --==== node_modules/pkg/entrypoint.d.ts (0 errors) ==== -- export declare function thing(): void; --==== index.ts (0 errors) ==== -- import * as p from "pkg"; -- p.thing(); -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=nodenext).errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000..9a99b7f397 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=nodenext).errors.txt @@ -0,0 +1,15 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== node_modules/pkg/package.json (0 errors) ==== + { + "name": "pkg", + "version": "0.0.1", + "exports": "./entrypoint.js" + } +==== node_modules/pkg/entrypoint.d.ts (0 errors) ==== + export declare function thing(): void; +==== index.ts (0 errors) ==== + import * as p from "pkg"; + p.thing(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=nodenext).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=nodenext).errors.txt.diff deleted file mode 100644 index f4610132f1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithModule(module=commonjs,moduleresolution=nodenext).errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.moduleResolutionWithModule(module=commonjs,moduleresolution=nodenext).errors.txt -+++ new.moduleResolutionWithModule(module=commonjs,moduleresolution=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== node_modules/pkg/package.json (0 errors) ==== -- { -- "name": "pkg", -- "version": "0.0.1", -- "exports": "./entrypoint.js" -- } --==== node_modules/pkg/entrypoint.d.ts (0 errors) ==== -- export declare function thing(): void; --==== index.ts (0 errors) ==== -- import * as p from "pkg"; -- p.thing(); -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt new file mode 100644 index 0000000000..28b31d95ad --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt @@ -0,0 +1,50 @@ +/tsconfig.json(9,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +/tsconfig.json(11,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(12,23): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== + { + "compilerOptions": { + "allowJs": true, + "checkJs": false, + "outDir": "bin", + "moduleResolution": "node", + "traceResolution": true, + "moduleSuffixes": [".ios"], + "baseUrl": "/", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "some-library": ["node_modules/some-library/lib"], + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + "some-library/*": ["node_modules/some-library/lib/*"] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } + +==== /test.ts (0 errors) ==== + import { ios } from "some-library"; + import { ios as ios2 } from "some-library/index"; + import { ios as ios3 } from "some-library/index.js"; + +==== /node_modules/some-library/lib/index.ios.js (0 errors) ==== + "use strict"; + exports.__esModule = true; + function ios() {} + exports.ios = ios; +==== /node_modules/some-library/lib/index.ios.d.ts (0 errors) ==== + export declare function ios(): void; +==== /node_modules/some-library/lib/index.js (0 errors) ==== + "use strict"; + exports.__esModule = true; + function base() {} + exports.base = base; +==== /node_modules/some-library/lib/index.d.ts (0 errors) ==== + export declare function base(): void; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.errors.txt b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.errors.txt deleted file mode 100644 index 319627b731..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.errors.txt +++ /dev/null @@ -1,62 +0,0 @@ -noImplicitAnyIndexingSuppressed.ts(12,37): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'. -noImplicitAnyIndexingSuppressed.ts(19,9): error TS2339: Property 'hi' does not exist on type '{}'. -noImplicitAnyIndexingSuppressed.ts(22,9): error TS2339: Property '10' does not exist on type '{}'. -noImplicitAnyIndexingSuppressed.ts(29,10): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{}'. - - -==== noImplicitAnyIndexingSuppressed.ts (4 errors) ==== - enum MyEmusEnum { - emu - } - - // Should be okay; should be a string. - var strRepresentation1 = MyEmusEnum[0] - - // Should be okay; should be a string. - var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] - - // Should be okay, as we suppress implicit 'any' property access checks - var strRepresentation3 = MyEmusEnum["monehh"]; - ~~~~~~~~ -!!! error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'. - - // Should be okay; should be a MyEmusEnum - var strRepresentation4 = MyEmusEnum["emu"]; - - - // Should be okay, as we suppress implicit 'any' property access checks - var x = {}["hi"]; - ~~~~~~~~ -!!! error TS2339: Property 'hi' does not exist on type '{}'. - - // Should be okay, as we suppress implicit 'any' property access checks - var y = {}[10]; - ~~~~~~ -!!! error TS2339: Property '10' does not exist on type '{}'. - - var hi: any = "hi"; - - var emptyObj = {}; - - // Should be okay, as we suppress implicit 'any' property access checks - var z1 = emptyObj[hi]; - ~~~~~~~~~~~~ -!!! error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{}'. - var z2 = (emptyObj)[hi]; - - interface MyMap { - [key: string]: T; - } - - var m: MyMap = { - "0": 0, - "1": 1, - "2": 2, - "Okay that's enough for today.": NaN - }; - - var mResult1 = m[MyEmusEnum.emu]; - var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; - var mResult3 = m[hi]; - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.errors.txt.diff deleted file mode 100644 index 5caad135de..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.noImplicitAnyIndexingSuppressed.errors.txt -+++ new.noImplicitAnyIndexingSuppressed.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'suppressImplicitAnyIndexErrors' has been removed. Please remove it from your configuration. - noImplicitAnyIndexingSuppressed.ts(12,37): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'. - noImplicitAnyIndexingSuppressed.ts(19,9): error TS2339: Property 'hi' does not exist on type '{}'. - noImplicitAnyIndexingSuppressed.ts(22,9): error TS2339: Property '10' does not exist on type '{}'. - noImplicitAnyIndexingSuppressed.ts(29,10): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{}'. - - --!!! error TS5102: Option 'suppressImplicitAnyIndexErrors' has been removed. Please remove it from your configuration. - ==== noImplicitAnyIndexingSuppressed.ts (4 errors) ==== - enum MyEmusEnum { - emu \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.js b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.js deleted file mode 100644 index 007728b006..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.js +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts] //// - -//// [noImplicitAnyIndexingSuppressed.ts] -enum MyEmusEnum { - emu -} - -// Should be okay; should be a string. -var strRepresentation1 = MyEmusEnum[0] - -// Should be okay; should be a string. -var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] - -// Should be okay, as we suppress implicit 'any' property access checks -var strRepresentation3 = MyEmusEnum["monehh"]; - -// Should be okay; should be a MyEmusEnum -var strRepresentation4 = MyEmusEnum["emu"]; - - -// Should be okay, as we suppress implicit 'any' property access checks -var x = {}["hi"]; - -// Should be okay, as we suppress implicit 'any' property access checks -var y = {}[10]; - -var hi: any = "hi"; - -var emptyObj = {}; - -// Should be okay, as we suppress implicit 'any' property access checks -var z1 = emptyObj[hi]; -var z2 = (emptyObj)[hi]; - -interface MyMap { - [key: string]: T; -} - -var m: MyMap = { - "0": 0, - "1": 1, - "2": 2, - "Okay that's enough for today.": NaN -}; - -var mResult1 = m[MyEmusEnum.emu]; -var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; -var mResult3 = m[hi]; - - - -//// [noImplicitAnyIndexingSuppressed.js] -var MyEmusEnum; -(function (MyEmusEnum) { - MyEmusEnum[MyEmusEnum["emu"] = 0] = "emu"; -})(MyEmusEnum || (MyEmusEnum = {})); -// Should be okay; should be a string. -var strRepresentation1 = MyEmusEnum[0]; -// Should be okay; should be a string. -var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu]; -// Should be okay, as we suppress implicit 'any' property access checks -var strRepresentation3 = MyEmusEnum["monehh"]; -// Should be okay; should be a MyEmusEnum -var strRepresentation4 = MyEmusEnum["emu"]; -// Should be okay, as we suppress implicit 'any' property access checks -var x = {}["hi"]; -// Should be okay, as we suppress implicit 'any' property access checks -var y = {}[10]; -var hi = "hi"; -var emptyObj = {}; -// Should be okay, as we suppress implicit 'any' property access checks -var z1 = emptyObj[hi]; -var z2 = emptyObj[hi]; -var m = { - "0": 0, - "1": 1, - "2": 2, - "Okay that's enough for today.": NaN -}; -var mResult1 = m[MyEmusEnum.emu]; -var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; -var mResult3 = m[hi]; diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.symbols b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.symbols deleted file mode 100644 index 2c926738c3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.symbols +++ /dev/null @@ -1,109 +0,0 @@ -//// [tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts] //// - -=== noImplicitAnyIndexingSuppressed.ts === -enum MyEmusEnum { ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) - - emu ->emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -} - -// Should be okay; should be a string. -var strRepresentation1 = MyEmusEnum[0] ->strRepresentation1 : Symbol(strRepresentation1, Decl(noImplicitAnyIndexingSuppressed.ts, 5, 3)) ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) - -// Should be okay; should be a string. -var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] ->strRepresentation2 : Symbol(strRepresentation2, Decl(noImplicitAnyIndexingSuppressed.ts, 8, 3)) ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) ->MyEmusEnum.emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) ->emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - -// Should be okay, as we suppress implicit 'any' property access checks -var strRepresentation3 = MyEmusEnum["monehh"]; ->strRepresentation3 : Symbol(strRepresentation3, Decl(noImplicitAnyIndexingSuppressed.ts, 11, 3)) ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) - -// Should be okay; should be a MyEmusEnum -var strRepresentation4 = MyEmusEnum["emu"]; ->strRepresentation4 : Symbol(strRepresentation4, Decl(noImplicitAnyIndexingSuppressed.ts, 14, 3)) ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) ->"emu" : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - - -// Should be okay, as we suppress implicit 'any' property access checks -var x = {}["hi"]; ->x : Symbol(x, Decl(noImplicitAnyIndexingSuppressed.ts, 18, 3)) - -// Should be okay, as we suppress implicit 'any' property access checks -var y = {}[10]; ->y : Symbol(y, Decl(noImplicitAnyIndexingSuppressed.ts, 21, 3)) - -var hi: any = "hi"; ->hi : Symbol(hi, Decl(noImplicitAnyIndexingSuppressed.ts, 23, 3)) - -var emptyObj = {}; ->emptyObj : Symbol(emptyObj, Decl(noImplicitAnyIndexingSuppressed.ts, 25, 3)) - -// Should be okay, as we suppress implicit 'any' property access checks -var z1 = emptyObj[hi]; ->z1 : Symbol(z1, Decl(noImplicitAnyIndexingSuppressed.ts, 28, 3)) ->emptyObj : Symbol(emptyObj, Decl(noImplicitAnyIndexingSuppressed.ts, 25, 3)) ->hi : Symbol(hi, Decl(noImplicitAnyIndexingSuppressed.ts, 23, 3)) - -var z2 = (emptyObj)[hi]; ->z2 : Symbol(z2, Decl(noImplicitAnyIndexingSuppressed.ts, 29, 3)) ->emptyObj : Symbol(emptyObj, Decl(noImplicitAnyIndexingSuppressed.ts, 25, 3)) ->hi : Symbol(hi, Decl(noImplicitAnyIndexingSuppressed.ts, 23, 3)) - -interface MyMap { ->MyMap : Symbol(MyMap, Decl(noImplicitAnyIndexingSuppressed.ts, 29, 29)) ->T : Symbol(T, Decl(noImplicitAnyIndexingSuppressed.ts, 31, 16)) - - [key: string]: T; ->key : Symbol(key, Decl(noImplicitAnyIndexingSuppressed.ts, 32, 5)) ->T : Symbol(T, Decl(noImplicitAnyIndexingSuppressed.ts, 31, 16)) -} - -var m: MyMap = { ->m : Symbol(m, Decl(noImplicitAnyIndexingSuppressed.ts, 35, 3)) ->MyMap : Symbol(MyMap, Decl(noImplicitAnyIndexingSuppressed.ts, 29, 29)) - - "0": 0, ->"0" : Symbol("0", Decl(noImplicitAnyIndexingSuppressed.ts, 35, 24)) - - "1": 1, ->"1" : Symbol("1", Decl(noImplicitAnyIndexingSuppressed.ts, 36, 11)) - - "2": 2, ->"2" : Symbol("2", Decl(noImplicitAnyIndexingSuppressed.ts, 37, 11)) - - "Okay that's enough for today.": NaN ->"Okay that's enough for today." : Symbol("Okay that's enough for today.", Decl(noImplicitAnyIndexingSuppressed.ts, 38, 11)) ->NaN : Symbol(NaN, Decl(lib.es5.d.ts, --, --)) - -}; - -var mResult1 = m[MyEmusEnum.emu]; ->mResult1 : Symbol(mResult1, Decl(noImplicitAnyIndexingSuppressed.ts, 42, 3)) ->m : Symbol(m, Decl(noImplicitAnyIndexingSuppressed.ts, 35, 3)) ->MyEmusEnum.emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) ->emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - -var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; ->mResult2 : Symbol(mResult2, Decl(noImplicitAnyIndexingSuppressed.ts, 43, 3)) ->m : Symbol(m, Decl(noImplicitAnyIndexingSuppressed.ts, 35, 3)) ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) ->MyEmusEnum.emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) ->MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) ->emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - -var mResult3 = m[hi]; ->mResult3 : Symbol(mResult3, Decl(noImplicitAnyIndexingSuppressed.ts, 44, 3)) ->m : Symbol(m, Decl(noImplicitAnyIndexingSuppressed.ts, 35, 3)) ->hi : Symbol(hi, Decl(noImplicitAnyIndexingSuppressed.ts, 23, 3)) - - diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.symbols.diff b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.symbols.diff deleted file mode 100644 index 9af7b8943b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.symbols.diff +++ /dev/null @@ -1,54 +0,0 @@ ---- old.noImplicitAnyIndexingSuppressed.symbols -+++ new.noImplicitAnyIndexingSuppressed.symbols -@@= skipped -4, +4 lines =@@ - >MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) - - emu -->emu : Symbol(MyEmusEnum.emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -+>emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - } - - // Should be okay; should be a string. -@@= skipped -12, +12 lines =@@ - var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] - >strRepresentation2 : Symbol(strRepresentation2, Decl(noImplicitAnyIndexingSuppressed.ts, 8, 3)) - >MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) -->MyEmusEnum.emu : Symbol(MyEmusEnum.emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -+>MyEmusEnum.emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - >MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) -->emu : Symbol(MyEmusEnum.emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -+>emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - - // Should be okay, as we suppress implicit 'any' property access checks - var strRepresentation3 = MyEmusEnum["monehh"]; -@@= skipped -13, +13 lines =@@ - var strRepresentation4 = MyEmusEnum["emu"]; - >strRepresentation4 : Symbol(strRepresentation4, Decl(noImplicitAnyIndexingSuppressed.ts, 14, 3)) - >MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) -->"emu" : Symbol(MyEmusEnum.emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -+>"emu" : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - - - // Should be okay, as we suppress implicit 'any' property access checks -@@= skipped -59, +59 lines =@@ - var mResult1 = m[MyEmusEnum.emu]; - >mResult1 : Symbol(mResult1, Decl(noImplicitAnyIndexingSuppressed.ts, 42, 3)) - >m : Symbol(m, Decl(noImplicitAnyIndexingSuppressed.ts, 35, 3)) -->MyEmusEnum.emu : Symbol(MyEmusEnum.emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -+>MyEmusEnum.emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - >MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) -->emu : Symbol(MyEmusEnum.emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -+>emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - - var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; - >mResult2 : Symbol(mResult2, Decl(noImplicitAnyIndexingSuppressed.ts, 43, 3)) - >m : Symbol(m, Decl(noImplicitAnyIndexingSuppressed.ts, 35, 3)) - >MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) -->MyEmusEnum.emu : Symbol(MyEmusEnum.emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -+>MyEmusEnum.emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - >MyEmusEnum : Symbol(MyEmusEnum, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 0)) -->emu : Symbol(MyEmusEnum.emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) -+>emu : Symbol(emu, Decl(noImplicitAnyIndexingSuppressed.ts, 0, 17)) - - var mResult3 = m[hi]; - >mResult3 : Symbol(mResult3, Decl(noImplicitAnyIndexingSuppressed.ts, 44, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types deleted file mode 100644 index 34a79d24f4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types +++ /dev/null @@ -1,130 +0,0 @@ -//// [tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts] //// - -=== noImplicitAnyIndexingSuppressed.ts === -enum MyEmusEnum { ->MyEmusEnum : MyEmusEnum - - emu ->emu : MyEmusEnum.emu -} - -// Should be okay; should be a string. -var strRepresentation1 = MyEmusEnum[0] ->strRepresentation1 : string ->MyEmusEnum[0] : string ->MyEmusEnum : typeof MyEmusEnum ->0 : 0 - -// Should be okay; should be a string. -var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] ->strRepresentation2 : string ->MyEmusEnum[MyEmusEnum.emu] : string ->MyEmusEnum : typeof MyEmusEnum ->MyEmusEnum.emu : MyEmusEnum ->MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum - -// Should be okay, as we suppress implicit 'any' property access checks -var strRepresentation3 = MyEmusEnum["monehh"]; ->strRepresentation3 : any ->MyEmusEnum["monehh"] : any ->MyEmusEnum : typeof MyEmusEnum ->"monehh" : "monehh" - -// Should be okay; should be a MyEmusEnum -var strRepresentation4 = MyEmusEnum["emu"]; ->strRepresentation4 : MyEmusEnum ->MyEmusEnum["emu"] : MyEmusEnum ->MyEmusEnum : typeof MyEmusEnum ->"emu" : "emu" - - -// Should be okay, as we suppress implicit 'any' property access checks -var x = {}["hi"]; ->x : undefined ->{}["hi"] : undefined ->{} : {} ->"hi" : "hi" - -// Should be okay, as we suppress implicit 'any' property access checks -var y = {}[10]; ->y : undefined ->{}[10] : undefined ->{} : {} ->10 : 10 - -var hi: any = "hi"; ->hi : any ->"hi" : "hi" - -var emptyObj = {}; ->emptyObj : {} ->{} : {} - -// Should be okay, as we suppress implicit 'any' property access checks -var z1 = emptyObj[hi]; ->z1 : any ->emptyObj[hi] : any ->emptyObj : {} ->hi : any - -var z2 = (emptyObj)[hi]; ->z2 : any ->(emptyObj)[hi] : any ->(emptyObj) : any ->emptyObj : any ->emptyObj : {} ->hi : any - -interface MyMap { - [key: string]: T; ->key : string -} - -var m: MyMap = { ->m : MyMap ->{ "0": 0, "1": 1, "2": 2, "Okay that's enough for today.": NaN} : { "0": number; "1": number; "2": number; "Okay that's enough for today.": number; } - - "0": 0, ->"0" : number ->0 : 0 - - "1": 1, ->"1" : number ->1 : 1 - - "2": 2, ->"2" : number ->2 : 2 - - "Okay that's enough for today.": NaN ->"Okay that's enough for today." : number ->NaN : number - -}; - -var mResult1 = m[MyEmusEnum.emu]; ->mResult1 : number ->m[MyEmusEnum.emu] : number ->m : MyMap ->MyEmusEnum.emu : MyEmusEnum ->MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum - -var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; ->mResult2 : number ->m[MyEmusEnum[MyEmusEnum.emu]] : number ->m : MyMap ->MyEmusEnum[MyEmusEnum.emu] : string ->MyEmusEnum : typeof MyEmusEnum ->MyEmusEnum.emu : MyEmusEnum ->MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum - -var mResult3 = m[hi]; ->mResult3 : number ->m[hi] : number ->m : MyMap ->hi : any - - diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.errors.txt.diff deleted file mode 100644 index 60c7c2042e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.errors.txt.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.noImplicitUseStrict_commonjs.errors.txt -+++ new.noImplicitUseStrict_commonjs.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration. -- -- --!!! error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration. --==== noImplicitUseStrict_commonjs.ts (0 errors) ==== -- export var x = 0; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.js b/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.js deleted file mode 100644 index 3df24235f5..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.js +++ /dev/null @@ -1,10 +0,0 @@ -//// [tests/cases/compiler/noImplicitUseStrict_commonjs.ts] //// - -//// [noImplicitUseStrict_commonjs.ts] -export var x = 0; - -//// [noImplicitUseStrict_commonjs.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.x = void 0; -exports.x = 0; diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.symbols b/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.symbols deleted file mode 100644 index eae968bc07..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.symbols +++ /dev/null @@ -1,6 +0,0 @@ -//// [tests/cases/compiler/noImplicitUseStrict_commonjs.ts] //// - -=== noImplicitUseStrict_commonjs.ts === -export var x = 0; ->x : Symbol(x, Decl(noImplicitUseStrict_commonjs.ts, 0, 10)) - diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.types b/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.types deleted file mode 100644 index 7a4f07aae9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_commonjs.types +++ /dev/null @@ -1,7 +0,0 @@ -//// [tests/cases/compiler/noImplicitUseStrict_commonjs.ts] //// - -=== noImplicitUseStrict_commonjs.ts === -export var x = 0; ->x : number ->0 : 0 - diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.errors.txt.diff deleted file mode 100644 index 8d864a3494..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.errors.txt.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.noImplicitUseStrict_es6.errors.txt -+++ new.noImplicitUseStrict_es6.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration. -- -- --!!! error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration. --==== noImplicitUseStrict_es6.ts (0 errors) ==== -- export var x = 0; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.js b/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.js deleted file mode 100644 index 47aced3d97..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.js +++ /dev/null @@ -1,7 +0,0 @@ -//// [tests/cases/compiler/noImplicitUseStrict_es6.ts] //// - -//// [noImplicitUseStrict_es6.ts] -export var x = 0; - -//// [noImplicitUseStrict_es6.js] -export var x = 0; diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.symbols b/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.symbols deleted file mode 100644 index 2e80636048..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.symbols +++ /dev/null @@ -1,6 +0,0 @@ -//// [tests/cases/compiler/noImplicitUseStrict_es6.ts] //// - -=== noImplicitUseStrict_es6.ts === -export var x = 0; ->x : Symbol(x, Decl(noImplicitUseStrict_es6.ts, 0, 10)) - diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.types b/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.types deleted file mode 100644 index 6eb63fe81b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitUseStrict_es6.types +++ /dev/null @@ -1,7 +0,0 @@ -//// [tests/cases/compiler/noImplicitUseStrict_es6.ts] //// - -=== noImplicitUseStrict_es6.ts === -export var x = 0; ->x : number ->0 : 0 - diff --git a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.errors.txt b/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.errors.txt deleted file mode 100644 index 548ef759da..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -noStrictGenericChecks.ts(5,5): error TS2322: Type 'B' is not assignable to type 'A'. - Types of parameters 'y' and 'y' are incompatible. - Type 'U' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. - - -==== noStrictGenericChecks.ts (1 errors) ==== - type A = (x: T, y: U) => [T, U]; - type B = (x: S, y: S) => [S, S]; - - function f(a: A, b: B) { - a = b; // Error disabled here - ~ -!!! error TS2322: Type 'B' is not assignable to type 'A'. -!!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -!!! related TS2208 noStrictGenericChecks.ts:1:14: This type parameter might need an `extends T` constraint. - b = a; // Ok - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.errors.txt.diff deleted file mode 100644 index ae3429e4ad..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.noStrictGenericChecks.errors.txt -+++ new.noStrictGenericChecks.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'noStrictGenericChecks' has been removed. Please remove it from your configuration. - noStrictGenericChecks.ts(5,5): error TS2322: Type 'B' is not assignable to type 'A'. - Types of parameters 'y' and 'y' are incompatible. - Type 'U' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. - - --!!! error TS5102: Option 'noStrictGenericChecks' has been removed. Please remove it from your configuration. - ==== noStrictGenericChecks.ts (1 errors) ==== - type A = (x: T, y: U) => [T, U]; - type B = (x: S, y: S) => [S, S]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.js b/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.js deleted file mode 100644 index 55f3bbfd90..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.js +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/compiler/noStrictGenericChecks.ts] //// - -//// [noStrictGenericChecks.ts] -type A = (x: T, y: U) => [T, U]; -type B = (x: S, y: S) => [S, S]; - -function f(a: A, b: B) { - a = b; // Error disabled here - b = a; // Ok -} - - -//// [noStrictGenericChecks.js] -function f(a, b) { - a = b; // Error disabled here - b = a; // Ok -} diff --git a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.symbols b/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.symbols deleted file mode 100644 index 7625102422..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.symbols +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/compiler/noStrictGenericChecks.ts] //// - -=== noStrictGenericChecks.ts === -type A = (x: T, y: U) => [T, U]; ->A : Symbol(A, Decl(noStrictGenericChecks.ts, 0, 0)) ->T : Symbol(T, Decl(noStrictGenericChecks.ts, 0, 10)) ->U : Symbol(U, Decl(noStrictGenericChecks.ts, 0, 12)) ->x : Symbol(x, Decl(noStrictGenericChecks.ts, 0, 16)) ->T : Symbol(T, Decl(noStrictGenericChecks.ts, 0, 10)) ->y : Symbol(y, Decl(noStrictGenericChecks.ts, 0, 21)) ->U : Symbol(U, Decl(noStrictGenericChecks.ts, 0, 12)) ->T : Symbol(T, Decl(noStrictGenericChecks.ts, 0, 10)) ->U : Symbol(U, Decl(noStrictGenericChecks.ts, 0, 12)) - -type B = (x: S, y: S) => [S, S]; ->B : Symbol(B, Decl(noStrictGenericChecks.ts, 0, 38)) ->S : Symbol(S, Decl(noStrictGenericChecks.ts, 1, 10)) ->x : Symbol(x, Decl(noStrictGenericChecks.ts, 1, 13)) ->S : Symbol(S, Decl(noStrictGenericChecks.ts, 1, 10)) ->y : Symbol(y, Decl(noStrictGenericChecks.ts, 1, 18)) ->S : Symbol(S, Decl(noStrictGenericChecks.ts, 1, 10)) ->S : Symbol(S, Decl(noStrictGenericChecks.ts, 1, 10)) ->S : Symbol(S, Decl(noStrictGenericChecks.ts, 1, 10)) - -function f(a: A, b: B) { ->f : Symbol(f, Decl(noStrictGenericChecks.ts, 1, 35)) ->a : Symbol(a, Decl(noStrictGenericChecks.ts, 3, 11)) ->A : Symbol(A, Decl(noStrictGenericChecks.ts, 0, 0)) ->b : Symbol(b, Decl(noStrictGenericChecks.ts, 3, 16)) ->B : Symbol(B, Decl(noStrictGenericChecks.ts, 0, 38)) - - a = b; // Error disabled here ->a : Symbol(a, Decl(noStrictGenericChecks.ts, 3, 11)) ->b : Symbol(b, Decl(noStrictGenericChecks.ts, 3, 16)) - - b = a; // Ok ->b : Symbol(b, Decl(noStrictGenericChecks.ts, 3, 16)) ->a : Symbol(a, Decl(noStrictGenericChecks.ts, 3, 11)) -} - diff --git a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.types b/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.types deleted file mode 100644 index 0de1cf1ab1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noStrictGenericChecks.types +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/compiler/noStrictGenericChecks.ts] //// - -=== noStrictGenericChecks.ts === -type A = (x: T, y: U) => [T, U]; ->A : A ->x : T ->y : U - -type B = (x: S, y: S) => [S, S]; ->B : B ->x : S ->y : S - -function f(a: A, b: B) { ->f : (a: A, b: B) => void ->a : A ->b : B - - a = b; // Error disabled here ->a = b : B ->a : A ->b : B - - b = a; // Ok ->b = a : A ->b : B ->a : A -} - diff --git a/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution1.errors.txt b/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution1.errors.txt index 00bab93c4a..6293f22afb 100644 --- a/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution1.errors.txt @@ -1,6 +1,8 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. /a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. ==== /a/node_modules/foo.d.ts (0 errors) ==== export declare let x: number diff --git a/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution1.errors.txt.diff deleted file mode 100644 index f0676b4a4d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution1.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.nodeNextModuleResolution1.errors.txt -+++ new.nodeNextModuleResolution1.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - /a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. - - --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - ==== /a/node_modules/foo.d.ts (0 errors) ==== - export declare let x: number - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution2.errors.txt b/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution2.errors.txt new file mode 100644 index 0000000000..0f97e5e2de --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution2.errors.txt @@ -0,0 +1,18 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== /a/node_modules/foo/index.d.ts (0 errors) ==== + export declare let x: number +==== /a/node_modules/foo/package.json (0 errors) ==== + { + "name": "foo", + "type": "module", + "exports": { + ".": "./index.d.ts" + } + } + +==== /a/b/c/d/e/app.mts (0 errors) ==== + import {x} from "foo"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution2.errors.txt.diff deleted file mode 100644 index d359a4a30a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/nodeNextModuleResolution2.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.nodeNextModuleResolution2.errors.txt -+++ new.nodeNextModuleResolution2.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== /a/node_modules/foo/index.d.ts (0 errors) ==== -- export declare let x: number --==== /a/node_modules/foo/package.json (0 errors) ==== -- { -- "name": "foo", -- "type": "module", -- "exports": { -- ".": "./index.d.ts" -- } -- } -- --==== /a/b/c/d/e/app.mts (0 errors) ==== -- import {x} from "foo"; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsCompositeWithIncrementalFalse.errors.txt b/testdata/baselines/reference/submodule/compiler/optionsCompositeWithIncrementalFalse.errors.txt new file mode 100644 index 0000000000..118c737b50 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/optionsCompositeWithIncrementalFalse.errors.txt @@ -0,0 +1,7 @@ +error TS6379: Composite projects may not disable incremental compilation. + + +!!! error TS6379: Composite projects may not disable incremental compilation. +==== optionsCompositeWithIncrementalFalse.ts (0 errors) ==== + const x = "Hello World"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsCompositeWithIncrementalFalse.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/optionsCompositeWithIncrementalFalse.errors.txt.diff deleted file mode 100644 index 493a3fe318..0000000000 --- a/testdata/baselines/reference/submodule/compiler/optionsCompositeWithIncrementalFalse.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.optionsCompositeWithIncrementalFalse.errors.txt -+++ new.optionsCompositeWithIncrementalFalse.errors.txt -@@= skipped -0, +0 lines =@@ --error TS6379: Composite projects may not disable incremental compilation. -- -- --!!! error TS6379: Composite projects may not disable incremental compilation. --==== optionsCompositeWithIncrementalFalse.ts (0 errors) ==== -- const x = "Hello World"; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapMapRoot.errors.txt b/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapMapRoot.errors.txt new file mode 100644 index 0000000000..d3e50c1444 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapMapRoot.errors.txt @@ -0,0 +1,8 @@ +error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. +error TS5069: Option 'mapRoot' cannot be specified without specifying option 'sourceMap' or option 'declarationMap'. + + +!!! error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. +!!! error TS5069: Option 'mapRoot' cannot be specified without specifying option 'sourceMap' or option 'declarationMap'. +==== optionsInlineSourceMapMapRoot.ts (0 errors) ==== + var a = 10; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapMapRoot.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapMapRoot.errors.txt.diff deleted file mode 100644 index 1532f8b7f6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapMapRoot.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.optionsInlineSourceMapMapRoot.errors.txt -+++ new.optionsInlineSourceMapMapRoot.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. --error TS5069: Option 'mapRoot' cannot be specified without specifying option 'sourceMap' or option 'declarationMap'. -- -- --!!! error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. --!!! error TS5069: Option 'mapRoot' cannot be specified without specifying option 'sourceMap' or option 'declarationMap'. --==== optionsInlineSourceMapMapRoot.ts (0 errors) ==== -- var a = 10; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapSourcemap.errors.txt b/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapSourcemap.errors.txt new file mode 100644 index 0000000000..6f6e60bedb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapSourcemap.errors.txt @@ -0,0 +1,6 @@ +error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. + + +!!! error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. +==== optionsInlineSourceMapSourcemap.ts (0 errors) ==== + var a = 10; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapSourcemap.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapSourcemap.errors.txt.diff deleted file mode 100644 index 1a6d687720..0000000000 --- a/testdata/baselines/reference/submodule/compiler/optionsInlineSourceMapSourcemap.errors.txt.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.optionsInlineSourceMapSourcemap.errors.txt -+++ new.optionsInlineSourceMapSourcemap.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. -- -- --!!! error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. --==== optionsInlineSourceMapSourcemap.ts (0 errors) ==== -- var a = 10; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsOutAndNoModuleGen.errors.txt b/testdata/baselines/reference/submodule/compiler/optionsOutAndNoModuleGen.errors.txt new file mode 100644 index 0000000000..1b6c912420 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/optionsOutAndNoModuleGen.errors.txt @@ -0,0 +1,7 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== optionsOutAndNoModuleGen.ts (0 errors) ==== + export var x = 10; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsStrictPropertyInitializationStrictNullChecks.errors.txt b/testdata/baselines/reference/submodule/compiler/optionsStrictPropertyInitializationStrictNullChecks.errors.txt new file mode 100644 index 0000000000..93cd3e9afc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/optionsStrictPropertyInitializationStrictNullChecks.errors.txt @@ -0,0 +1,7 @@ +error TS5052: Option 'strictPropertyInitialization' cannot be specified without specifying option 'strictNullChecks'. + + +!!! error TS5052: Option 'strictPropertyInitialization' cannot be specified without specifying option 'strictNullChecks'. +==== optionsStrictPropertyInitializationStrictNullChecks.ts (0 errors) ==== + var x; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsStrictPropertyInitializationStrictNullChecks.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/optionsStrictPropertyInitializationStrictNullChecks.errors.txt.diff deleted file mode 100644 index 49768090e6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/optionsStrictPropertyInitializationStrictNullChecks.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.optionsStrictPropertyInitializationStrictNullChecks.errors.txt -+++ new.optionsStrictPropertyInitializationStrictNullChecks.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5052: Option 'strictPropertyInitialization' cannot be specified without specifying option 'strictNullChecks'. -- -- --!!! error TS5052: Option 'strictPropertyInitialization' cannot be specified without specifying option 'strictNullChecks'. --==== optionsStrictPropertyInitializationStrictNullChecks.ts (0 errors) ==== -- var x; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag2.errors.txt b/testdata/baselines/reference/submodule/compiler/out-flag2.errors.txt new file mode 100644 index 0000000000..56912a9b11 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/out-flag2.errors.txt @@ -0,0 +1,10 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class A { } + +==== b.ts (0 errors) ==== + class B { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag2.js.map b/testdata/baselines/reference/submodule/compiler/out-flag2.js.map deleted file mode 100644 index ecc1a527ef..0000000000 --- a/testdata/baselines/reference/submodule/compiler/out-flag2.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI"} -//// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag2.js.map.diff b/testdata/baselines/reference/submodule/compiler/out-flag2.js.map.diff deleted file mode 100644 index ba9bd78a84..0000000000 --- a/testdata/baselines/reference/submodule/compiler/out-flag2.js.map.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.out-flag2.js.map -+++ new.out-flag2.js.map -@@= skipped -0, +0 lines =@@ --//// [c.js.map] --{"version":3,"file":"c.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI;ACAX,MAAM,CAAC;CAAI"} --//// https://sokra.github.io/source-map-visualization#base64,Y2xhc3MgQSB7DQp9DQpjbGFzcyBCIHsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWMuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQztDQUFJO0FDQVgsTUFBTSxDQUFDO0NBQUkifQ==,Y2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K -+//// [a.js.map] -+{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI"} -+//// [b.js.map] -+{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag2.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/out-flag2.sourcemap.txt deleted file mode 100644 index 57a3f727df..0000000000 --- a/testdata/baselines/reference/submodule/compiler/out-flag2.sourcemap.txt +++ /dev/null @@ -1,55 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: a.js.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>class A { -1 > -2 >^^^^^^ -3 > ^ -1 > -2 >class -3 > A -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { } -1 >Emitted(2, 2) Source(1, 12) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js -mapUrl: b.js.map -sourceRoot: -sources: b.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:b.js -sourceFile:b.ts -------------------------------------------------------------------- ->>>class B { -1 > -2 >^^^^^^ -3 > ^ -1 > -2 >class -3 > B -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { } -1 >Emitted(2, 2) Source(1, 12) + SourceIndex(0) ---- ->>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag2.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/out-flag2.sourcemap.txt.diff deleted file mode 100644 index e9f4282cac..0000000000 --- a/testdata/baselines/reference/submodule/compiler/out-flag2.sourcemap.txt.diff +++ /dev/null @@ -1,63 +0,0 @@ ---- old.out-flag2.sourcemap.txt -+++ new.out-flag2.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: c.js --mapUrl: c.js.map -+JsFile: a.js -+mapUrl: a.js.map - sourceRoot: --sources: a.ts,b.ts -+sources: a.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:c.js -+emittedFile:a.js - sourceFile:a.ts - ------------------------------------------------------------------- - >>>class A { -@@= skipped -20, +20 lines =@@ - --- - >>>} - 1 >^ --2 > ^^^^^^^^^-> -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > { } - 1 >Emitted(2, 2) Source(1, 12) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=a.js.map=================================================================== -+JsFile: b.js -+mapUrl: b.js.map -+sourceRoot: -+sources: b.ts -+=================================================================== - ------------------------------------------------------------------- --emittedFile:c.js -+emittedFile:b.js - sourceFile:b.ts - ------------------------------------------------------------------- - >>>class B { --1-> -+1 > - 2 >^^^^^^ - 3 > ^ --1-> -+1 > - 2 >class - 3 > B --1->Emitted(3, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(3, 7) Source(1, 7) + SourceIndex(1) --3 >Emitted(3, 8) Source(1, 8) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -+3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) - --- - >>>} - 1 >^ - 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > { } --1 >Emitted(4, 2) Source(1, 12) + SourceIndex(1) -+1 >Emitted(2, 2) Source(1, 12) + SourceIndex(0) - --- -->>>//# sourceMappingURL=c.js.map -+>>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag3.errors.txt b/testdata/baselines/reference/submodule/compiler/out-flag3.errors.txt new file mode 100644 index 0000000000..56912a9b11 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/out-flag3.errors.txt @@ -0,0 +1,10 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + class A { } + +==== b.ts (0 errors) ==== + class B { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag3.js.map b/testdata/baselines/reference/submodule/compiler/out-flag3.js.map deleted file mode 100644 index ecc1a527ef..0000000000 --- a/testdata/baselines/reference/submodule/compiler/out-flag3.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI"} -//// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag3.js.map.diff b/testdata/baselines/reference/submodule/compiler/out-flag3.js.map.diff deleted file mode 100644 index 3de01d9c59..0000000000 --- a/testdata/baselines/reference/submodule/compiler/out-flag3.js.map.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.out-flag3.js.map -+++ new.out-flag3.js.map -@@= skipped -0, +0 lines =@@ --//// [d.js.map] --{"version":3,"file":"d.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI;ACAX,MAAM,CAAC;CAAI"} --//// https://sokra.github.io/source-map-visualization#base64,Y2xhc3MgQSB7DQp9DQpjbGFzcyBCIHsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWQuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQztDQUFJO0FDQVgsTUFBTSxDQUFDO0NBQUkifQ==,Y2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K -+//// [a.js.map] -+{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI"} -+//// [b.js.map] -+{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CAAI"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag3.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/out-flag3.sourcemap.txt deleted file mode 100644 index 57a3f727df..0000000000 --- a/testdata/baselines/reference/submodule/compiler/out-flag3.sourcemap.txt +++ /dev/null @@ -1,55 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: a.js.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>class A { -1 > -2 >^^^^^^ -3 > ^ -1 > -2 >class -3 > A -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { } -1 >Emitted(2, 2) Source(1, 12) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js -mapUrl: b.js.map -sourceRoot: -sources: b.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:b.js -sourceFile:b.ts -------------------------------------------------------------------- ->>>class B { -1 > -2 >^^^^^^ -3 > ^ -1 > -2 >class -3 > B -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { } -1 >Emitted(2, 2) Source(1, 12) + SourceIndex(0) ---- ->>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag3.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/out-flag3.sourcemap.txt.diff deleted file mode 100644 index aff34c3532..0000000000 --- a/testdata/baselines/reference/submodule/compiler/out-flag3.sourcemap.txt.diff +++ /dev/null @@ -1,63 +0,0 @@ ---- old.out-flag3.sourcemap.txt -+++ new.out-flag3.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: d.js --mapUrl: d.js.map -+JsFile: a.js -+mapUrl: a.js.map - sourceRoot: --sources: a.ts,b.ts -+sources: a.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:d.js -+emittedFile:a.js - sourceFile:a.ts - ------------------------------------------------------------------- - >>>class A { -@@= skipped -20, +20 lines =@@ - --- - >>>} - 1 >^ --2 > ^^^^^^^^^-> -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > { } - 1 >Emitted(2, 2) Source(1, 12) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=a.js.map=================================================================== -+JsFile: b.js -+mapUrl: b.js.map -+sourceRoot: -+sources: b.ts -+=================================================================== - ------------------------------------------------------------------- --emittedFile:d.js -+emittedFile:b.js - sourceFile:b.ts - ------------------------------------------------------------------- - >>>class B { --1-> -+1 > - 2 >^^^^^^ - 3 > ^ --1-> -+1 > - 2 >class - 3 > B --1->Emitted(3, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(3, 7) Source(1, 7) + SourceIndex(1) --3 >Emitted(3, 8) Source(1, 8) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -+3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) - --- - >>>} - 1 >^ - 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > { } --1 >Emitted(4, 2) Source(1, 12) + SourceIndex(1) -+1 >Emitted(2, 2) Source(1, 12) + SourceIndex(0) - --- -->>>//# sourceMappingURL=d.js.map -+>>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.errors.txt b/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.errors.txt new file mode 100644 index 0000000000..59d09f8ab4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.errors.txt @@ -0,0 +1,11 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== ref/a.ts (0 errors) ==== + export class A { } + +==== b.ts (0 errors) ==== + import {A} from "./ref/a"; + export class B extends A { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.js.map b/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.js.map deleted file mode 100644 index 4a6226ebe6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAC1B,OAAe,SAAQ,KAAC;CAAI"} -//// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAA;CAAkB"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.js.map.diff b/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.js.map.diff deleted file mode 100644 index 3112ccf8f0..0000000000 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.js.map.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.outModuleConcatCommonjs.js.map -+++ new.outModuleConcatCommonjs.js.map -@@= skipped -0, +0 lines =@@ -- -+//// [b.js.map] -+{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAC1B,OAAe,SAAQ,KAAC;CAAI"} -+//// [a.js.map] -+{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAA;CAAkB"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.sourcemap.txt deleted file mode 100644 index c9be4ffddc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.sourcemap.txt +++ /dev/null @@ -1,70 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: a.js.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:ref/a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>"use strict"; ->>>Object.defineProperty(exports, "__esModule", { value: true }); ->>>exports.A = void 0; ->>>class A { -1 > -2 >^^-> -1 > -1 >Emitted(4, 1) Source(1, 1) + SourceIndex(0) ---- ->>>} -1->^ -2 > ^^^^^^^^^^^^^^-> -1->export class A { } -1->Emitted(5, 2) Source(1, 19) + SourceIndex(0) ---- ->>>exports.A = A; ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js -mapUrl: b.js.map -sourceRoot: -sources: b.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:b.js -sourceFile:b.ts -------------------------------------------------------------------- ->>>"use strict"; ->>>Object.defineProperty(exports, "__esModule", { value: true }); ->>>exports.B = void 0; ->>>const a_1 = require("./ref/a"); -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 >import {A} from "./ref/a"; -1 >Emitted(4, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(4, 32) Source(1, 27) + SourceIndex(0) ---- ->>>class B extends a_1.A { -1 > -2 >^^^^^^^ -3 > ^^^^^^^^^ -4 > ^^^^^ -1 > - > -2 >export class B -3 > extends -4 > A -1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(5, 8) Source(2, 16) + SourceIndex(0) -3 >Emitted(5, 17) Source(2, 24) + SourceIndex(0) -4 >Emitted(5, 22) Source(2, 25) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^-> -1 > { } -1 >Emitted(6, 2) Source(2, 29) + SourceIndex(0) ---- ->>>exports.B = B; ->>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.sourcemap.txt.diff deleted file mode 100644 index a15f6b340d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.sourcemap.txt.diff +++ /dev/null @@ -1,74 +0,0 @@ ---- old.outModuleConcatCommonjs.sourcemap.txt -+++ new.outModuleConcatCommonjs.sourcemap.txt -@@= skipped -0, +0 lines =@@ -- -+=================================================================== -+JsFile: a.js -+mapUrl: a.js.map -+sourceRoot: -+sources: a.ts -+=================================================================== -+------------------------------------------------------------------- -+emittedFile:ref/a.js -+sourceFile:a.ts -+------------------------------------------------------------------- -+>>>"use strict"; -+>>>Object.defineProperty(exports, "__esModule", { value: true }); -+>>>exports.A = void 0; -+>>>class A { -+1 > -+2 >^^-> -+1 > -+1 >Emitted(4, 1) Source(1, 1) + SourceIndex(0) -+--- -+>>>} -+1->^ -+2 > ^^^^^^^^^^^^^^-> -+1->export class A { } -+1->Emitted(5, 2) Source(1, 19) + SourceIndex(0) -+--- -+>>>exports.A = A; -+>>>//# sourceMappingURL=a.js.map=================================================================== -+JsFile: b.js -+mapUrl: b.js.map -+sourceRoot: -+sources: b.ts -+=================================================================== -+------------------------------------------------------------------- -+emittedFile:b.js -+sourceFile:b.ts -+------------------------------------------------------------------- -+>>>"use strict"; -+>>>Object.defineProperty(exports, "__esModule", { value: true }); -+>>>exports.B = void 0; -+>>>const a_1 = require("./ref/a"); -+1 > -+2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -+1 > -+2 >import {A} from "./ref/a"; -+1 >Emitted(4, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(4, 32) Source(1, 27) + SourceIndex(0) -+--- -+>>>class B extends a_1.A { -+1 > -+2 >^^^^^^^ -+3 > ^^^^^^^^^ -+4 > ^^^^^ -+1 > -+ > -+2 >export class B -+3 > extends -+4 > A -+1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) -+2 >Emitted(5, 8) Source(2, 16) + SourceIndex(0) -+3 >Emitted(5, 17) Source(2, 24) + SourceIndex(0) -+4 >Emitted(5, 22) Source(2, 25) + SourceIndex(0) -+--- -+>>>} -+1 >^ -+2 > ^^^^^^^^^^^^^^-> -+1 > { } -+1 >Emitted(6, 2) Source(2, 29) + SourceIndex(0) -+--- -+>>>exports.B = B; -+>>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjsDeclarationOnly.errors.txt b/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjsDeclarationOnly.errors.txt new file mode 100644 index 0000000000..59d09f8ab4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjsDeclarationOnly.errors.txt @@ -0,0 +1,11 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== ref/a.ts (0 errors) ==== + export class A { } + +==== b.ts (0 errors) ==== + import {A} from "./ref/a"; + export class B extends A { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.errors.txt b/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.errors.txt new file mode 100644 index 0000000000..080343cb99 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.errors.txt @@ -0,0 +1,10 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== ref/a.ts (0 errors) ==== + export class A { } + +==== b.ts (0 errors) ==== + import {A} from "./ref/a"; + export class B extends A { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.js.map b/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.js.map deleted file mode 100644 index 2a9d2f0a71..0000000000 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,SAAS,CAAC;AAC1B,MAAM,OAAO,CAAE,SAAQ,CAAC;CAAI"} -//// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,CAAC;CAAI"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.js.map.diff b/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.js.map.diff deleted file mode 100644 index 5e29f21fdf..0000000000 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.js.map.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.outModuleConcatES6.js.map -+++ new.outModuleConcatES6.js.map -@@= skipped -0, +0 lines =@@ -- -+//// [b.js.map] -+{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,SAAS,CAAC;AAC1B,MAAM,OAAO,CAAE,SAAQ,CAAC;CAAI"} -+//// [a.js.map] -+{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,CAAC;CAAI"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.sourcemap.txt deleted file mode 100644 index 8e6527ef9a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.sourcemap.txt +++ /dev/null @@ -1,94 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: a.js.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:ref/a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>export class A { -1 > -2 >^^^^^^ -3 > ^^^^^^^ -4 > ^ -1 > -2 >export -3 > class -4 > A -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -4 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { } -1 >Emitted(2, 2) Source(1, 19) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js -mapUrl: b.js.map -sourceRoot: -sources: b.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:b.js -sourceFile:b.ts -------------------------------------------------------------------- ->>>import { A } from "./ref/a"; -1 > -2 >^^^^^^^ -3 > ^^ -4 > ^ -5 > ^^ -6 > ^^^^^^ -7 > ^^^^^^^^^ -8 > ^ -1 > -2 >import -3 > { -4 > A -5 > } -6 > from -7 > "./ref/a" -8 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 10) Source(1, 9) + SourceIndex(0) -4 >Emitted(1, 11) Source(1, 10) + SourceIndex(0) -5 >Emitted(1, 13) Source(1, 11) + SourceIndex(0) -6 >Emitted(1, 19) Source(1, 17) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 26) + SourceIndex(0) -8 >Emitted(1, 29) Source(1, 27) + SourceIndex(0) ---- ->>>export class B extends A { -1 > -2 >^^^^^^ -3 > ^^^^^^^ -4 > ^ -5 > ^^^^^^^^^ -6 > ^ -1 > - > -2 >export -3 > class -4 > B -5 > extends -6 > A -1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 7) Source(2, 7) + SourceIndex(0) -3 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -4 >Emitted(2, 15) Source(2, 16) + SourceIndex(0) -5 >Emitted(2, 24) Source(2, 24) + SourceIndex(0) -6 >Emitted(2, 25) Source(2, 25) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { } -1 >Emitted(3, 2) Source(2, 29) + SourceIndex(0) ---- ->>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.sourcemap.txt.diff deleted file mode 100644 index f723a914a0..0000000000 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.sourcemap.txt.diff +++ /dev/null @@ -1,98 +0,0 @@ ---- old.outModuleConcatES6.sourcemap.txt -+++ new.outModuleConcatES6.sourcemap.txt -@@= skipped -0, +0 lines =@@ -- -+=================================================================== -+JsFile: a.js -+mapUrl: a.js.map -+sourceRoot: -+sources: a.ts -+=================================================================== -+------------------------------------------------------------------- -+emittedFile:ref/a.js -+sourceFile:a.ts -+------------------------------------------------------------------- -+>>>export class A { -+1 > -+2 >^^^^^^ -+3 > ^^^^^^^ -+4 > ^ -+1 > -+2 >export -+3 > class -+4 > A -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -+3 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -+4 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) -+--- -+>>>} -+1 >^ -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+1 > { } -+1 >Emitted(2, 2) Source(1, 19) + SourceIndex(0) -+--- -+>>>//# sourceMappingURL=a.js.map=================================================================== -+JsFile: b.js -+mapUrl: b.js.map -+sourceRoot: -+sources: b.ts -+=================================================================== -+------------------------------------------------------------------- -+emittedFile:b.js -+sourceFile:b.ts -+------------------------------------------------------------------- -+>>>import { A } from "./ref/a"; -+1 > -+2 >^^^^^^^ -+3 > ^^ -+4 > ^ -+5 > ^^ -+6 > ^^^^^^ -+7 > ^^^^^^^^^ -+8 > ^ -+1 > -+2 >import -+3 > { -+4 > A -+5 > } -+6 > from -+7 > "./ref/a" -+8 > ; -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) -+3 >Emitted(1, 10) Source(1, 9) + SourceIndex(0) -+4 >Emitted(1, 11) Source(1, 10) + SourceIndex(0) -+5 >Emitted(1, 13) Source(1, 11) + SourceIndex(0) -+6 >Emitted(1, 19) Source(1, 17) + SourceIndex(0) -+7 >Emitted(1, 28) Source(1, 26) + SourceIndex(0) -+8 >Emitted(1, 29) Source(1, 27) + SourceIndex(0) -+--- -+>>>export class B extends A { -+1 > -+2 >^^^^^^ -+3 > ^^^^^^^ -+4 > ^ -+5 > ^^^^^^^^^ -+6 > ^ -+1 > -+ > -+2 >export -+3 > class -+4 > B -+5 > extends -+6 > A -+1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) -+2 >Emitted(2, 7) Source(2, 7) + SourceIndex(0) -+3 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -+4 >Emitted(2, 15) Source(2, 16) + SourceIndex(0) -+5 >Emitted(2, 24) Source(2, 24) + SourceIndex(0) -+6 >Emitted(2, 25) Source(2, 25) + SourceIndex(0) -+--- -+>>>} -+1 >^ -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+1 > { } -+1 >Emitted(3, 2) Source(2, 29) + SourceIndex(0) -+--- -+>>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt b/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt new file mode 100644 index 0000000000..cff51678ba --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt @@ -0,0 +1,9 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + export class A { } // module + +==== b.ts (0 errors) ==== + var x = 0; // global \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt b/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt new file mode 100644 index 0000000000..6993b8737b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt @@ -0,0 +1,10 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + export class A { } // module + +==== b.ts (0 errors) ==== + var x = 0; // global + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.js b/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.js deleted file mode 100644 index 7051171f4d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.js +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/compiler/parameterInitializerBeforeDestructuringEmit.ts] //// - -//// [parameterInitializerBeforeDestructuringEmit.ts] -interface Foo { - bar?: any; - baz?: any; -} - -function foobar({ bar = {}, ...opts }: Foo = {}) { - "use strict"; - "Some other prologue"; - opts.baz(bar); -} - -class C { - constructor({ bar = {}, ...opts }: Foo = {}) { - "use strict"; - "Some other prologue"; - opts.baz(bar); - } -} - - -//// [parameterInitializerBeforeDestructuringEmit.js] -function foobar({ bar = {}, ...opts } = {}) { - "use strict"; - "Some other prologue"; - "use strict"; - "Some other prologue"; - opts.baz(bar); -} -class C { - constructor({ bar = {}, ...opts } = {}) { - "use strict"; - "Some other prologue"; - "use strict"; - "Some other prologue"; - opts.baz(bar); - } -} diff --git a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.js.diff b/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.js.diff deleted file mode 100644 index 3c45e34731..0000000000 --- a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.js.diff +++ /dev/null @@ -1,42 +0,0 @@ ---- old.parameterInitializerBeforeDestructuringEmit.js -+++ new.parameterInitializerBeforeDestructuringEmit.js -@@= skipped -21, +21 lines =@@ - - - //// [parameterInitializerBeforeDestructuringEmit.js] --"use strict"; --var __rest = (this && this.__rest) || function (s, e) { -- var t = {}; -- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) -- t[p] = s[p]; -- if (s != null && typeof Object.getOwnPropertySymbols === "function") -- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { -- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) -- t[p[i]] = s[p[i]]; -- } -- return t; --}; --function foobar(_a = {}) { -- "use strict"; -- "Some other prologue"; -- var { bar = {} } = _a, opts = __rest(_a, ["bar"]); -+function foobar({ bar = {}, ...opts } = {}) { -+ "use strict"; -+ "Some other prologue"; -+ "use strict"; -+ "Some other prologue"; - opts.baz(bar); - } - class C { -- constructor(_a = {}) { -- "use strict"; -- "Some other prologue"; -- var { bar = {} } = _a, opts = __rest(_a, ["bar"]); -+ constructor({ bar = {}, ...opts } = {}) { -+ "use strict"; -+ "Some other prologue"; -+ "use strict"; -+ "Some other prologue"; - opts.baz(bar); - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.symbols b/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.symbols deleted file mode 100644 index 201759c0f4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.symbols +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/compiler/parameterInitializerBeforeDestructuringEmit.ts] //// - -=== parameterInitializerBeforeDestructuringEmit.ts === -interface Foo { ->Foo : Symbol(Foo, Decl(parameterInitializerBeforeDestructuringEmit.ts, 0, 0)) - - bar?: any; ->bar : Symbol(bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 0, 15)) - - baz?: any; ->baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) -} - -function foobar({ bar = {}, ...opts }: Foo = {}) { ->foobar : Symbol(foobar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 3, 1)) ->bar : Symbol(bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 5, 17)) ->opts : Symbol(opts, Decl(parameterInitializerBeforeDestructuringEmit.ts, 5, 27)) ->Foo : Symbol(Foo, Decl(parameterInitializerBeforeDestructuringEmit.ts, 0, 0)) - - "use strict"; - "Some other prologue"; - opts.baz(bar); ->opts.baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) ->opts : Symbol(opts, Decl(parameterInitializerBeforeDestructuringEmit.ts, 5, 27)) ->baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) ->bar : Symbol(bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 5, 17)) -} - -class C { ->C : Symbol(C, Decl(parameterInitializerBeforeDestructuringEmit.ts, 9, 1)) - - constructor({ bar = {}, ...opts }: Foo = {}) { ->bar : Symbol(bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 12, 17)) ->opts : Symbol(opts, Decl(parameterInitializerBeforeDestructuringEmit.ts, 12, 27)) ->Foo : Symbol(Foo, Decl(parameterInitializerBeforeDestructuringEmit.ts, 0, 0)) - - "use strict"; - "Some other prologue"; - opts.baz(bar); ->opts.baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) ->opts : Symbol(opts, Decl(parameterInitializerBeforeDestructuringEmit.ts, 12, 27)) ->baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) ->bar : Symbol(bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 12, 17)) - } -} - diff --git a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.symbols.diff b/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.symbols.diff deleted file mode 100644 index 2e219f0884..0000000000 --- a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.symbols.diff +++ /dev/null @@ -1,39 +0,0 @@ ---- old.parameterInitializerBeforeDestructuringEmit.symbols -+++ new.parameterInitializerBeforeDestructuringEmit.symbols -@@= skipped -4, +4 lines =@@ - >Foo : Symbol(Foo, Decl(parameterInitializerBeforeDestructuringEmit.ts, 0, 0)) - - bar?: any; -->bar : Symbol(Foo.bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 0, 15)) -+>bar : Symbol(bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 0, 15)) - - baz?: any; -->baz : Symbol(Foo.baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) -+>baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) - } - - function foobar({ bar = {}, ...opts }: Foo = {}) { -@@= skipped -15, +15 lines =@@ - "use strict"; - "Some other prologue"; - opts.baz(bar); -->opts.baz : Symbol(Foo.baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) -+>opts.baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) - >opts : Symbol(opts, Decl(parameterInitializerBeforeDestructuringEmit.ts, 5, 27)) -->baz : Symbol(Foo.baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) -+>baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) - >bar : Symbol(bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 5, 17)) - } - -@@= skipped -17, +17 lines =@@ - "use strict"; - "Some other prologue"; - opts.baz(bar); -->opts.baz : Symbol(Foo.baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) -+>opts.baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) - >opts : Symbol(opts, Decl(parameterInitializerBeforeDestructuringEmit.ts, 12, 27)) -->baz : Symbol(Foo.baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) -+>baz : Symbol(baz, Decl(parameterInitializerBeforeDestructuringEmit.ts, 1, 14)) - >bar : Symbol(bar, Decl(parameterInitializerBeforeDestructuringEmit.ts, 12, 17)) - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types b/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types deleted file mode 100644 index 352781a023..0000000000 --- a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/compiler/parameterInitializerBeforeDestructuringEmit.ts] //// - -=== parameterInitializerBeforeDestructuringEmit.ts === -interface Foo { - bar?: any; ->bar : any - - baz?: any; ->baz : any -} - -function foobar({ bar = {}, ...opts }: Foo = {}) { ->foobar : ({ bar, ...opts }?: Foo) => void ->bar : any ->{} : {} ->opts : { baz?: any; } ->{} : {} - - "use strict"; ->"use strict" : "use strict" - - "Some other prologue"; ->"Some other prologue" : "Some other prologue" - - opts.baz(bar); ->opts.baz(bar) : any ->opts.baz : any ->opts : { baz?: any; } ->baz : any ->bar : any -} - -class C { ->C : C - - constructor({ bar = {}, ...opts }: Foo = {}) { ->bar : any ->{} : {} ->opts : { baz?: any; } ->{} : {} - - "use strict"; ->"use strict" : "use strict" - - "Some other prologue"; ->"Some other prologue" : "Some other prologue" - - opts.baz(bar); ->opts.baz(bar) : any ->opts.baz : any ->opts : { baz?: any; } ->baz : any ->bar : any - } -} - diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt new file mode 100644 index 0000000000..71451c8ef6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt @@ -0,0 +1,23 @@ +c:/root/tsconfig.json(5,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== c:/root/tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "paths": { + "*": [ + "*", + ~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + "generated/*" + ~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + ] + } + } + } + +==== c:/root/f1.ts (0 errors) ==== + export var x = 1; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt.diff deleted file mode 100644 index 3bc83332d3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.pathMappingBasedModuleResolution1_node.errors.txt -+++ new.pathMappingBasedModuleResolution1_node.errors.txt -@@= skipped -0, +0 lines =@@ --c:/root/tsconfig.json(5,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? --c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -- -- --==== c:/root/tsconfig.json (2 errors) ==== -- { -- "compilerOptions": { -- "paths": { -- "*": [ -- "*", -- ~~~ --!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -- "generated/*" -- ~~~~~~~~~~~~~ --!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -- ] -- } -- } -- } -- --==== c:/root/f1.ts (0 errors) ==== -- export var x = 1; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution2_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution2_node.errors.txt new file mode 100644 index 0000000000..a499b9b4a0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution2_node.errors.txt @@ -0,0 +1,28 @@ +root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./src/*"}' instead. +root/tsconfig.json(5,13): error TS5061: Pattern '*1*' can have at most one '*' character. +root/tsconfig.json(5,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. +root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== root/tsconfig.json (4 errors) ==== + { + "compilerOptions": { + "baseUrl": "./src", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./src/*"}' instead. + "paths": { + "*1*": [ "*2*" ] + ~~~~~ +!!! error TS5061: Pattern '*1*' can have at most one '*' character. + ~~~~~ +!!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. + ~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } + +==== root/src/folder1/file1.ts (0 errors) ==== + export var x = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution3_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution3_node.errors.txt index c3b859812e..e0aae7ab26 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution3_node.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution3_node.errors.txt @@ -1,6 +1,8 @@ +error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. c:/root/folder1/file1.ts(1,17): error TS2307: Cannot find module 'folder2/file2' or its corresponding type declarations. +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ==== c:/root/folder1/file1.ts (1 errors) ==== import {x} from "folder2/file2" ~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution4_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution4_node.errors.txt index 3ef6f79cc5..bde3e4db0c 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution4_node.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution4_node.errors.txt @@ -1,10 +1,15 @@ c:/root/folder1/file1.ts(1,17): error TS2307: Cannot find module 'folder2/file2' or its corresponding type declarations. +c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -==== c:/root/tsconfig.json (0 errors) ==== +==== c:/root/tsconfig.json (1 errors) ==== { "compilerOptions": { "baseUrl": "." + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. } } diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution5_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution5_node.errors.txt new file mode 100644 index 0000000000..7a71d71a17 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution5_node.errors.txt @@ -0,0 +1,56 @@ +c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +c:/root/tsconfig.json(7,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== c:/root/tsconfig.json (4 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": [ + "*", + ~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + "generated/*" + ~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + ], + "components/*": [ + "shared/components/*" + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + ] + } + } + } +==== c:/root/folder1/file1.ts (0 errors) ==== + import {x} from "folder2/file1" + import {y} from "folder3/file2" + import {z} from "components/file3" + import {z1} from "file4" + + declare function use(a: any): void; + + use(x.toExponential()); + use(y.toExponential()); + use(z.toExponential()); + use(z1.toExponential()); + +==== c:/root/folder2/file1.ts (0 errors) ==== + export var x = 1; + +==== c:/root/generated/folder3/file2.ts (0 errors) ==== + export var y = 1; + +==== c:/root/shared/components/file3/index.d.ts (0 errors) ==== + export var z: number; + +==== c:/node_modules/file4.ts (0 errors) ==== + export var z1 = 1; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution7_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution7_node.errors.txt index bd20cbad88..545c6df531 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution7_node.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution7_node.errors.txt @@ -1,17 +1,28 @@ c:/root/src/file1.ts(1,17): error TS2307: Cannot find module './project/file2' or its corresponding type declarations. +c:/root/src/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./../*"}' instead. +c:/root/src/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +c:/root/src/tsconfig.json(10,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -==== c:/root/src/tsconfig.json (0 errors) ==== +==== c:/root/src/tsconfig.json (3 errors) ==== { "compilerOptions": { "baseUrl": "../", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./../*"}' instead. "paths": { "*": [ "*", + ~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? "c:/shared/*" ], "templates/*": [ "generated/src/templates/*" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ] }, "rootDirs": [ diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution8_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution8_node.errors.txt new file mode 100644 index 0000000000..b16dec3b31 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution8_node.errors.txt @@ -0,0 +1,28 @@ +c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +c:/root/tsconfig.json(6,16): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== c:/root/tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "@speedy/*/testing": [ + "*/dist/index.ts" + ~~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + ] + } + } + } + +==== c:/root/index.ts (0 errors) ==== + import {x} from "@speedy/folder1/testing" + +==== c:/root/folder1/dist/index.ts (0 errors) ==== + export const x = 1 + 2; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot.errors.txt new file mode 100644 index 0000000000..8743964ce2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot.errors.txt @@ -0,0 +1,29 @@ +/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== /root/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "/*": ["./src/*"] + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /root/src/foo.ts (0 errors) ==== + export function foo() {} + +==== /root/src/bar.js (0 errors) ==== + export function bar() {} + +==== /root/a.ts (0 errors) ==== + import { foo } from "/foo"; + import { bar } from "/bar"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.errors.txt new file mode 100644 index 0000000000..b5999d3b8b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.errors.txt @@ -0,0 +1,53 @@ +/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== /root/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "/*": ["./src/*"], + "c:/*": ["./src/*"], + "c:\\*": ["./src/*"], + "//server/*": ["./src/*"], + "\\\\server\\*": ["./src/*"], + "file:///*": ["./src/*"], + "file://c:/*": ["./src/*"], + "file://server/*": ["./src/*"], + "http://server/*": ["./src/*"] + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /root/src/foo.ts (0 errors) ==== + export function foo() {} + +==== /root/src/bar.js (0 errors) ==== + export function bar() {} + +==== /root/a.ts (0 errors) ==== + import { foo as foo1 } from "/foo"; + import { bar as bar1 } from "/bar"; + import { foo as foo2 } from "c:/foo"; + import { bar as bar2 } from "c:/bar"; + import { foo as foo3 } from "c:\\foo"; + import { bar as bar3 } from "c:\\bar"; + import { foo as foo4 } from "//server/foo"; + import { bar as bar4 } from "//server/bar"; + import { foo as foo5 } from "\\\\server\\foo"; + import { bar as bar5 } from "\\\\server\\bar"; + import { foo as foo6 } from "file:///foo"; + import { bar as bar6 } from "file:///bar"; + import { foo as foo7 } from "file://c:/foo"; + import { bar as bar7 } from "file://c:/bar"; + import { foo as foo8 } from "file://server/foo"; + import { bar as bar8 } from "file://server/bar"; + import { foo as foo9 } from "http://server/foo"; + import { bar as bar9 } from "http://server/bar"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.errors.txt new file mode 100644 index 0000000000..e498574f2f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.errors.txt @@ -0,0 +1,30 @@ +/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== /root/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "/client/*": ["./client/*"], + "/import/*": ["./import/*"] + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /root/import/foo.ts (0 errors) ==== + export function foo() {} + +==== /root/client/bar.js (0 errors) ==== + export function bar() {} + +==== /root/src/a.ts (0 errors) ==== + import { foo } from "/import/foo"; + import { bar } from "/client/bar"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.errors.txt new file mode 100644 index 0000000000..42b299fb62 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.errors.txt @@ -0,0 +1,29 @@ +/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== /root/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "/*": ["./src/*"] + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /root/a.ts (0 errors) ==== + import { foo } from "/foo"; + import { bar } from "/bar"; + +==== /foo.ts (0 errors) ==== + export function foo() {} + +==== /bar.js (0 errors) ==== + export function bar() {} + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.errors.txt new file mode 100644 index 0000000000..27f6176dd9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.errors.txt @@ -0,0 +1,29 @@ +/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== /root/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": ["./src/*"] + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /root/src/foo.ts (0 errors) ==== + export function foo() {} + +==== /root/src/bar.js (0 errors) ==== + export function bar() {} + +==== /root/a.ts (0 errors) ==== + import { foo } from "/foo"; + import { bar } from "/bar"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.errors.txt new file mode 100644 index 0000000000..71f1871688 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.errors.txt @@ -0,0 +1,29 @@ +/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. + + +==== /root/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": ["./src/*"] + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /root/a.ts (0 errors) ==== + import { foo } from "/foo"; + import { bar } from "/bar"; + +==== /foo.ts (0 errors) ==== + export function foo() {} + +==== /bar.js (0 errors) ==== + export function bar() {} + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt new file mode 100644 index 0000000000..7552d2f697 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt @@ -0,0 +1,36 @@ +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(6,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "foo": ["foo/foo.ts"], + ~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + "bar": ["bar/bar.js"] + ~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /foo/foo.ts (0 errors) ==== + export function foo() {} + +==== /bar/bar.js (0 errors) ==== + export function bar() {} + +==== /a.ts (0 errors) ==== + import { foo } from "foo"; + import { bar } from "bar"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt new file mode 100644 index 0000000000..a640ae3f88 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt @@ -0,0 +1,30 @@ +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== /tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": ["foo/*"] + ~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } + +==== /foo/zone.js/index.d.ts (0 errors) ==== + export const x: number; + +==== /foo/zone.tsx/index.d.ts (0 errors) ==== + export const y: number; + +==== /a.ts (0 errors) ==== + import { x } from "zone.js"; + import { y } from "zone.tsx"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt new file mode 100644 index 0000000000..eda8bd3ea4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt @@ -0,0 +1,31 @@ +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": ["node_modules/*", "src/types"] + ~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + ~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /a.ts (0 errors) ==== + import foobar from "foo/bar/foobar.js"; + +==== /node_modules/foo/bar/foobar.js (0 errors) ==== + module.exports = { a: 10 }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt index 5bbf4b220f..ab802b15c9 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt @@ -1,12 +1,20 @@ /a.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -==== /tsconfig.json (0 errors) ==== +==== /tsconfig.json (2 errors) ==== { "compilerOptions": { "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. "paths": { "foo": ["foo/foo.ts"] + ~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? } } } diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingInheritedBaseUrl.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingInheritedBaseUrl.errors.txt index 90fcd2e6d0..1d51bf63d8 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingInheritedBaseUrl.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingInheritedBaseUrl.errors.txt @@ -1,10 +1,15 @@ /project/index.ts(1,20): error TS2307: Cannot find module 'p1' or its corresponding type declarations. +/project/tsconfig.json(3,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "../other/*"}' instead. -==== /project/tsconfig.json (0 errors) ==== +==== /project/tsconfig.json (1 errors) ==== { "extends": "../other/tsconfig.base.json", "compilerOptions": { + ~~~~~~~~~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "../other/*"}' instead. "module": "commonjs", "paths": { "p1": ["./lib/p1"] diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation1.errors.txt b/testdata/baselines/reference/submodule/compiler/pathsValidation1.errors.txt new file mode 100644 index 0000000000..2db55c147e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathsValidation1.errors.txt @@ -0,0 +1,21 @@ +tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +tsconfig.json(5,18): error TS5063: Substitutions for pattern '*' should be an array. + + +==== tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": "*" + ~~~ +!!! error TS5063: Substitutions for pattern '*' should be an array. + } + } + } +==== a.ts (0 errors) ==== + let x = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation2.errors.txt b/testdata/baselines/reference/submodule/compiler/pathsValidation2.errors.txt new file mode 100644 index 0000000000..9e39146752 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathsValidation2.errors.txt @@ -0,0 +1,21 @@ +tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +tsconfig.json(5,18): error TS5066: Substitutions for pattern '*' shouldn't be an empty array. + + +==== tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": [1] + ~~~ +!!! error TS5066: Substitutions for pattern '*' shouldn't be an empty array. + } + } + } +==== a.ts (0 errors) ==== + let x = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation3.errors.txt b/testdata/baselines/reference/submodule/compiler/pathsValidation3.errors.txt new file mode 100644 index 0000000000..2fdc2e6221 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathsValidation3.errors.txt @@ -0,0 +1,22 @@ +tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +tsconfig.json(5,20): error TS5066: Substitutions for pattern 'foo' shouldn't be an empty array. + + +==== tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "foo": [] + ~~ +!!! error TS5066: Substitutions for pattern 'foo' shouldn't be an empty array. + } + } + } + +==== a.ts (0 errors) ==== + let x = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation4.errors.txt b/testdata/baselines/reference/submodule/compiler/pathsValidation4.errors.txt new file mode 100644 index 0000000000..e59f6a37b5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathsValidation4.errors.txt @@ -0,0 +1,34 @@ +tsconfig.json(4,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./src/*"}' instead. +tsconfig.json(6,11): error TS5061: Pattern '@interface/**/*' can have at most one '*' character. +tsconfig.json(7,11): error TS5061: Pattern '@service/**/*' can have at most one '*' character. +tsconfig.json(7,29): error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. +tsconfig.json(8,29): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== tsconfig.json (5 errors) ==== + { + "compilerOptions": { + "traceResolution": true, + "baseUrl": "./src", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./src/*"}' instead. + "paths": { + "@interface/**/*" : ["./src/interface/*"], + ~~~~~~~~~~~~~~~~~ +!!! error TS5061: Pattern '@interface/**/*' can have at most one '*' character. + "@service/**/*": ["./src/service/**/*"], + ~~~~~~~~~~~~~~~ +!!! error TS5061: Pattern '@service/**/*' can have at most one '*' character. + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. + "@controller/*": ["controller/*"], + ~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } + +==== src/main.ts (0 errors) ==== + import 'someModule'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt b/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt new file mode 100644 index 0000000000..80eaf2d68f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt @@ -0,0 +1,25 @@ +tsconfig.json(5,26): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +tsconfig.json(6,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +tsconfig.json(7,23): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== tsconfig.json (3 errors) ==== + { + "compilerOptions": { + "traceResolution": true, + "paths": { + "@interface/*": ["src/interface/*"], + ~~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + "@blah": ["blah"], + ~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + "@humbug/*": ["*/generated"] + ~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } + +==== src/main.ts (0 errors) ==== + import 'someModule'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt.diff deleted file mode 100644 index 1f58bb8c48..0000000000 --- a/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.pathsValidation5.errors.txt -+++ new.pathsValidation5.errors.txt -@@= skipped -0, +0 lines =@@ --tsconfig.json(5,26): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? --tsconfig.json(6,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? --tsconfig.json(7,23): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -- -- --==== tsconfig.json (3 errors) ==== -- { -- "compilerOptions": { -- "traceResolution": true, -- "paths": { -- "@interface/*": ["src/interface/*"], -- ~~~~~~~~~~~~~~~~~ --!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -- "@blah": ["blah"], -- ~~~~~~ --!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -- "@humbug/*": ["*/generated"] -- ~~~~~~~~~~~~~ --!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -- } -- } -- } -- --==== src/main.ts (0 errors) ==== -- import 'someModule'; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/reactNamespaceInvalidInput.errors.txt b/testdata/baselines/reference/submodule/compiler/reactNamespaceInvalidInput.errors.txt index 2ce93288dc..6b902d4778 100644 --- a/testdata/baselines/reference/submodule/compiler/reactNamespaceInvalidInput.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/reactNamespaceInvalidInput.errors.txt @@ -1,6 +1,8 @@ +error TS5059: Invalid value for '--reactNamespace'. 'my-React-Lib' is not a valid identifier. reactNamespaceInvalidInput.tsx(1,2): error TS2874: This JSX tag requires 'my-React-Lib' to be in scope, but it could not be found. +!!! error TS5059: Invalid value for '--reactNamespace'. 'my-React-Lib' is not a valid identifier. ==== reactNamespaceInvalidInput.tsx (1 errors) ==== ; ~~~ diff --git a/testdata/baselines/reference/submodule/compiler/reactNamespaceInvalidInput.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/reactNamespaceInvalidInput.errors.txt.diff deleted file mode 100644 index 23bc79adc8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/reactNamespaceInvalidInput.errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.reactNamespaceInvalidInput.errors.txt -+++ new.reactNamespaceInvalidInput.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5059: Invalid value for '--reactNamespace'. 'my-React-Lib' is not a valid identifier. - reactNamespaceInvalidInput.tsx(1,2): error TS2874: This JSX tag requires 'my-React-Lib' to be in scope, but it could not be found. - - --!!! error TS5059: Invalid value for '--reactNamespace'. 'my-React-Lib' is not a valid identifier. - ==== reactNamespaceInvalidInput.tsx (1 errors) ==== - ; - ~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/regexpExecAndMatchTypeUsages(strict=false).errors.txt b/testdata/baselines/reference/submodule/compiler/regexpExecAndMatchTypeUsages(strict=false).errors.txt index 917de896c4..7d3eedc0e5 100644 --- a/testdata/baselines/reference/submodule/compiler/regexpExecAndMatchTypeUsages(strict=false).errors.txt +++ b/testdata/baselines/reference/submodule/compiler/regexpExecAndMatchTypeUsages(strict=false).errors.txt @@ -1,7 +1,9 @@ +error TS5052: Option 'exactOptionalPropertyTypes' cannot be specified without specifying option 'strictNullChecks'. regexpExecAndMatchTypeUsages.ts(20,9): error TS2322: Type 'RegExpMatchArray' is not assignable to type 'RegExpExecArray'. Property 'index' is optional in type 'RegExpMatchArray' but required in type 'RegExpExecArray'. +!!! error TS5052: Option 'exactOptionalPropertyTypes' cannot be specified without specifying option 'strictNullChecks'. ==== regexpExecAndMatchTypeUsages.ts (1 errors) ==== export function foo(matchResult: RegExpMatchArray, execResult: RegExpExecArray) { matchResult[0].length; diff --git a/testdata/baselines/reference/submodule/compiler/regexpExecAndMatchTypeUsages(strict=false).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/regexpExecAndMatchTypeUsages(strict=false).errors.txt.diff deleted file mode 100644 index bbc1b7128c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/regexpExecAndMatchTypeUsages(strict=false).errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.regexpExecAndMatchTypeUsages(strict=false).errors.txt -+++ new.regexpExecAndMatchTypeUsages(strict=false).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5052: Option 'exactOptionalPropertyTypes' cannot be specified without specifying option 'strictNullChecks'. - regexpExecAndMatchTypeUsages.ts(20,9): error TS2322: Type 'RegExpMatchArray' is not assignable to type 'RegExpExecArray'. - Property 'index' is optional in type 'RegExpMatchArray' but required in type 'RegExpExecArray'. - - --!!! error TS5052: Option 'exactOptionalPropertyTypes' cannot be specified without specifying option 'strictNullChecks'. - ==== regexpExecAndMatchTypeUsages.ts (1 errors) ==== - export function foo(matchResult: RegExpMatchArray, execResult: RegExpExecArray) { - matchResult[0].length; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt index de95af399d..1db6a5a074 100644 --- a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt @@ -1,12 +1,23 @@ /a.ts(1,20): error TS2732: Cannot find module 'foo/bar/foobar.json'. Consider using '--resolveJsonModule' to import module with '.json' extension. +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -==== /tsconfig.json (0 errors) ==== +==== /tsconfig.json (3 errors) ==== { "compilerOptions": { "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. "paths": { "*": ["node_modules/*", "src/types"] + ~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + ~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? }, "allowJs": true, "outDir": "bin" diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFile_PathMapping.errors.txt b/testdata/baselines/reference/submodule/compiler/requireOfJsonFile_PathMapping.errors.txt new file mode 100644 index 0000000000..118ec09fbd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/requireOfJsonFile_PathMapping.errors.txt @@ -0,0 +1,31 @@ +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. +/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", + ~~~~~~~~~ +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": ["node_modules/*", "src/types"] + ~~~~~~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + ~~~~~~~~~~~ +!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + }, + "allowJs": true, + "outDir": "bin" + } + } + +==== /a.ts (0 errors) ==== + import foobar from "foo/bar/foobar.json"; + +==== /node_modules/foo/bar/foobar.json (0 errors) ==== + { "a": 10 } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/signaturesUseJSDocForOptionalParameters.errors.txt b/testdata/baselines/reference/submodule/compiler/signaturesUseJSDocForOptionalParameters.errors.txt new file mode 100644 index 0000000000..ea595a3390 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/signaturesUseJSDocForOptionalParameters.errors.txt @@ -0,0 +1,24 @@ +error TS5055: Cannot write file 'jsDocOptionality.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'jsDocOptionality.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== jsDocOptionality.js (0 errors) ==== + function MyClass() { + this.prop = null; + } + /** + * @param {string} required + * @param {string} [notRequired] + * @returns {MyClass} + */ + MyClass.prototype.optionalParam = function(required, notRequired) { + return this; + }; + let pInst = new MyClass(); + let c1 = pInst.optionalParam('hello') + let c2 = pInst.optionalParam('hello', null) + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.errors.txt b/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.errors.txt new file mode 100644 index 0000000000..fed15e5aea --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.errors.txt @@ -0,0 +1,14 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== testFiles/app.ts (0 errors) ==== + // Note in the out result we are using same folder name only different in casing + // Since this is case sensitive, the folders are different and hence the relative paths in sourcemap shouldn't be just app.ts or app2.ts + class c { + } + +==== testFiles/app2.ts (0 errors) ==== + class d { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.js.map b/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.js.map deleted file mode 100644 index 368531d6aa..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [app.js.map] -{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI,MAAM,CAAC;CACN"} -//// [app2.js.map] -{"version":3,"file":"app2.js","sourceRoot":"","sources":["app2.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CACN"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.js.map.diff b/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.js.map.diff deleted file mode 100644 index b490322cff..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.js.map.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- old.sourceMapWithCaseSensitiveFileNames.js.map -+++ new.sourceMapWithCaseSensitiveFileNames.js.map -@@= skipped -0, +0 lines =@@ --//// [fooResult.js.map] --{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["../testFiles/app.ts","../testFiles/app2.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI,MAAM,CAAC;CACN;ACHD,MAAM,CAAC;CACN"} -+//// [app.js.map] -+{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI,MAAM,CAAC;CACN"} -+//// [app2.js.map] -+{"version":3,"file":"app2.js","sourceRoot":"","sources":["app2.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CACN"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.sourcemap.txt deleted file mode 100644 index 61f28a665f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.sourcemap.txt +++ /dev/null @@ -1,76 +0,0 @@ -=================================================================== -JsFile: app.js -mapUrl: app.js.map -sourceRoot: -sources: app.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:testFiles/app.js -sourceFile:app.ts -------------------------------------------------------------------- ->>>// Note in the out result we are using same folder name only different in casing -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > -2 >// Note in the out result we are using same folder name only different in casing -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 81) Source(1, 81) + SourceIndex(0) ---- ->>>// Since this is case sensitive, the folders are different and hence the relative paths in sourcemap shouldn't be just app.ts or app2.ts -1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1-> - > -2 >// Since this is case sensitive, the folders are different and hence the relative paths in sourcemap shouldn't be just app.ts or app2.ts -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 137) Source(2, 137) + SourceIndex(0) ---- ->>>class c { -1 > -2 >^^^^^^ -3 > ^ -1 > - > -2 >class -3 > c -1 >Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 7) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 8) Source(3, 8) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { - >} -1 >Emitted(4, 2) Source(4, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=app.js.map=================================================================== -JsFile: app2.js -mapUrl: app2.js.map -sourceRoot: -sources: app2.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:testFiles/app2.js -sourceFile:app2.ts -------------------------------------------------------------------- ->>>class d { -1 > -2 >^^^^^^ -3 > ^ -1 > -2 >class -3 > d -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { - >} -1 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=app2.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.sourcemap.txt.diff deleted file mode 100644 index e6516efe31..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNames.sourcemap.txt.diff +++ /dev/null @@ -1,69 +0,0 @@ ---- old.sourceMapWithCaseSensitiveFileNames.sourcemap.txt -+++ new.sourceMapWithCaseSensitiveFileNames.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: fooResult.js --mapUrl: fooResult.js.map -+JsFile: app.js -+mapUrl: app.js.map - sourceRoot: --sources: ../testFiles/app.ts,../testFiles/app2.ts -+sources: app.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:testfiles/fooResult.js --sourceFile:../testFiles/app.ts -+emittedFile:testFiles/app.js -+sourceFile:app.ts - ------------------------------------------------------------------- - >>>// Note in the out result we are using same folder name only different in casing - 1 > -@@= skipped -39, +39 lines =@@ - --- - >>>} - 1 >^ --2 > ^^^^^^^^^-> -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > { - >} - 1 >Emitted(4, 2) Source(4, 2) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=app.js.map=================================================================== -+JsFile: app2.js -+mapUrl: app2.js.map -+sourceRoot: -+sources: app2.ts -+=================================================================== - ------------------------------------------------------------------- --emittedFile:testfiles/fooResult.js --sourceFile:../testFiles/app2.ts -+emittedFile:testFiles/app2.js -+sourceFile:app2.ts - ------------------------------------------------------------------- - >>>class d { --1-> -+1 > - 2 >^^^^^^ - 3 > ^ --1-> -+1 > - 2 >class - 3 > d --1->Emitted(5, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(5, 7) Source(1, 7) + SourceIndex(1) --3 >Emitted(5, 8) Source(1, 8) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -+3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) - --- - >>>} - 1 >^ --2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > { - >} --1 >Emitted(6, 2) Source(2, 2) + SourceIndex(1) -+1 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) - --- -->>>//# sourceMappingURL=fooResult.js.map -+>>>//# sourceMappingURL=app2.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.errors.txt b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.errors.txt new file mode 100644 index 0000000000..06b9e85842 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.errors.txt @@ -0,0 +1,22 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== b.ts (0 errors) ==== + /*-------------------------------------------------------------------------- + Copyright + ---------------------------------------------------------------------------*/ + + /// + var y = x; + +==== a.ts (0 errors) ==== + /*-------------------------------------------------------------------------- + Copyright + ---------------------------------------------------------------------------*/ + + var x = { + a: 10, + b: 20 + }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.js.map b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.js.map deleted file mode 100644 index 6115a07e33..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA;;6EAE6E;AAE7E,IAAI,CAAC,GAAG;IACJ,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;CACR,CAAC"} -//// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA;;6EAE6E;AAE7E,2BAA2B;AAC3B,IAAI,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.js.map.diff b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.js.map.diff deleted file mode 100644 index b768c21a24..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.js.map.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- old.sourceMapWithMultipleFilesWithCopyright.js.map -+++ new.sourceMapWithMultipleFilesWithCopyright.js.map -@@= skipped -0, +0 lines =@@ - //// [a.js.map] --{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA;;6EAE6E;AAE7E,IAAI,CAAC,GAAG;IACJ,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;CACR,CAAC;ACPF;;6EAE6E;AAE7E,2BAA2B;AAC3B,IAAI,CAAC,GAAG,CAAC,CAAC"} --//// https://sokra.github.io/source-map-visualization#base64,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KQ29weXJpZ2h0DQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLw0KdmFyIHggPSB7DQogICAgYTogMTAsDQogICAgYjogMjANCn07DQovKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQpDb3B5cmlnaHQNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovDQovLy88cmVmZXJlbmNlIHBhdGg9ImEudHMiLz4NCnZhciB5ID0geDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWEuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs2RUFFNkU7QUFFN0UsSUFBSSxDQUFDLEdBQUc7SUFDSixDQUFDLEVBQUUsRUFBRTtJQUNMLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQztBQ1BGOzs2RUFFNkU7QUFFN0UsMkJBQTJCO0FBQzNCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyJ9,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpDb3B5cmlnaHQgCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCgp2YXIgeCA9IHsKICAgIGE6IDEwLAogICAgYjogMjAKfTsK,LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpDb3B5cmlnaHQgCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCgovLy88cmVmZXJlbmNlIHBhdGg9ImEudHMiLz4KdmFyIHkgPSB4Owo= -+{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA;;6EAE6E;AAE7E,IAAI,CAAC,GAAG;IACJ,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;CACR,CAAC"} -+//// [b.js.map] -+{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA;;6EAE6E;AAE7E,2BAA2B;AAC3B,IAAI,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.sourcemap.txt deleted file mode 100644 index 20445d456b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.sourcemap.txt +++ /dev/null @@ -1,139 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: a.js.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>/*-------------------------------------------------------------------------- -1 > -2 >^^^^^^^^^^-> -1 > -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) ---- ->>>Copyright ->>>---------------------------------------------------------------------------*/ -1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1->/*-------------------------------------------------------------------------- - >Copyright - >---------------------------------------------------------------------------*/ -1->Emitted(3, 78) Source(3, 78) + SourceIndex(0) ---- ->>>var x = { -1 > -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^^^-> -1 > - > - > -2 >var -3 > x -4 > = -1 >Emitted(4, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(5, 5) + SourceIndex(0) -3 >Emitted(4, 6) Source(5, 6) + SourceIndex(0) -4 >Emitted(4, 9) Source(5, 9) + SourceIndex(0) ---- ->>> a: 10, -1->^^^^ -2 > ^ -3 > ^^ -4 > ^^ -5 > ^-> -1->{ - > -2 > a -3 > : -4 > 10 -1->Emitted(5, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(5, 6) Source(6, 6) + SourceIndex(0) -3 >Emitted(5, 8) Source(6, 8) + SourceIndex(0) -4 >Emitted(5, 10) Source(6, 10) + SourceIndex(0) ---- ->>> b: 20 -1->^^^^ -2 > ^ -3 > ^^ -4 > ^^ -1->, - > -2 > b -3 > : -4 > 20 -1->Emitted(6, 5) Source(7, 5) + SourceIndex(0) -2 >Emitted(6, 6) Source(7, 6) + SourceIndex(0) -3 >Emitted(6, 8) Source(7, 8) + SourceIndex(0) -4 >Emitted(6, 10) Source(7, 10) + SourceIndex(0) ---- ->>>}; -1 >^ -2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >} -2 > ; -1 >Emitted(7, 2) Source(8, 2) + SourceIndex(0) -2 >Emitted(7, 3) Source(8, 3) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js -mapUrl: b.js.map -sourceRoot: -sources: b.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:b.js -sourceFile:b.ts -------------------------------------------------------------------- ->>>/*-------------------------------------------------------------------------- -1 > -2 >^^^^^^^^^^-> -1 > -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) ---- ->>>Copyright ->>>---------------------------------------------------------------------------*/ -1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1->/*-------------------------------------------------------------------------- - >Copyright - >---------------------------------------------------------------------------*/ -1->Emitted(3, 78) Source(3, 78) + SourceIndex(0) ---- ->>>/// -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > - > - > -2 >/// -1 >Emitted(4, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(4, 28) Source(5, 28) + SourceIndex(0) ---- ->>>var y = x; -1 > -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^-> -1 > - > -2 >var -3 > y -4 > = -5 > x -6 > ; -1 >Emitted(5, 1) Source(6, 1) + SourceIndex(0) -2 >Emitted(5, 5) Source(6, 5) + SourceIndex(0) -3 >Emitted(5, 6) Source(6, 6) + SourceIndex(0) -4 >Emitted(5, 9) Source(6, 9) + SourceIndex(0) -5 >Emitted(5, 10) Source(6, 10) + SourceIndex(0) -6 >Emitted(5, 11) Source(6, 11) + SourceIndex(0) ---- ->>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.sourcemap.txt.diff deleted file mode 100644 index a2e7181563..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithCopyright.sourcemap.txt.diff +++ /dev/null @@ -1,84 +0,0 @@ ---- old.sourceMapWithMultipleFilesWithCopyright.sourcemap.txt -+++ new.sourceMapWithMultipleFilesWithCopyright.sourcemap.txt -@@= skipped -1, +1 lines =@@ - JsFile: a.js - mapUrl: a.js.map - sourceRoot: --sources: a.ts,b.ts -+sources: a.ts - =================================================================== - ------------------------------------------------------------------- - emittedFile:a.js -@@= skipped -71, +71 lines =@@ - >>>}; - 1 >^ - 2 > ^ --3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > - >} - 2 > ; - 1 >Emitted(7, 2) Source(8, 2) + SourceIndex(0) - 2 >Emitted(7, 3) Source(8, 3) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=a.js.map=================================================================== -+JsFile: b.js -+mapUrl: b.js.map -+sourceRoot: -+sources: b.ts -+=================================================================== - ------------------------------------------------------------------- --emittedFile:a.js -+emittedFile:b.js - sourceFile:b.ts - ------------------------------------------------------------------- - >>>/*-------------------------------------------------------------------------- --1-> -+1 > - 2 >^^^^^^^^^^-> --1-> --1->Emitted(8, 1) Source(1, 1) + SourceIndex(1) -+1 > -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) - --- - >>>Copyright - >>>---------------------------------------------------------------------------*/ -@@= skipped -23, +29 lines =@@ - 1->/*-------------------------------------------------------------------------- - >Copyright - >---------------------------------------------------------------------------*/ --1->Emitted(10, 78) Source(3, 78) + SourceIndex(1) -+1->Emitted(3, 78) Source(3, 78) + SourceIndex(0) - --- - >>>/// - 1 > -@@= skipped -9, +9 lines =@@ - > - > - 2 >/// --1 >Emitted(11, 1) Source(5, 1) + SourceIndex(1) --2 >Emitted(11, 28) Source(5, 28) + SourceIndex(1) -+1 >Emitted(4, 1) Source(5, 1) + SourceIndex(0) -+2 >Emitted(4, 28) Source(5, 28) + SourceIndex(0) - --- - >>>var y = x; - 1 > -@@= skipped -18, +18 lines =@@ - 4 > = - 5 > x - 6 > ; --1 >Emitted(12, 1) Source(6, 1) + SourceIndex(1) --2 >Emitted(12, 5) Source(6, 5) + SourceIndex(1) --3 >Emitted(12, 6) Source(6, 6) + SourceIndex(1) --4 >Emitted(12, 9) Source(6, 9) + SourceIndex(1) --5 >Emitted(12, 10) Source(6, 10) + SourceIndex(1) --6 >Emitted(12, 11) Source(6, 11) + SourceIndex(1) -+1 >Emitted(5, 1) Source(6, 1) + SourceIndex(0) -+2 >Emitted(5, 5) Source(6, 5) + SourceIndex(0) -+3 >Emitted(5, 6) Source(6, 6) + SourceIndex(0) -+4 >Emitted(5, 9) Source(6, 9) + SourceIndex(0) -+5 >Emitted(5, 10) Source(6, 10) + SourceIndex(0) -+6 >Emitted(5, 11) Source(6, 11) + SourceIndex(0) - --- -->>>//# sourceMappingURL=a.js.map -+>>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.errors.txt b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.errors.txt new file mode 100644 index 0000000000..d70b2c5374 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.errors.txt @@ -0,0 +1,21 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.ts (0 errors) ==== + module M { + export var X = 1; + } + interface Navigator { + getGamepads(func?: any): any; + webkitGetGamepads(func?: any): any + msGetGamepads(func?: any): any; + webkitGamepads(func?: any): any; + } + +==== b.ts (0 errors) ==== + module m1 { + export class c1 { + } + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map deleted file mode 100644 index ea64620e2b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,IAAO,CAEN;AAFD,WAAO,CAAC,EAAC;IACM,GAAC,GAAG,CAAC,CAAC;AAAA,CACpB,EAFM,CAAC,KAAD,CAAC,QAEP"} -//// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,IAAO,EAGN;AAHD,WAAO,EAAE,EAAC;IACN,MAAa,EAAE;KACd;IADY,GAAA,EAAE,KACd,CAAA;AAAA,CACJ,EAHM,EAAE,KAAF,EAAE,QAGR"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map.diff b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map.diff deleted file mode 100644 index f2afe3774c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map -+++ new.sourceMapWithMultipleFilesWithFileEndingWithInterface.js.map -@@= skipped -0, +0 lines =@@ --//// [fooResult.js.map] --{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA,IAAO,CAAC,CAEP;AAFD,WAAO,CAAC;IACO,GAAC,GAAG,CAAC,CAAC;AACrB,CAAC,EAFM,CAAC,KAAD,CAAC,QAEP;ACFD,IAAO,EAAE,CAGR;AAHD,WAAO,EAAE;IACL,MAAa,EAAE;KACd;IADY,KAAE,KACd,CAAA;AACL,CAAC,EAHM,EAAE,KAAF,EAAE,QAGR"} --//// https://sokra.github.io/source-map-visualization#base64,dmFyIE07DQooZnVuY3Rpb24gKE0pIHsNCiAgICBNLlggPSAxOw0KfSkoTSB8fCAoTSA9IHt9KSk7DQp2YXIgbTE7DQooZnVuY3Rpb24gKG0xKSB7DQogICAgY2xhc3MgYzEgew0KICAgIH0NCiAgICBtMS5jMSA9IGMxOw0KfSkobTEgfHwgKG0xID0ge30pKTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWZvb1Jlc3VsdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vUmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyIsImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBTyxDQUFDLENBRVA7QUFGRCxXQUFPLENBQUM7SUFDTyxHQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ3JCLENBQUMsRUFGTSxDQUFDLEtBQUQsQ0FBQyxRQUVQO0FDRkQsSUFBTyxFQUFFLENBR1I7QUFIRCxXQUFPLEVBQUU7SUFDTCxNQUFhLEVBQUU7S0FDZDtJQURZLEtBQUUsS0FDZCxDQUFBO0FBQ0wsQ0FBQyxFQUhNLEVBQUUsS0FBRixFQUFFLFFBR1IifQ==,bW9kdWxlIE0gewogICAgZXhwb3J0IHZhciBYID0gMTsKfQppbnRlcmZhY2UgTmF2aWdhdG9yIHsKICAgIGdldEdhbWVwYWRzKGZ1bmM/OiBhbnkpOiBhbnk7CiAgICB3ZWJraXRHZXRHYW1lcGFkcyhmdW5jPzogYW55KTogYW55CiAgICBtc0dldEdhbWVwYWRzKGZ1bmM/OiBhbnkpOiBhbnk7CiAgICB3ZWJraXRHYW1lcGFkcyhmdW5jPzogYW55KTogYW55Owp9Cg==,bW9kdWxlIG0xIHsKICAgIGV4cG9ydCBjbGFzcyBjMSB7CiAgICB9Cn0K -+//// [a.js.map] -+{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,IAAO,CAEN;AAFD,WAAO,CAAC,EAAC;IACM,GAAC,GAAG,CAAC,CAAC;AAAA,CACpB,EAFM,CAAC,KAAD,CAAC,QAEP"} -+//// [b.js.map] -+{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,IAAO,EAGN;AAHD,WAAO,EAAE,EAAC;IACN,MAAa,EAAE;KACd;IADY,GAAA,EAAE,KACd,CAAA;AAAA,CACJ,EAHM,EAAE,KAAF,EAAE,QAGR"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt deleted file mode 100644 index 6df95f82a9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt +++ /dev/null @@ -1,190 +0,0 @@ -=================================================================== -JsFile: a.js -mapUrl: a.js.map -sourceRoot: -sources: a.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:a.js -sourceFile:a.ts -------------------------------------------------------------------- ->>>var M; -1 > -2 >^^^^ -3 > ^ -4 > ^^^^^^^^^^^-> -1 > -2 >module -3 > M { - > export var X = 1; - > } -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 6) Source(3, 2) + SourceIndex(0) ---- ->>>(function (M) { -1-> -2 >^^^^^^^^^^^ -3 > ^ -4 > ^^ -1-> -2 >module -3 > M -4 > -1->Emitted(2, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) -3 >Emitted(2, 13) Source(1, 9) + SourceIndex(0) -4 >Emitted(2, 15) Source(1, 10) + SourceIndex(0) ---- ->>> M.X = 1; -1 >^^^^ -2 > ^^^ -3 > ^^^ -4 > ^ -5 > ^ -6 > ^^^^^^^-> -1 >{ - > export var -2 > X -3 > = -4 > 1 -5 > ; -1 >Emitted(3, 5) Source(2, 16) + SourceIndex(0) -2 >Emitted(3, 8) Source(2, 17) + SourceIndex(0) -3 >Emitted(3, 11) Source(2, 20) + SourceIndex(0) -4 >Emitted(3, 12) Source(2, 21) + SourceIndex(0) -5 >Emitted(3, 13) Source(2, 22) + SourceIndex(0) ---- ->>>})(M || (M = {})); -1-> -2 >^ -3 > ^^ -4 > ^ -5 > ^^^^^ -6 > ^ -7 > ^^^^^^^^ -8 > ^^^^^^^^^^-> -1-> -2 > - >} -3 > -4 > M -5 > -6 > M -7 > { - > export var X = 1; - > } -1->Emitted(4, 1) Source(2, 22) + SourceIndex(0) -2 >Emitted(4, 2) Source(3, 2) + SourceIndex(0) -3 >Emitted(4, 4) Source(1, 8) + SourceIndex(0) -4 >Emitted(4, 5) Source(1, 9) + SourceIndex(0) -5 >Emitted(4, 10) Source(1, 8) + SourceIndex(0) -6 >Emitted(4, 11) Source(1, 9) + SourceIndex(0) -7 >Emitted(4, 19) Source(3, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=a.js.map=================================================================== -JsFile: b.js -mapUrl: b.js.map -sourceRoot: -sources: b.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:b.js -sourceFile:b.ts -------------------------------------------------------------------- ->>>var m1; -1 > -2 >^^^^ -3 > ^^ -4 > ^^^^^^^^^^^-> -1 > -2 >module -3 > m1 { - > export class c1 { - > } - > } -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 7) Source(4, 2) + SourceIndex(0) ---- ->>>(function (m1) { -1-> -2 >^^^^^^^^^^^ -3 > ^^ -4 > ^^ -1-> -2 >module -3 > m1 -4 > -1->Emitted(2, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) -3 >Emitted(2, 14) Source(1, 10) + SourceIndex(0) -4 >Emitted(2, 16) Source(1, 11) + SourceIndex(0) ---- ->>> class c1 { -1 >^^^^ -2 > ^^^^^^ -3 > ^^ -1 >{ - > -2 > export class -3 > c1 -1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0) -2 >Emitted(3, 11) Source(2, 18) + SourceIndex(0) -3 >Emitted(3, 13) Source(2, 20) + SourceIndex(0) ---- ->>> } -1 >^^^^^ -2 > ^^^^^^^^^^^-> -1 > { - > } -1 >Emitted(4, 6) Source(3, 6) + SourceIndex(0) ---- ->>> m1.c1 = c1; -1->^^^^ -2 > ^^^ -3 > ^^ -4 > ^^^^^ -5 > ^ -6 > ^^^^^^-> -1-> -2 > -3 > c1 -4 > { - > } -5 > -1->Emitted(5, 5) Source(2, 18) + SourceIndex(0) -2 >Emitted(5, 8) Source(2, 18) + SourceIndex(0) -3 >Emitted(5, 10) Source(2, 20) + SourceIndex(0) -4 >Emitted(5, 15) Source(3, 6) + SourceIndex(0) -5 >Emitted(5, 16) Source(3, 6) + SourceIndex(0) ---- ->>>})(m1 || (m1 = {})); -1-> -2 >^ -3 > ^^ -4 > ^^ -5 > ^^^^^ -6 > ^^ -7 > ^^^^^^^^ -8 > ^^^^^^^^-> -1-> -2 > - >} -3 > -4 > m1 -5 > -6 > m1 -7 > { - > export class c1 { - > } - > } -1->Emitted(6, 1) Source(3, 6) + SourceIndex(0) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) -3 >Emitted(6, 4) Source(1, 8) + SourceIndex(0) -4 >Emitted(6, 6) Source(1, 10) + SourceIndex(0) -5 >Emitted(6, 11) Source(1, 8) + SourceIndex(0) -6 >Emitted(6, 13) Source(1, 10) + SourceIndex(0) -7 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt.diff deleted file mode 100644 index 9ae89c9b17..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt.diff +++ /dev/null @@ -1,247 +0,0 @@ ---- old.sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt -+++ new.sourceMapWithMultipleFilesWithFileEndingWithInterface.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: fooResult.js --mapUrl: fooResult.js.map -+JsFile: a.js -+mapUrl: a.js.map - sourceRoot: --sources: a.ts,b.ts -+sources: a.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:fooResult.js -+emittedFile:a.js - sourceFile:a.ts - ------------------------------------------------------------------- - >>>var M; - 1 > - 2 >^^^^ - 3 > ^ --4 > ^ --5 > ^^^^^^^^^^-> -+4 > ^^^^^^^^^^^-> - 1 > - 2 >module --3 > M --4 > { -- > export var X = 1; -- > } -+3 > M { -+ > export var X = 1; -+ > } - 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) - 2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) --3 >Emitted(1, 6) Source(1, 9) + SourceIndex(0) --4 >Emitted(1, 7) Source(3, 2) + SourceIndex(0) -+3 >Emitted(1, 6) Source(3, 2) + SourceIndex(0) - --- - >>>(function (M) { - 1-> - 2 >^^^^^^^^^^^ - 3 > ^ --4 > ^-> -+4 > ^^ - 1-> - 2 >module - 3 > M -+4 > - 1->Emitted(2, 1) Source(1, 1) + SourceIndex(0) - 2 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) - 3 >Emitted(2, 13) Source(1, 9) + SourceIndex(0) -+4 >Emitted(2, 15) Source(1, 10) + SourceIndex(0) - --- - >>> M.X = 1; --1->^^^^ -+1 >^^^^ - 2 > ^^^ - 3 > ^^^ - 4 > ^ - 5 > ^ - 6 > ^^^^^^^-> --1-> { -+1 >{ - > export var - 2 > X - 3 > = - 4 > 1 - 5 > ; --1->Emitted(3, 5) Source(2, 16) + SourceIndex(0) -+1 >Emitted(3, 5) Source(2, 16) + SourceIndex(0) - 2 >Emitted(3, 8) Source(2, 17) + SourceIndex(0) - 3 >Emitted(3, 11) Source(2, 20) + SourceIndex(0) - 4 >Emitted(3, 12) Source(2, 21) + SourceIndex(0) -@@= skipped -63, +62 lines =@@ - 5 > ^^^^^ - 6 > ^ - 7 > ^^^^^^^^ -+8 > ^^^^^^^^^^-> - 1-> -- > --2 >} -+2 > -+ >} - 3 > - 4 > M - 5 > -@@= skipped -10, +11 lines =@@ - 7 > { - > export var X = 1; - > } --1->Emitted(4, 1) Source(3, 1) + SourceIndex(0) -+1->Emitted(4, 1) Source(2, 22) + SourceIndex(0) - 2 >Emitted(4, 2) Source(3, 2) + SourceIndex(0) - 3 >Emitted(4, 4) Source(1, 8) + SourceIndex(0) - 4 >Emitted(4, 5) Source(1, 9) + SourceIndex(0) -@@= skipped -8, +8 lines =@@ - 6 >Emitted(4, 11) Source(1, 9) + SourceIndex(0) - 7 >Emitted(4, 19) Source(3, 2) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=a.js.map=================================================================== -+JsFile: b.js -+mapUrl: b.js.map -+sourceRoot: -+sources: b.ts -+=================================================================== - ------------------------------------------------------------------- --emittedFile:fooResult.js -+emittedFile:b.js - sourceFile:b.ts - ------------------------------------------------------------------- - >>>var m1; - 1 > - 2 >^^^^ - 3 > ^^ --4 > ^ --5 > ^^^^^^^^^^-> -+4 > ^^^^^^^^^^^-> - 1 > - 2 >module --3 > m1 --4 > { -- > export class c1 { -- > } -- > } --1 >Emitted(5, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(5, 5) Source(1, 8) + SourceIndex(1) --3 >Emitted(5, 7) Source(1, 10) + SourceIndex(1) --4 >Emitted(5, 8) Source(4, 2) + SourceIndex(1) -+3 > m1 { -+ > export class c1 { -+ > } -+ > } -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 5) Source(1, 8) + SourceIndex(0) -+3 >Emitted(1, 7) Source(4, 2) + SourceIndex(0) - --- - >>>(function (m1) { - 1-> - 2 >^^^^^^^^^^^ - 3 > ^^ --4 > ^^-> -+4 > ^^ - 1-> - 2 >module - 3 > m1 --1->Emitted(6, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(6, 12) Source(1, 8) + SourceIndex(1) --3 >Emitted(6, 14) Source(1, 10) + SourceIndex(1) -+4 > -+1->Emitted(2, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) -+3 >Emitted(2, 14) Source(1, 10) + SourceIndex(0) -+4 >Emitted(2, 16) Source(1, 11) + SourceIndex(0) - --- - >>> class c1 { --1->^^^^ -+1 >^^^^ - 2 > ^^^^^^ - 3 > ^^ --1-> { -+1 >{ - > - 2 > export class - 3 > c1 --1->Emitted(7, 5) Source(2, 5) + SourceIndex(1) --2 >Emitted(7, 11) Source(2, 18) + SourceIndex(1) --3 >Emitted(7, 13) Source(2, 20) + SourceIndex(1) -+1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0) -+2 >Emitted(3, 11) Source(2, 18) + SourceIndex(0) -+3 >Emitted(3, 13) Source(2, 20) + SourceIndex(0) - --- - >>> } - 1 >^^^^^ - 2 > ^^^^^^^^^^^-> - 1 > { - > } --1 >Emitted(8, 6) Source(3, 6) + SourceIndex(1) -+1 >Emitted(4, 6) Source(3, 6) + SourceIndex(0) - --- - >>> m1.c1 = c1; - 1->^^^^ --2 > ^^^^^ --3 > ^^^^^ --4 > ^ --5 > ^^^^^^-> -+2 > ^^^ -+3 > ^^ -+4 > ^^^^^ -+5 > ^ -+6 > ^^^^^^-> - 1-> --2 > c1 --3 > { -+2 > -+3 > c1 -+4 > { - > } --4 > --1->Emitted(9, 5) Source(2, 18) + SourceIndex(1) --2 >Emitted(9, 10) Source(2, 20) + SourceIndex(1) --3 >Emitted(9, 15) Source(3, 6) + SourceIndex(1) --4 >Emitted(9, 16) Source(3, 6) + SourceIndex(1) -+5 > -+1->Emitted(5, 5) Source(2, 18) + SourceIndex(0) -+2 >Emitted(5, 8) Source(2, 18) + SourceIndex(0) -+3 >Emitted(5, 10) Source(2, 20) + SourceIndex(0) -+4 >Emitted(5, 15) Source(3, 6) + SourceIndex(0) -+5 >Emitted(5, 16) Source(3, 6) + SourceIndex(0) - --- - >>>})(m1 || (m1 = {})); - 1-> -@@= skipped -77, +85 lines =@@ - 5 > ^^^^^ - 6 > ^^ - 7 > ^^^^^^^^ --8 > ^^^^^^^^^^^^^^^^-> -+8 > ^^^^^^^^-> - 1-> -- > --2 >} -+2 > -+ >} - 3 > - 4 > m1 - 5 > -@@= skipped -12, +12 lines =@@ - > export class c1 { - > } - > } --1->Emitted(10, 1) Source(4, 1) + SourceIndex(1) --2 >Emitted(10, 2) Source(4, 2) + SourceIndex(1) --3 >Emitted(10, 4) Source(1, 8) + SourceIndex(1) --4 >Emitted(10, 6) Source(1, 10) + SourceIndex(1) --5 >Emitted(10, 11) Source(1, 8) + SourceIndex(1) --6 >Emitted(10, 13) Source(1, 10) + SourceIndex(1) --7 >Emitted(10, 21) Source(4, 2) + SourceIndex(1) -+1->Emitted(6, 1) Source(3, 6) + SourceIndex(0) -+2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) -+3 >Emitted(6, 4) Source(1, 8) + SourceIndex(0) -+4 >Emitted(6, 6) Source(1, 10) + SourceIndex(0) -+5 >Emitted(6, 11) Source(1, 8) + SourceIndex(0) -+6 >Emitted(6, 13) Source(1, 10) + SourceIndex(0) -+7 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) - --- -->>>//# sourceMappingURL=fooResult.js.map -+>>>//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.errors.txt b/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.errors.txt new file mode 100644 index 0000000000..7702c5314e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.errors.txt @@ -0,0 +1,14 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== testFiles/app.ts (0 errors) ==== + // Note in the out result we are using same folder name only different in casing + // Since this is non case sensitive, the relative paths should be just app.ts and app2.ts in the sourcemap + class c { + } + +==== testFiles/app2.ts (0 errors) ==== + class d { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.js.map b/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.js.map deleted file mode 100644 index 7d79940140..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.js.map +++ /dev/null @@ -1,4 +0,0 @@ -//// [app.js.map] -{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0GAA0G;AAC1G,MAAM,CAAC;CACN"} -//// [app2.js.map] -{"version":3,"file":"app2.js","sourceRoot":"","sources":["app2.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CACN"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.js.map.diff b/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.js.map.diff deleted file mode 100644 index 2db96d51f6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.js.map.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.sourceMapWithNonCaseSensitiveFileNames.js.map -+++ new.sourceMapWithNonCaseSensitiveFileNames.js.map -@@= skipped -0, +0 lines =@@ --//// [fooResult.js.map] --{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["app.ts","app2.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0GAA0G;AAC1G,MAAM,CAAC;CACN;ACHD,MAAM,CAAC;CACN"} --//// https://sokra.github.io/source-map-visualization#base64,Ly8gTm90ZSBpbiB0aGUgb3V0IHJlc3VsdCB3ZSBhcmUgdXNpbmcgc2FtZSBmb2xkZXIgbmFtZSBvbmx5IGRpZmZlcmVudCBpbiBjYXNpbmcNCi8vIFNpbmNlIHRoaXMgaXMgbm9uIGNhc2Ugc2Vuc2l0aXZlLCB0aGUgcmVsYXRpdmUgcGF0aHMgc2hvdWxkIGJlIGp1c3QgYXBwLnRzIGFuZCBhcHAyLnRzIGluIHRoZSBzb3VyY2VtYXANCmNsYXNzIGMgew0KfQ0KY2xhc3MgZCB7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1mb29SZXN1bHQuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vUmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnRzIiwiYXBwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxnRkFBZ0Y7QUFDaEYsMEdBQTBHO0FBQzFHLE1BQU0sQ0FBQztDQUNOO0FDSEQsTUFBTSxDQUFDO0NBQ04ifQ==,Ly8gTm90ZSBpbiB0aGUgb3V0IHJlc3VsdCB3ZSBhcmUgdXNpbmcgc2FtZSBmb2xkZXIgbmFtZSBvbmx5IGRpZmZlcmVudCBpbiBjYXNpbmcKLy8gU2luY2UgdGhpcyBpcyBub24gY2FzZSBzZW5zaXRpdmUsIHRoZSByZWxhdGl2ZSBwYXRocyBzaG91bGQgYmUganVzdCBhcHAudHMgYW5kIGFwcDIudHMgaW4gdGhlIHNvdXJjZW1hcApjbGFzcyBjIHsKfQo=,Y2xhc3MgZCB7Cn0K -+//// [app.js.map] -+{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0GAA0G;AAC1G,MAAM,CAAC;CACN"} -+//// [app2.js.map] -+{"version":3,"file":"app2.js","sourceRoot":"","sources":["app2.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CACN"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt deleted file mode 100644 index b74015cb74..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt +++ /dev/null @@ -1,76 +0,0 @@ -=================================================================== -JsFile: app.js -mapUrl: app.js.map -sourceRoot: -sources: app.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:testFiles/app.js -sourceFile:app.ts -------------------------------------------------------------------- ->>>// Note in the out result we are using same folder name only different in casing -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > -2 >// Note in the out result we are using same folder name only different in casing -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 81) Source(1, 81) + SourceIndex(0) ---- ->>>// Since this is non case sensitive, the relative paths should be just app.ts and app2.ts in the sourcemap -1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1-> - > -2 >// Since this is non case sensitive, the relative paths should be just app.ts and app2.ts in the sourcemap -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 107) Source(2, 107) + SourceIndex(0) ---- ->>>class c { -1 > -2 >^^^^^^ -3 > ^ -1 > - > -2 >class -3 > c -1 >Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 7) Source(3, 7) + SourceIndex(0) -3 >Emitted(3, 8) Source(3, 8) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { - >} -1 >Emitted(4, 2) Source(4, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=app.js.map=================================================================== -JsFile: app2.js -mapUrl: app2.js.map -sourceRoot: -sources: app2.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:testFiles/app2.js -sourceFile:app2.ts -------------------------------------------------------------------- ->>>class d { -1 > -2 >^^^^^^ -3 > ^ -1 > -2 >class -3 > d -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ---- ->>>} -1 >^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > { - >} -1 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=app2.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt.diff deleted file mode 100644 index 8268f817a2..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt.diff +++ /dev/null @@ -1,66 +0,0 @@ ---- old.sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt -+++ new.sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt -@@= skipped -0, +0 lines =@@ - =================================================================== --JsFile: fooResult.js --mapUrl: fooResult.js.map -+JsFile: app.js -+mapUrl: app.js.map - sourceRoot: --sources: app.ts,app2.ts -+sources: app.ts - =================================================================== - ------------------------------------------------------------------- --emittedFile:testfiles/fooResult.js -+emittedFile:testFiles/app.js - sourceFile:app.ts - ------------------------------------------------------------------- - >>>// Note in the out result we are using same folder name only different in casing -@@= skipped -39, +39 lines =@@ - --- - >>>} - 1 >^ --2 > ^^^^^^^^^-> -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > { - >} - 1 >Emitted(4, 2) Source(4, 2) + SourceIndex(0) - --- -+>>>//# sourceMappingURL=app.js.map=================================================================== -+JsFile: app2.js -+mapUrl: app2.js.map -+sourceRoot: -+sources: app2.ts -+=================================================================== - ------------------------------------------------------------------- --emittedFile:testfiles/fooResult.js -+emittedFile:testFiles/app2.js - sourceFile:app2.ts - ------------------------------------------------------------------- - >>>class d { --1-> -+1 > - 2 >^^^^^^ - 3 > ^ --1-> -+1 > - 2 >class - 3 > d --1->Emitted(5, 1) Source(1, 1) + SourceIndex(1) --2 >Emitted(5, 7) Source(1, 7) + SourceIndex(1) --3 >Emitted(5, 8) Source(1, 8) + SourceIndex(1) -+1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -+2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -+3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) - --- - >>>} - 1 >^ --2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -+2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > { - >} --1 >Emitted(6, 2) Source(2, 2) + SourceIndex(1) -+1 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) - --- -->>>//# sourceMappingURL=fooResult.js.map -+>>>//# sourceMappingURL=app2.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt index b9b7fce3ef..bd181d492b 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt @@ -1,6 +1,8 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. /mod1.ts(1,24): error TS2304: Cannot find name 'Lib'. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== /mod2.ts (0 errors) ==== import {foo} from "./mod1"; export const bar = foo(); diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt index 13ae452bb2..da30e5583e 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt @@ -1,7 +1,9 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. /mod1.ts(8,16): error TS2304: Cannot find name 'Lib'. /mod1.ts(11,25): error TS2304: Cannot find name 'Lib'. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== /mod2.ts (0 errors) ==== import { Cls } from "./main"; import "./mod1"; diff --git a/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration.errors.txt b/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration.errors.txt new file mode 100644 index 0000000000..dd1e3a68ff --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration.errors.txt @@ -0,0 +1,23 @@ +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== A.ts (0 errors) ==== + namespace ts { + export function printVersion():void { + log("Version: " + sys.version); // the call of sys.version is deferred, should not report an error. + } + + export function log(info:string):void { + + } + } + +==== B.ts (0 errors) ==== + namespace ts { + + export let sys:{version:string} = {version: "2.0.5"}; + + } + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node16).errors.txt index 755f0d6eeb..ceabedf3fb 100644 --- a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node16).errors.txt +++ b/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node16).errors.txt @@ -1,6 +1,8 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. /c.ts(1,16): error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations. +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. ==== /ts.ts (0 errors) ==== export {}; diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node16).errors.txt.diff deleted file mode 100644 index 7b1c98b3aa..0000000000 --- a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node16).errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.allowImportingTsExtensions(moduleresolution=node16).errors.txt -+++ new.allowImportingTsExtensions(moduleresolution=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. - /c.ts(1,16): error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations. - - --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. - ==== /ts.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt b/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt index 755f0d6eeb..8ddb7869e9 100644 --- a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt +++ b/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt @@ -1,6 +1,8 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. /c.ts(1,16): error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations. +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. ==== /ts.ts (0 errors) ==== export {}; diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt.diff deleted file mode 100644 index 513da3f473..0000000000 --- a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.allowImportingTsExtensions(moduleresolution=nodenext).errors.txt -+++ new.allowImportingTsExtensions(moduleresolution=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - /c.ts(1,16): error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations. - - --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - ==== /ts.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt new file mode 100644 index 0000000000..28178a4108 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt @@ -0,0 +1,19 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== /types.d.ts (0 errors) ==== + export declare type User = { + name: string; + } + +==== /a.ts (0 errors) ==== + import type { User } from "./types.d.ts"; + export type { User } from "./types.d.ts"; + + export const user: User = { name: "John" }; + + export function getUser(): import("./types.d.ts").User { + return user; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt.diff deleted file mode 100644 index b1f40d7db4..0000000000 --- a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt -+++ new.allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== /types.d.ts (0 errors) ==== -- export declare type User = { -- name: string; -- } -- --==== /a.ts (0 errors) ==== -- import type { User } from "./types.d.ts"; -- export type { User } from "./types.d.ts"; -- -- export const user: User = { name: "John" }; -- -- export function getUser(): import("./types.d.ts").User { -- return user; -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000..568b93c852 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt @@ -0,0 +1,19 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== /types.d.ts (0 errors) ==== + export declare type User = { + name: string; + } + +==== /a.ts (0 errors) ==== + import type { User } from "./types.d.ts"; + export type { User } from "./types.d.ts"; + + export const user: User = { name: "John" }; + + export function getUser(): import("./types.d.ts").User { + return user; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt.diff deleted file mode 100644 index e4536a7f3e..0000000000 --- a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt -+++ new.allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== /types.d.ts (0 errors) ==== -- export declare type User = { -- name: string; -- } -- --==== /a.ts (0 errors) ==== -- import type { User } from "./types.d.ts"; -- export type { User } from "./types.d.ts"; -- -- export const user: User = { name: "John" }; -- -- export function getUser(): import("./types.d.ts").User { -- return user; -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt new file mode 100644 index 0000000000..28178a4108 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt @@ -0,0 +1,19 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== /types.d.ts (0 errors) ==== + export declare type User = { + name: string; + } + +==== /a.ts (0 errors) ==== + import type { User } from "./types.d.ts"; + export type { User } from "./types.d.ts"; + + export const user: User = { name: "John" }; + + export function getUser(): import("./types.d.ts").User { + return user; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt.diff deleted file mode 100644 index 2055226d2f..0000000000 --- a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt -+++ new.allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== /types.d.ts (0 errors) ==== -- export declare type User = { -- name: string; -- } -- --==== /a.ts (0 errors) ==== -- import type { User } from "./types.d.ts"; -- export type { User } from "./types.d.ts"; -- -- export const user: User = { name: "John" }; -- -- export function getUser(): import("./types.d.ts").User { -- return user; -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000..568b93c852 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt @@ -0,0 +1,19 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== /types.d.ts (0 errors) ==== + export declare type User = { + name: string; + } + +==== /a.ts (0 errors) ==== + import type { User } from "./types.d.ts"; + export type { User } from "./types.d.ts"; + + export const user: User = { name: "John" }; + + export function getUser(): import("./types.d.ts").User { + return user; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt.diff deleted file mode 100644 index bebc9fb0cc..0000000000 --- a/testdata/baselines/reference/submodule/conformance/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt -+++ new.allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== /types.d.ts (0 errors) ==== -- export declare type User = { -- name: string; -- } -- --==== /a.ts (0 errors) ==== -- import type { User } from "./types.d.ts"; -- export type { User } from "./types.d.ts"; -- -- export const user: User = { name: "John" }; -- -- export function getUser(): import("./types.d.ts").User { -- return user; -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt new file mode 100644 index 0000000000..5fb7b80d8d --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt @@ -0,0 +1,18 @@ +error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. + + +!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. +==== /app/test.ts (0 errors) ==== + import { test } from '../lib'; + +==== /lib/package.json (0 errors) ==== + { + "main": "./cjs/index.js" + } + +==== /lib/cjs/index.js (0 errors) ==== + export function test() {} + +==== /lib/cjs/index.d.ts (0 errors) ==== + export function test(): void; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt.diff index d30ac29617..eff04db0b2 100644 --- a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt.diff @@ -2,23 +2,10 @@ +++ new.bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt @@= skipped -0, +0 lines =@@ -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. --error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. -- -- + error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. + + -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. --!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. --==== /app/test.ts (0 errors) ==== -- import { test } from '../lib'; -- --==== /lib/package.json (0 errors) ==== -- { -- "main": "./cjs/index.js" -- } -- --==== /lib/cjs/index.js (0 errors) ==== -- export function test() {} -- --==== /lib/cjs/index.d.ts (0 errors) ==== -- export function test(): void; -- -+ \ No newline at end of file + !!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. + ==== /app/test.ts (0 errors) ==== + import { test } from '../lib'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt new file mode 100644 index 0000000000..b9a6e96965 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt @@ -0,0 +1,18 @@ +error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. + + +!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. +==== /app/test.ts (0 errors) ==== + import { test } from '../lib'; + +==== /lib/package.json (0 errors) ==== + { + "main": "./cjs/index.js" + } + +==== /lib/cjs/index.js (0 errors) ==== + export function test() {} + +==== /lib/cjs/index.d.ts (0 errors) ==== + export function test(): void; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt.diff index 3252f13fef..4d64344afc 100644 --- a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt.diff @@ -2,23 +2,10 @@ +++ new.bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt @@= skipped -0, +0 lines =@@ -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. --error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. -- -- + error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. + + -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. --!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. --==== /app/test.ts (0 errors) ==== -- import { test } from '../lib'; -- --==== /lib/package.json (0 errors) ==== -- { -- "main": "./cjs/index.js" -- } -- --==== /lib/cjs/index.js (0 errors) ==== -- export function test() {} -- --==== /lib/cjs/index.d.ts (0 errors) ==== -- export function test(): void; -- -+ \ No newline at end of file + !!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. + ==== /app/test.ts (0 errors) ==== + import { test } from '../lib'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt b/testdata/baselines/reference/submodule/conformance/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt index ddd2bdfc26..984dae6a8f 100644 --- a/testdata/baselines/reference/submodule/conformance/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt +++ b/testdata/baselines/reference/submodule/conformance/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt @@ -1,3 +1,5 @@ +error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. +error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. /project/main.ts(3,16): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. /project/main.ts(7,16): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. /project/main.ts(8,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './b.js' instead? @@ -8,6 +10,8 @@ /project/types.d.ts(2,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? +!!! error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. +!!! error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. ==== /project/a.ts (0 errors) ==== export {}; diff --git a/testdata/baselines/reference/submodule/conformance/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt b/testdata/baselines/reference/submodule/conformance/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt index ce138220b1..4ed1ba441f 100644 --- a/testdata/baselines/reference/submodule/conformance/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt +++ b/testdata/baselines/reference/submodule/conformance/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt @@ -1,8 +1,14 @@ +error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. +error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. +error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. /project/main.ts(8,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './b.ts' instead? /project/main.ts(12,16): error TS6142: Module './c.tsx' was resolved to '/project/c.tsx', but '--jsx' is not set. /project/types.d.ts(2,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.ts' instead? +!!! error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. +!!! error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. +!!! error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. ==== /project/a.ts (0 errors) ==== export {}; diff --git a/testdata/baselines/reference/submodule/conformance/checkJsdocOnEndOfFile.errors.txt b/testdata/baselines/reference/submodule/conformance/checkJsdocOnEndOfFile.errors.txt index 19e950b028..1ebf96cdaf 100644 --- a/testdata/baselines/reference/submodule/conformance/checkJsdocOnEndOfFile.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/checkJsdocOnEndOfFile.errors.txt @@ -1,6 +1,12 @@ +error TS5055: Cannot write file 'eof.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. eof.js(2,20): error TS2304: Cannot find name 'bad'. +!!! error TS5055: Cannot write file 'eof.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== eof.js (1 errors) ==== /** * @typedef {Array} Should have error here diff --git a/testdata/baselines/reference/submodule/conformance/checkJsdocReturnTag1.errors.txt b/testdata/baselines/reference/submodule/conformance/checkJsdocReturnTag1.errors.txt index 47f1a3209d..d34f12577f 100644 --- a/testdata/baselines/reference/submodule/conformance/checkJsdocReturnTag1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/checkJsdocReturnTag1.errors.txt @@ -1,6 +1,12 @@ +error TS5055: Cannot write file 'returns.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. returns.js(20,12): error TS2872: This kind of expression is always truthy. +!!! error TS5055: Cannot write file 'returns.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== returns.js (1 errors) ==== // @ts-check /** diff --git a/testdata/baselines/reference/submodule/conformance/checkJsdocReturnTag2.errors.txt b/testdata/baselines/reference/submodule/conformance/checkJsdocReturnTag2.errors.txt index c5ab204ed8..7bc102364c 100644 --- a/testdata/baselines/reference/submodule/conformance/checkJsdocReturnTag2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/checkJsdocReturnTag2.errors.txt @@ -1,9 +1,15 @@ +error TS5055: Cannot write file 'returns.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. returns.js(6,5): error TS2322: Type 'number' is not assignable to type 'string'. returns.js(13,5): error TS2322: Type 'number | boolean' is not assignable to type 'string | number'. Type 'boolean' is not assignable to type 'string | number'. returns.js(13,12): error TS2872: This kind of expression is always truthy. +!!! error TS5055: Cannot write file 'returns.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== returns.js (3 errors) ==== // @ts-check /** diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es2015).errors.txt b/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es2015).errors.txt new file mode 100644 index 0000000000..29cf4ce60b --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es2015).errors.txt @@ -0,0 +1,17 @@ +error TS5055: Cannot write file 'computedPropertyNames52.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'computedPropertyNames52.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== computedPropertyNames52.js (0 errors) ==== + const array = []; + for (let i = 0; i < 10; ++i) { + array.push(class C { + [i] = () => C; + static [i] = 100; + }) + } + \ 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 new file mode 100644 index 0000000000..29cf4ce60b --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames52(target=es5).errors.txt @@ -0,0 +1,17 @@ +error TS5055: Cannot write file 'computedPropertyNames52.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'computedPropertyNames52.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== computedPropertyNames52.js (0 errors) ==== + const array = []; + for (let i = 0; i < 10; ++i) { + array.push(class C { + [i] = () => C; + static [i] = 100; + }) + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt new file mode 100644 index 0000000000..e205e8b437 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt @@ -0,0 +1,30 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== /node_modules/dep/package.json (0 errors) ==== + { + "name": "dep", + "version": "1.0.0", + "exports": { + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + } + } + +==== /node_modules/dep/dist/index.d.ts (0 errors) ==== + export {}; + +==== /node_modules/dep/dist/index.mjs (0 errors) ==== + export {}; + +==== /index.mts (0 errors) ==== + import {} from "dep"; + // Should be an untyped resolution to dep/dist/index.mjs, + // but the first search is only for TS files, and when + // there's no dist/index.d.mts, it continues looking for + // matching conditions and resolves via `types`. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt b/testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000..85cf980ae4 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt @@ -0,0 +1,30 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== /node_modules/dep/package.json (0 errors) ==== + { + "name": "dep", + "version": "1.0.0", + "exports": { + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + } + } + +==== /node_modules/dep/dist/index.d.ts (0 errors) ==== + export {}; + +==== /node_modules/dep/dist/index.mjs (0 errors) ==== + export {}; + +==== /index.mts (0 errors) ==== + import {} from "dep"; + // Should be an untyped resolution to dep/dist/index.mjs, + // but the first search is only for TS files, and when + // there's no dist/index.d.mts, it continues looking for + // matching conditions and resolves via `types`. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/exportDefaultInJsFile01.errors.txt b/testdata/baselines/reference/submodule/conformance/exportDefaultInJsFile01.errors.txt new file mode 100644 index 0000000000..18c2af2664 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/exportDefaultInJsFile01.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'myFile01.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'myFile01.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +==== myFile01.js (0 errors) ==== + export default "hello"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/exportDefaultInJsFile02.errors.txt b/testdata/baselines/reference/submodule/conformance/exportDefaultInJsFile02.errors.txt new file mode 100644 index 0000000000..cc0e6f1245 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/exportDefaultInJsFile02.errors.txt @@ -0,0 +1,8 @@ +error TS5055: Cannot write file 'myFile02.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + +!!! error TS5055: Cannot write file 'myFile02.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +==== myFile02.js (0 errors) ==== + export default "hello"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node16).errors.txt new file mode 100644 index 0000000000..9f4549d15a --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node16).errors.txt @@ -0,0 +1,20 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== /project/a.js (0 errors) ==== + export default "a.js"; + +==== /project/a.js.js (0 errors) ==== + export default "a.js.js"; + +==== /project/dir/index.ts (0 errors) ==== + export default "dir/index.ts"; + +==== /project/dir.js (0 errors) ==== + export default "dir.js"; + +==== /project/b.ts (0 errors) ==== + import a from "./a.js"; + import dir from "./dir"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=nodenext).errors.txt b/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000..b23b67b71d --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=nodenext).errors.txt @@ -0,0 +1,20 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== /project/a.js (0 errors) ==== + export default "a.js"; + +==== /project/a.js.js (0 errors) ==== + export default "a.js.js"; + +==== /project/dir/index.ts (0 errors) ==== + export default "dir/index.ts"; + +==== /project/dir.js (0 errors) ==== + export default "dir.js"; + +==== /project/b.ts (0 errors) ==== + import a from "./a.js"; + import dir from "./dir"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/genericSetterInClassTypeJsDoc.errors.txt b/testdata/baselines/reference/submodule/conformance/genericSetterInClassTypeJsDoc.errors.txt new file mode 100644 index 0000000000..8b64bc49e9 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/genericSetterInClassTypeJsDoc.errors.txt @@ -0,0 +1,32 @@ +error TS5055: Cannot write file 'genericSetterInClassTypeJsDoc.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'genericSetterInClassTypeJsDoc.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== genericSetterInClassTypeJsDoc.js (0 errors) ==== + /** + * @template T + */ + class Box { + #value; + + /** @param {T} initialValue */ + constructor(initialValue) { + this.#value = initialValue; + } + + /** @type {T} */ + get value() { + return this.#value; + } + + set value(value) { + this.#value = value; + } + } + + new Box(3).value = 3; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/globalThisVarDeclaration.errors.txt b/testdata/baselines/reference/submodule/conformance/globalThisVarDeclaration.errors.txt index 7bbcdac373..90d8e49796 100644 --- a/testdata/baselines/reference/submodule/conformance/globalThisVarDeclaration.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/globalThisVarDeclaration.errors.txt @@ -1,9 +1,15 @@ +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. actual.ts(12,5): error TS2339: Property 'a' does not exist on type 'Window'. actual.ts(13,5): error TS2339: Property 'b' does not exist on type 'Window'. b.js(12,5): error TS2339: Property 'a' does not exist on type 'Window'. b.js(13,5): error TS2339: Property 'b' does not exist on type 'Window'. +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== b.js (2 errors) ==== var a = 10; this.a; diff --git a/testdata/baselines/reference/submodule/conformance/grammarErrors.errors.txt b/testdata/baselines/reference/submodule/conformance/grammarErrors.errors.txt index 7203d4ae5f..599518b3b4 100644 --- a/testdata/baselines/reference/submodule/conformance/grammarErrors.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/grammarErrors.errors.txt @@ -1,7 +1,13 @@ +error TS5055: Cannot write file '/a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5056: Cannot write file '/a.js' because it would be overwritten by multiple input files. /b.ts(1,8): error TS1363: A type-only import can specify a default import or named bindings, but not both. /c.ts(4,1): error TS1392: An import alias cannot use 'import type' +!!! 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. +!!! error TS5056: Cannot write file '/a.js' because it would be overwritten by multiple input files. ==== /a.ts (0 errors) ==== export default class A {} export class B {} diff --git a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt index d0ec3d2795..837aa4d77f 100644 --- a/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.errors.txt @@ -1,8 +1,14 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. a.js(14,13): error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. a.js(20,9): error TS2322: Type 'string' is not assignable to type 'number'. a.js(39,9): error TS2322: Type 'boolean' is not assignable to type 'number'. +!!! 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. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== a.js (3 errors) ==== class C { constructor() { diff --git a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt index 8121c8945a..8f9eea6533 100644 --- a/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsObjectsMarkedAsOpenEnded.errors.txt @@ -1,9 +1,15 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. b.ts(3,29): error TS2339: Property 'a' does not exist on type '{}'. b.ts(4,14): error TS2339: Property 'a' does not exist on type '{}'. 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 '{}'. +!!! 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. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== a.js (0 errors) ==== var variable = {}; variable.a = 0; diff --git a/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.errors.txt new file mode 100644 index 0000000000..6dde425f17 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/jsdocAccessibilityTagsDeclarations.errors.txt @@ -0,0 +1,47 @@ +error TS5055: Cannot write file 'jsdocAccessibilityTagDeclarations.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'jsdocAccessibilityTagDeclarations.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== jsdocAccessibilityTagDeclarations.js (0 errors) ==== + class Protected { + /** @protected */ + constructor(c) { + /** @protected */ + this.c = c + } + /** @protected */ + m() { + return this.c + } + /** @protected */ + get p() { return this.c } + /** @protected */ + set p(value) { this.c = value } + } + + class Private { + /** @private */ + constructor(c) { + /** @private */ + this.c = c + } + /** @private */ + m() { + return this.c + } + /** @private */ + get p() { return this.c } + /** @private */ + set p(value) { this.c = value } + } + + // https://github.com/microsoft/TypeScript/issues/38401 + class C { + constructor(/** @public */ x, /** @protected */ y, /** @private */ z) { + } + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocLiteral.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocLiteral.errors.txt new file mode 100644 index 0000000000..59775da771 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/jsdocLiteral.errors.txt @@ -0,0 +1,20 @@ +error TS5055: Cannot write file 'in.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'in.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== in.js (0 errors) ==== + /** + * @param {'literal'} p1 + * @param {"literal"} p2 + * @param {'literal' | 'other'} p3 + * @param {'literal' | number} p4 + * @param {12 | true | 'str'} p5 + */ + function f(p1, p2, p3, p4, p5) { + return p1 + p2 + p3 + p4 + p5 + '.'; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocNeverUndefinedNull.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocNeverUndefinedNull.errors.txt new file mode 100644 index 0000000000..ad56cb1b82 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/jsdocNeverUndefinedNull.errors.txt @@ -0,0 +1,18 @@ +error TS5055: Cannot write file 'in.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'in.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== in.js (0 errors) ==== + /** + * @param {never} p1 + * @param {undefined} p2 + * @param {null} p3 + * @returns {void} nothing + */ + function f(p1, p2, p3) { + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters1.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters1.errors.txt index c0a05d7652..ab250f778b 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters1.errors.txt @@ -1,7 +1,11 @@ +error TS5055: Cannot write file 'jsdocOuterTypeParameters1.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. jsdocOuterTypeParameters1.js(1,14): error TS2304: Cannot find name 'T'. jsdocOuterTypeParameters1.js(7,35): error TS2339: Property 'foo' does not exist on type 'Bar'. +!!! error TS5055: Cannot write file 'jsdocOuterTypeParameters1.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. ==== jsdocOuterTypeParameters1.js (2 errors) ==== /** @return {T} */ ~ diff --git a/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters2.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters2.errors.txt index f78e45da6b..03676e6e03 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters2.errors.txt @@ -1,7 +1,11 @@ +error TS5055: Cannot write file 'jsdocOuterTypeParameters1.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. jsdocOuterTypeParameters1.js(1,14): error TS2304: Cannot find name 'T'. jsdocOuterTypeParameters1.js(7,35): error TS2339: Property 'foo' does not exist on type 'Bar'. +!!! error TS5055: Cannot write file 'jsdocOuterTypeParameters1.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. ==== jsdocOuterTypeParameters1.js (2 errors) ==== /** @return {T} */ ~ diff --git a/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters3.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters3.errors.txt index 34edb68c0e..dbb9a05d5f 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters3.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocOuterTypeParameters3.errors.txt @@ -1,6 +1,10 @@ +error TS5055: Cannot write file 'jsdocOuterTypeParameters3.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. jsdocOuterTypeParameters3.js(5,43): error TS2339: Property 'foo' does not exist on type 'Bar'. +!!! error TS5055: Cannot write file 'jsdocOuterTypeParameters3.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. ==== jsdocOuterTypeParameters3.js (1 errors) ==== /** @template {T} */ class Baz { diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.errors.txt index fcceb47726..f3b46e0142 100644 --- a/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsdocReadonlyDeclarations.errors.txt @@ -1,6 +1,12 @@ +error TS5055: Cannot write file 'jsdocReadonlyDeclarations.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. jsdocReadonlyDeclarations.js(14,1): error TS2554: Expected 1 arguments, but got 0. +!!! error TS5055: Cannot write file 'jsdocReadonlyDeclarations.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== jsdocReadonlyDeclarations.js (1 errors) ==== class C { /** @readonly */ diff --git a/testdata/baselines/reference/submodule/conformance/jsdocReturnTag1.errors.txt b/testdata/baselines/reference/submodule/conformance/jsdocReturnTag1.errors.txt new file mode 100644 index 0000000000..d36700919c --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/jsdocReturnTag1.errors.txt @@ -0,0 +1,30 @@ +error TS5055: Cannot write file 'returns.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'returns.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== returns.js (0 errors) ==== + /** + * @returns {string} This comment is not currently exposed + */ + function f() { + return 5; + } + + /** + * @returns {string=} This comment is not currently exposed + */ + function f1() { + return 5; + } + + /** + * @returns {string|number} This comment is not currently exposed + */ + function f2() { + return 5 || "hello"; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/methodsReturningThis.errors.txt b/testdata/baselines/reference/submodule/conformance/methodsReturningThis.errors.txt new file mode 100644 index 0000000000..491cea734e --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/methodsReturningThis.errors.txt @@ -0,0 +1,28 @@ +error TS5055: Cannot write file 'input.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'input.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== input.js (0 errors) ==== + function Class() + { + } + + // error: 'Class' doesn't have property 'notPresent' + Class.prototype.containsError = function () { return this.notPresent; }; + + // lots of methods that return this, which caused out-of-memory in #9527 + Class.prototype.m1 = function (a, b, c, d, tx, ty) { return this; }; + Class.prototype.m2 = function (x, y) { return this; }; + Class.prototype.m3 = function (x, y) { return this; }; + Class.prototype.m4 = function (angle) { return this; }; + Class.prototype.m5 = function (matrix) { return this; }; + Class.prototype.m6 = function (x, y, pivotX, pivotY, scaleX, scaleY, rotation, skewX, skewY) { return this; }; + Class.prototype.m7 = function(matrix) { return this; }; + Class.prototype.m8 = function() { return this; }; + Class.prototype.m9 = function () { return this; }; + + \ 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 new file mode 100644 index 0000000000..f34f1d6bf5 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/multipleDeclarations.errors.txt @@ -0,0 +1,44 @@ +error TS5055: Cannot write file 'input.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'input.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== input.js (0 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'; + } + m() { + } + mistake() { + } + } + let x = new X(); + X.prototype.mistake = false; + x.m(); + x.mistake; + class Y { + mistake() { + } + m() { + } + constructor() { + this.m = this.m.bind(this); + this.mistake = 'even more nonsense'; + } + } + Y.prototype.mistake = true; + let y = new Y(); + y.m(); + y.mistake(); + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt new file mode 100644 index 0000000000..8aacbdd1b7 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt @@ -0,0 +1,28 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== /node_modules/@restart/hooks/package.json (0 errors) ==== + { + "name": "@restart/hooks", + "version": "0.3.25", + "main": "cjs/index.js", + "types": "cjs/index.d.ts", + "module": "esm/index.js" + } + +==== /node_modules/@restart/hooks/useMergedRefs/package.json (0 errors) ==== + { + "name": "@restart/hooks/useMergedRefs", + "private": true, + "main": "../cjs/useMergedRefs.js", + "module": "../esm/useMergedRefs.js", + "types": "../esm/useMergedRefs.d.ts" + } + +==== /node_modules/@restart/hooks/esm/useMergedRefs.d.ts (0 errors) ==== + export {}; + +==== /main.ts (0 errors) ==== + import {} from "@restart/hooks/useMergedRefs"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt.diff deleted file mode 100644 index 47ea1d708d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.nestedPackageJsonRedirect(moduleresolution=node16).errors.txt -+++ new.nestedPackageJsonRedirect(moduleresolution=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== /node_modules/@restart/hooks/package.json (0 errors) ==== -- { -- "name": "@restart/hooks", -- "version": "0.3.25", -- "main": "cjs/index.js", -- "types": "cjs/index.d.ts", -- "module": "esm/index.js" -- } -- --==== /node_modules/@restart/hooks/useMergedRefs/package.json (0 errors) ==== -- { -- "name": "@restart/hooks/useMergedRefs", -- "private": true, -- "main": "../cjs/useMergedRefs.js", -- "module": "../esm/useMergedRefs.js", -- "types": "../esm/useMergedRefs.d.ts" -- } -- --==== /node_modules/@restart/hooks/esm/useMergedRefs.d.ts (0 errors) ==== -- export {}; -- --==== /main.ts (0 errors) ==== -- import {} from "@restart/hooks/useMergedRefs"; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt b/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000..3b67cb241a --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt @@ -0,0 +1,28 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== /node_modules/@restart/hooks/package.json (0 errors) ==== + { + "name": "@restart/hooks", + "version": "0.3.25", + "main": "cjs/index.js", + "types": "cjs/index.d.ts", + "module": "esm/index.js" + } + +==== /node_modules/@restart/hooks/useMergedRefs/package.json (0 errors) ==== + { + "name": "@restart/hooks/useMergedRefs", + "private": true, + "main": "../cjs/useMergedRefs.js", + "module": "../esm/useMergedRefs.js", + "types": "../esm/useMergedRefs.d.ts" + } + +==== /node_modules/@restart/hooks/esm/useMergedRefs.d.ts (0 errors) ==== + export {}; + +==== /main.ts (0 errors) ==== + import {} from "@restart/hooks/useMergedRefs"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt.diff deleted file mode 100644 index 5c56ebdae7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt -+++ new.nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== /node_modules/@restart/hooks/package.json (0 errors) ==== -- { -- "name": "@restart/hooks", -- "version": "0.3.25", -- "main": "cjs/index.js", -- "types": "cjs/index.d.ts", -- "module": "esm/index.js" -- } -- --==== /node_modules/@restart/hooks/useMergedRefs/package.json (0 errors) ==== -- { -- "name": "@restart/hooks/useMergedRefs", -- "private": true, -- "main": "../cjs/useMergedRefs.js", -- "module": "../esm/useMergedRefs.js", -- "types": "../esm/useMergedRefs.d.ts" -- } -- --==== /node_modules/@restart/hooks/esm/useMergedRefs.d.ts (0 errors) ==== -- export {}; -- --==== /main.ts (0 errors) ==== -- import {} from "@restart/hooks/useMergedRefs"; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.errors.txt b/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.errors.txt deleted file mode 100644 index d32823e6c8..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -nonPrimitiveIndexingWithForInSupressError.ts(4,17): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. - No index signature with a parameter of type 'string' was found on type '{}'. - - -==== nonPrimitiveIndexingWithForInSupressError.ts (1 errors) ==== - var a: object; - - for (var key in a) { - var value = a[key]; - ~~~~~~ -!!! error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. -!!! error TS7053: No index signature with a parameter of type 'string' was found on type '{}'. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.errors.txt.diff deleted file mode 100644 index 96b886b6d2..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.nonPrimitiveIndexingWithForInSupressError.errors.txt -+++ new.nonPrimitiveIndexingWithForInSupressError.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5102: Option 'suppressImplicitAnyIndexErrors' has been removed. Please remove it from your configuration. - nonPrimitiveIndexingWithForInSupressError.ts(4,17): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. - No index signature with a parameter of type 'string' was found on type '{}'. - - --!!! error TS5102: Option 'suppressImplicitAnyIndexErrors' has been removed. Please remove it from your configuration. - ==== nonPrimitiveIndexingWithForInSupressError.ts (1 errors) ==== - var a: object; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.js b/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.js deleted file mode 100644 index d53785f99d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.js +++ /dev/null @@ -1,15 +0,0 @@ -//// [tests/cases/conformance/types/nonPrimitive/nonPrimitiveIndexingWithForInSupressError.ts] //// - -//// [nonPrimitiveIndexingWithForInSupressError.ts] -var a: object; - -for (var key in a) { - var value = a[key]; -} - - -//// [nonPrimitiveIndexingWithForInSupressError.js] -var a; -for (var key in a) { - var value = a[key]; -} diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.symbols b/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.symbols deleted file mode 100644 index 89c047c912..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.symbols +++ /dev/null @@ -1,16 +0,0 @@ -//// [tests/cases/conformance/types/nonPrimitive/nonPrimitiveIndexingWithForInSupressError.ts] //// - -=== nonPrimitiveIndexingWithForInSupressError.ts === -var a: object; ->a : Symbol(a, Decl(nonPrimitiveIndexingWithForInSupressError.ts, 0, 3)) - -for (var key in a) { ->key : Symbol(key, Decl(nonPrimitiveIndexingWithForInSupressError.ts, 2, 8)) ->a : Symbol(a, Decl(nonPrimitiveIndexingWithForInSupressError.ts, 0, 3)) - - var value = a[key]; ->value : Symbol(value, Decl(nonPrimitiveIndexingWithForInSupressError.ts, 3, 7)) ->a : Symbol(a, Decl(nonPrimitiveIndexingWithForInSupressError.ts, 0, 3)) ->key : Symbol(key, Decl(nonPrimitiveIndexingWithForInSupressError.ts, 2, 8)) -} - diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.types b/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.types deleted file mode 100644 index 9e3993895c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveIndexingWithForInSupressError.types +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/conformance/types/nonPrimitive/nonPrimitiveIndexingWithForInSupressError.ts] //// - -=== nonPrimitiveIndexingWithForInSupressError.ts === -var a: object; ->a : object - -for (var key in a) { ->key : string ->a : object - - var value = a[key]; ->value : any ->a[key] : any ->a : object ->key : string -} - diff --git a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node16).errors.txt new file mode 100644 index 0000000000..8ab4218f47 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node16).errors.txt @@ -0,0 +1,6 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== index.ts (0 errors) ==== + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node16).errors.txt.diff deleted file mode 100644 index 4cefd868e2..0000000000 --- a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node16).errors.txt.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.packageJsonImportsExportsOptionCompat(moduleresolution=node16).errors.txt -+++ new.packageJsonImportsExportsOptionCompat(moduleresolution=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== index.ts (0 errors) ==== -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=nodenext).errors.txt b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000..3ca9354d83 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=nodenext).errors.txt @@ -0,0 +1,6 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== index.ts (0 errors) ==== + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=nodenext).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=nodenext).errors.txt.diff deleted file mode 100644 index c1839c7820..0000000000 --- a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=nodenext).errors.txt.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.packageJsonImportsExportsOptionCompat(moduleresolution=nodenext).errors.txt -+++ new.packageJsonImportsExportsOptionCompat(moduleresolution=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== index.ts (0 errors) ==== -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt b/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt index c282ce8a1f..cc9f7f36f2 100644 --- a/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt +++ b/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt @@ -1,9 +1,11 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. /index.mts(1,21): error TS7016: Could not find a declaration file for module 'foo'. '/node_modules/foo/index.mjs' implicitly has an 'any' type. There are types at '/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. /index.mts(2,21): error TS7016: Could not find a declaration file for module 'bar'. '/node_modules/bar/index.mjs' implicitly has an 'any' type. There are types at '/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. ==== /node_modules/foo/package.json (0 errors) ==== { "name": "foo", diff --git a/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt.diff index f0918e5570..fc9652b0df 100644 --- a/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt.diff @@ -1,7 +1,7 @@ --- old.resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt +++ new.resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt @@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -error TS6504: File '/node_modules/bar/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? - The file is in the program because: - Root file specified for compilation @@ -17,10 +17,10 @@ /index.mts(1,21): error TS7016: Could not find a declaration file for module 'foo'. '/node_modules/foo/index.mjs' implicitly has an 'any' type. There are types at '/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. /index.mts(2,21): error TS7016: Could not find a declaration file for module 'bar'. '/node_modules/bar/index.mjs' implicitly has an 'any' type. - There are types at '/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +@@= skipped -17, +5 lines =@@ --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + !!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -!!! error TS6504: File '/node_modules/bar/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? -!!! error TS6504: The file is in the program because: -!!! error TS6504: Root file specified for compilation diff --git a/testdata/baselines/reference/submodule/conformance/topLevelThisAssignment.errors.txt b/testdata/baselines/reference/submodule/conformance/topLevelThisAssignment.errors.txt index 220d590bcf..8c29a825ed 100644 --- a/testdata/baselines/reference/submodule/conformance/topLevelThisAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/topLevelThisAssignment.errors.txt @@ -1,7 +1,17 @@ +error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. a.js(3,1): error TS2304: Cannot find name 'a'. b.js(2,1): error TS2304: Cannot find name 'a'. +!!! 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. +!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== a.js (1 errors) ==== this.a = 10; this.a; diff --git a/testdata/baselines/reference/submodule/conformance/typeSatisfaction_js.errors.txt b/testdata/baselines/reference/submodule/conformance/typeSatisfaction_js.errors.txt new file mode 100644 index 0000000000..c7b421034d --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/typeSatisfaction_js.errors.txt @@ -0,0 +1,11 @@ +error TS5055: Cannot write file '/src/a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file '/src/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. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /src/a.js (0 errors) ==== + var v = undefined satisfies 1; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typesVersions.emptyTypes.errors.txt b/testdata/baselines/reference/submodule/conformance/typesVersions.emptyTypes.errors.txt index 422a90cf2b..5215c848c1 100644 --- a/testdata/baselines/reference/submodule/conformance/typesVersions.emptyTypes.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typesVersions.emptyTypes.errors.txt @@ -1,6 +1,8 @@ +error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. /b/user.ts(1,19): error TS2307: Cannot find module 'a' or its corresponding type declarations. +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ==== /a/package.json (0 errors) ==== { "types": "", diff --git a/testdata/baselines/reference/submodule/conformance/typesVersions.justIndex.errors.txt b/testdata/baselines/reference/submodule/conformance/typesVersions.justIndex.errors.txt index 3578810be5..805162ff97 100644 --- a/testdata/baselines/reference/submodule/conformance/typesVersions.justIndex.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typesVersions.justIndex.errors.txt @@ -1,6 +1,8 @@ +error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. /b/user.ts(1,19): error TS2307: Cannot find module 'a' or its corresponding type declarations. +!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ==== /a/package.json (0 errors) ==== { "typesVersions": { diff --git a/testdata/baselines/reference/submodule/conformance/uniqueSymbolsDeclarationsInJs.errors.txt b/testdata/baselines/reference/submodule/conformance/uniqueSymbolsDeclarationsInJs.errors.txt new file mode 100644 index 0000000000..4610ce0280 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/uniqueSymbolsDeclarationsInJs.errors.txt @@ -0,0 +1,37 @@ +error TS5055: Cannot write file 'uniqueSymbolsDeclarationsInJs.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + +!!! error TS5055: Cannot write file 'uniqueSymbolsDeclarationsInJs.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== uniqueSymbolsDeclarationsInJs.js (0 errors) ==== + // classes + class C { + /** + * @readonly + */ + static readonlyStaticCall = Symbol(); + /** + * @type {unique symbol} + * @readonly + */ + static readonlyStaticType; + /** + * @type {unique symbol} + * @readonly + */ + static readonlyStaticTypeAndCall = Symbol(); + static readwriteStaticCall = Symbol(); + + /** + * @readonly + */ + readonlyCall = Symbol(); + readwriteCall = Symbol(); + } + + /** @type {unique symbol} */ + const a = Symbol(); + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/uniqueSymbolsDeclarationsInJsErrors.errors.txt b/testdata/baselines/reference/submodule/conformance/uniqueSymbolsDeclarationsInJsErrors.errors.txt index 681f7c5f3e..d5f7425d9b 100644 --- a/testdata/baselines/reference/submodule/conformance/uniqueSymbolsDeclarationsInJsErrors.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/uniqueSymbolsDeclarationsInJsErrors.errors.txt @@ -1,7 +1,13 @@ +error TS5055: Cannot write file 'uniqueSymbolsDeclarationsInJsErrors.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. uniqueSymbolsDeclarationsInJsErrors.js(5,12): error TS1331: A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'. uniqueSymbolsDeclarationsInJsErrors.js(14,12): error TS1331: A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'. +!!! error TS5055: Cannot write file 'uniqueSymbolsDeclarationsInJsErrors.js' because it would overwrite input file. +!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. +!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== uniqueSymbolsDeclarationsInJsErrors.js (2 errors) ==== class C { /** diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/alwaysStrictModule2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/alwaysStrictModule2.errors.txt.diff new file mode 100644 index 0000000000..5aa82f0160 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/alwaysStrictModule2.errors.txt.diff @@ -0,0 +1,12 @@ +--- old.alwaysStrictModule2.errors.txt ++++ new.alwaysStrictModule2.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + a.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. + b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. + + ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== a.ts (1 errors) ==== + module M { + export function f() { \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/blockScopedClassDeclarationAcrossFiles.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/blockScopedClassDeclarationAcrossFiles.errors.txt.diff new file mode 100644 index 0000000000..b1a20b8669 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/blockScopedClassDeclarationAcrossFiles.errors.txt.diff @@ -0,0 +1,13 @@ +--- old.blockScopedClassDeclarationAcrossFiles.errors.txt ++++ new.blockScopedClassDeclarationAcrossFiles.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== c.ts (0 errors) ==== ++ let foo: typeof C; ++==== b.ts (0 errors) ==== ++ class C { } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/bundledDtsLateExportRenaming.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/bundledDtsLateExportRenaming.errors.txt.diff new file mode 100644 index 0000000000..3342101d79 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/bundledDtsLateExportRenaming.errors.txt.diff @@ -0,0 +1,34 @@ +--- old.bundledDtsLateExportRenaming.errors.txt ++++ new.bundledDtsLateExportRenaming.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== index.ts (0 errors) ==== ++ export * from "./nested"; ++ ++==== nested/base.ts (0 errors) ==== ++ import { B } from "./shared"; ++ ++ export function f() { ++ return new B(); ++ } ++ ++==== nested/derived.ts (0 errors) ==== ++ import { f } from "./base"; ++ ++ export function g() { ++ return f(); ++ } ++ ++==== nested/index.ts (0 errors) ==== ++ export * from "./base"; ++ ++ export * from "./derived"; ++ export * from "./shared"; ++ ++==== nested/shared.ts (0 errors) ==== ++ export class B {} ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkIndexConstraintOfJavascriptClassExpression.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkIndexConstraintOfJavascriptClassExpression.errors.txt.diff new file mode 100644 index 0000000000..09726f841b --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/checkIndexConstraintOfJavascriptClassExpression.errors.txt.diff @@ -0,0 +1,13 @@ +--- old.checkIndexConstraintOfJavascriptClassExpression.errors.txt ++++ new.checkIndexConstraintOfJavascriptClassExpression.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + weird.js(1,1): error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? + weird.js(1,23): error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. + weird.js(9,17): error TS7006: Parameter 'error' implicitly has an 'any' type. + + ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== weird.js (3 errors) ==== + someFunction(function(BaseClass) { + ~~~~~~~~~~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/compilerOptionsOutAndNoEmit.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/compilerOptionsOutAndNoEmit.errors.txt.diff new file mode 100644 index 0000000000..6cb4262746 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/compilerOptionsOutAndNoEmit.errors.txt.diff @@ -0,0 +1,12 @@ +--- old.compilerOptionsOutAndNoEmit.errors.txt ++++ new.compilerOptionsOutAndNoEmit.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class c { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/compilerOptionsOutFileAndNoEmit.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/compilerOptionsOutFileAndNoEmit.errors.txt.diff new file mode 100644 index 0000000000..c210d371cc --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/compilerOptionsOutFileAndNoEmit.errors.txt.diff @@ -0,0 +1,12 @@ +--- old.compilerOptionsOutFileAndNoEmit.errors.txt ++++ new.compilerOptionsOutFileAndNoEmit.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class c { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/constDeclarations-useBeforeDefinition2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/constDeclarations-useBeforeDefinition2.errors.txt.diff new file mode 100644 index 0000000000..3dc83ed037 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/constDeclarations-useBeforeDefinition2.errors.txt.diff @@ -0,0 +1,19 @@ +--- old.constDeclarations-useBeforeDefinition2.errors.txt ++++ new.constDeclarations-useBeforeDefinition2.errors.txt +@@= skipped -0, +0 lines =@@ +-file1.ts(1,1): error TS2448: Block-scoped variable 'c' used before its declaration. +- +- +-==== file1.ts (1 errors) ==== ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== file1.ts (0 errors) ==== + c; +- ~ +-!!! error TS2448: Block-scoped variable 'c' used before its declaration. +-!!! related TS2728 file2.ts:1:7: 'c' is declared here. + + ==== file2.ts (0 errors) ==== + const c = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/controlFlowJavascript.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/controlFlowJavascript.errors.txt.diff new file mode 100644 index 0000000000..8e5ff57b1c --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/controlFlowJavascript.errors.txt.diff @@ -0,0 +1,117 @@ +--- old.controlFlowJavascript.errors.txt ++++ new.controlFlowJavascript.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'controlFlowJavascript.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'controlFlowJavascript.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== controlFlowJavascript.js (0 errors) ==== ++ let cond = true; ++ ++ // CFA for 'let' and no initializer ++ function f1() { ++ let x; ++ if (cond) { ++ x = 1; ++ } ++ if (cond) { ++ x = "hello"; ++ } ++ const y = x; // string | number | undefined ++ } ++ ++ // CFA for 'let' and 'undefined' initializer ++ function f2() { ++ let x = undefined; ++ if (cond) { ++ x = 1; ++ } ++ if (cond) { ++ x = "hello"; ++ } ++ const y = x; // string | number | undefined ++ } ++ ++ // CFA for 'let' and 'null' initializer ++ function f3() { ++ let x = null; ++ if (cond) { ++ x = 1; ++ } ++ if (cond) { ++ x = "hello"; ++ } ++ const y = x; // string | number | null ++ } ++ ++ // CFA for 'var' with no initializer ++ function f5() { ++ var x; ++ if (cond) { ++ x = 1; ++ } ++ if (cond) { ++ x = "hello"; ++ } ++ const y = x; // string | number | undefined ++ } ++ ++ // CFA for 'var' with 'undefined' initializer ++ function f6() { ++ var x = undefined; ++ if (cond) { ++ x = 1; ++ } ++ if (cond) { ++ x = "hello"; ++ } ++ const y = x; // string | number | undefined ++ } ++ ++ // CFA for 'var' with 'null' initializer ++ function f7() { ++ var x = null; ++ if (cond) { ++ x = 1; ++ } ++ if (cond) { ++ x = "hello"; ++ } ++ const y = x; // string | number | null ++ } ++ ++ // No CFA for captured outer variables ++ function f9() { ++ let x; ++ if (cond) { ++ x = 1; ++ } ++ if (cond) { ++ x = "hello"; ++ } ++ const y = x; // string | number | undefined ++ function f() { ++ const z = x; // any ++ } ++ } ++ ++ // No CFA for captured outer variables ++ function f10() { ++ let x; ++ if (cond) { ++ x = 1; ++ } ++ if (cond) { ++ x = "hello"; ++ } ++ const y = x; // string | number | undefined ++ const f = () => { ++ const z = x; // any ++ }; ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt.diff new file mode 100644 index 0000000000..e536c91604 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt.diff @@ -0,0 +1,14 @@ +--- old.declFileWithErrorsInInputDeclarationFileWithOut.errors.txt ++++ new.declFileWithErrorsInInputDeclarationFileWithOut.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + declFile.d.ts(2,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. + declFile.d.ts(3,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. + declFile.d.ts(5,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. + declFile.d.ts(7,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context. + + ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== client.ts (0 errors) ==== + /// + var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitBundlePreservesHasNoDefaultLibDirective.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitBundlePreservesHasNoDefaultLibDirective.errors.txt.diff new file mode 100644 index 0000000000..dd6432977f --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitBundlePreservesHasNoDefaultLibDirective.errors.txt.diff @@ -0,0 +1,23 @@ +--- old.declarationEmitBundlePreservesHasNoDefaultLibDirective.errors.txt ++++ new.declarationEmitBundlePreservesHasNoDefaultLibDirective.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== extensions.ts (0 errors) ==== ++ /// ++ class Foo { ++ public: string; ++ } ++==== core.ts (0 errors) ==== ++ interface Array {} ++ interface Boolean {} ++ interface Function {} ++ interface IArguments {} ++ interface Number {} ++ interface Object {} ++ interface RegExp {} ++ interface String {} ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.errors.txt.diff new file mode 100644 index 0000000000..44b2b12e15 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.errors.txt ++++ new.declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== /a/index.ts (0 errors) ==== ++ export * from "./src/" ++==== /b/index.ts (0 errors) ==== ++ export * from "./src/" ++==== /b/src/index.ts (0 errors) ==== ++ export class B {} ++==== /a/src/index.ts (0 errors) ==== ++ import { B } from "b"; ++ ++ export default function () { ++ return new B(); ++ } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitMonorepoBaseUrl.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitMonorepoBaseUrl.errors.txt.diff new file mode 100644 index 0000000000..977a06a178 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitMonorepoBaseUrl.errors.txt.diff @@ -0,0 +1,63 @@ +--- old.declarationEmitMonorepoBaseUrl.errors.txt ++++ new.declarationEmitMonorepoBaseUrl.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/tsconfig.json(6,5): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== /tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "module": "nodenext", ++ "declaration": true, ++ "outDir": "temp", ++ "baseUrl": "." ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ } ++ } ++ ++==== /packages/compiler-core/src/index.ts (0 errors) ==== ++ import { PluginConfig } from "@babel/parser"; ++ ++==== /packages/compiler-sfc/src/index.ts (0 errors) ==== ++ import { createPlugin } from "@babel/parser"; ++ export function resolveParserPlugins() { ++ return [createPlugin()]; ++ } ++ ++==== /node_modules/.pnpm/@babel+parser@7.23.6/node_modules/@babel/parser/package.json (0 errors) ==== ++ { ++ "name": "@babel/parser", ++ "version": "7.23.6", ++ "main": "./lib/index.js", ++ "types": "./typings/babel-parser.d.ts" ++ } ++ ++==== /node_modules/.pnpm/@babel+parser@7.23.6/node_modules/@babel/parser/typings/babel-parser.d.ts (0 errors) ==== ++ export declare function createPlugin(): PluginConfig; ++ export declare class PluginConfig {} ++ ++==== /packages/compiler-core/package.json (0 errors) ==== ++ { ++ "name": "@vue/compiler-core", ++ "version": "3.0.0", ++ "main": "./src/index.ts", ++ "dependencies": { ++ "@babel/parser": "^7.0.0" ++ } ++ } ++ ++==== /packages/compiler-sfc/package.json (0 errors) ==== ++ { ++ "name": "@vue/compiler-sfc", ++ "version": "3.0.0", ++ "main": "./src/index.ts", ++ "dependencies": { ++ "@babel/parser": "^7.0.0", ++ "@vue/compiler-core": "^3.0.0" ++ } ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitOutFileBundlePaths.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitOutFileBundlePaths.errors.txt.diff new file mode 100644 index 0000000000..fd3212568d --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitOutFileBundlePaths.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.declarationEmitOutFileBundlePaths.errors.txt ++++ new.declarationEmitOutFileBundlePaths.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== js/versions.static.js (0 errors) ==== ++ export default { ++ "@a/b": "1.0.0", ++ "@a/c": "1.2.3" ++ }; ++==== js/index.js (0 errors) ==== ++ import versions from './versions.static.js'; ++ ++ export { ++ versions ++ }; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPathMappingMonorepo.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPathMappingMonorepo.errors.txt.diff new file mode 100644 index 0000000000..abc2119e00 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPathMappingMonorepo.errors.txt.diff @@ -0,0 +1,38 @@ +--- old.declarationEmitPathMappingMonorepo.errors.txt ++++ new.declarationEmitPathMappingMonorepo.errors.txt +@@= skipped -0, +0 lines =@@ +- ++packages/b/tsconfig.json(5,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== packages/b/tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "outDir": "dist", ++ "declaration": true, ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "@ts-bug/a": ["../a"] ++ } ++ } ++ } ++ ++ ++==== packages/b/src/index.ts (0 errors) ==== ++ import { a } from "@ts-bug/a"; ++ ++ export function b(text: string) { ++ return a(text); ++ } ++==== packages/a/index.d.ts (0 errors) ==== ++ declare module "@ts-bug/a" { ++ export type AText = { ++ value: string; ++ }; ++ export function a(text: string): AText; ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPathMappingMonorepo2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPathMappingMonorepo2.errors.txt.diff index 2c0128007c..337c52358b 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPathMappingMonorepo2.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPathMappingMonorepo2.errors.txt.diff @@ -3,14 +3,19 @@ @@= skipped -0, +0 lines =@@ - +packages/lab/src/index.ts(1,31): error TS2307: Cannot find module '@ts-bug/core/utils' or its corresponding type declarations. ++packages/lab/tsconfig.json(5,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./../*"}' instead. + + -+==== packages/lab/tsconfig.json (0 errors) ==== ++==== packages/lab/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "outDir": "dist", + "declaration": true, + "baseUrl": "../", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./../*"}' instead. + "paths": { + "@ts-bug/core": ["./core/src"], + "@ts-bug/core/*": ["./core/src/*"], diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPrefersPathKindBasedOnBundling.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPrefersPathKindBasedOnBundling.errors.txt.diff new file mode 100644 index 0000000000..0f33e1d9f5 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitPrefersPathKindBasedOnBundling.errors.txt.diff @@ -0,0 +1,26 @@ +--- old.declarationEmitPrefersPathKindBasedOnBundling.errors.txt ++++ new.declarationEmitPrefersPathKindBasedOnBundling.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++==== src/lib/operators/scalar.ts (0 errors) ==== ++ export interface Scalar { ++ (): string; ++ value: number; ++ } ++ ++ export function scalar(value: string): Scalar { ++ return null as any; ++ } ++==== src/settings/spacing.ts (0 errors) ==== ++ import { scalar } from '../lib/operators/scalar'; ++ ++ export default { ++ get xs() { ++ return scalar("14px"); ++ } ++ }; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteErrorWithOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationFileOverwriteErrorWithOut.errors.txt.diff similarity index 71% rename from testdata/baselines/reference/submodule/compiler/declarationFileOverwriteErrorWithOut.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/declarationFileOverwriteErrorWithOut.errors.txt.diff index fa6315e1f1..906e105f99 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteErrorWithOut.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationFileOverwriteErrorWithOut.errors.txt.diff @@ -7,12 +7,10 @@ - -!!! error TS5055: Cannot write file '/out.d.ts' because it would overwrite input file. -!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --==== /out.d.ts (0 errors) ==== -- declare class c { -- } -- --==== /a.ts (0 errors) ==== -- class d { -- } -- -+ \ No newline at end of file ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== /out.d.ts (0 errors) ==== + declare class c { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationFilesGeneratingTypeReferences.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationFilesGeneratingTypeReferences.errors.txt.diff new file mode 100644 index 0000000000..97e8bb6ee0 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationFilesGeneratingTypeReferences.errors.txt.diff @@ -0,0 +1,19 @@ +--- old.declarationFilesGeneratingTypeReferences.errors.txt ++++ new.declarationFilesGeneratingTypeReferences.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== /a/node_modules/@types/jquery/index.d.ts (0 errors) ==== ++ interface JQuery { ++ ++ } ++ ++==== /a/app.ts (0 errors) ==== ++ /// ++ namespace Test { ++ export var x: JQuery; ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationMapsOutFile2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationMapsOutFile2.errors.txt.diff new file mode 100644 index 0000000000..2068ff05ce --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationMapsOutFile2.errors.txt.diff @@ -0,0 +1,23 @@ +--- old.declarationMapsOutFile2.errors.txt ++++ new.declarationMapsOutFile2.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class Foo { ++ doThing(x: {a: number}) { ++ return {b: x.a}; ++ } ++ static make() { ++ return new Foo(); ++ } ++ } ++==== index.ts (0 errors) ==== ++ const c = new Foo(); ++ c.doThing({a: 42}); ++ ++ let x = c.doThing({a: 12}); ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/declarationMapsWithSourceMap.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/declarationMapsWithSourceMap.errors.txt.diff new file mode 100644 index 0000000000..3c2e0e39e8 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/declarationMapsWithSourceMap.errors.txt.diff @@ -0,0 +1,23 @@ +--- old.declarationMapsWithSourceMap.errors.txt ++++ new.declarationMapsWithSourceMap.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class Foo { ++ doThing(x: {a: number}) { ++ return {b: x.a}; ++ } ++ static make() { ++ return new Foo(); ++ } ++ } ++==== index.ts (0 errors) ==== ++ const c = new Foo(); ++ c.doThing({a: 42}); ++ ++ let x = c.doThing({a: 12}); ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/elidedJSImport2(module=commonjs).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/elidedJSImport2(module=commonjs).errors.txt.diff deleted file mode 100644 index e3cf048904..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/elidedJSImport2(module=commonjs).errors.txt.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.elidedJSImport2(module=commonjs).errors.txt -+++ new.elidedJSImport2(module=commonjs).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== index.js (0 errors) ==== -- import { Foo } from "./other.js"; -- import * as other from "./other.js"; -- import defaultFoo from "./other.js"; -- -- const x = new Foo(); -- const y = other.Foo(); -- const z = new defaultFoo(); -- --==== other.d.ts (0 errors) ==== -- export interface Foo { -- bar: number; -- } -- -- export default interface Bar { -- foo: number; -- } -- --==== other.js (0 errors) ==== -- export class Foo { -- bar = 2.4; -- } -- -- export default class Bar { -- foo = 1.2; -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/elidedJSImport2(module=es2022).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/elidedJSImport2(module=es2022).errors.txt.diff deleted file mode 100644 index 6c52551202..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/elidedJSImport2(module=es2022).errors.txt.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.elidedJSImport2(module=es2022).errors.txt -+++ new.elidedJSImport2(module=es2022).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== index.js (0 errors) ==== -- import { Foo } from "./other.js"; -- import * as other from "./other.js"; -- import defaultFoo from "./other.js"; -- -- const x = new Foo(); -- const y = other.Foo(); -- const z = new defaultFoo(); -- --==== other.d.ts (0 errors) ==== -- export interface Foo { -- bar: number; -- } -- -- export default interface Bar { -- foo: number; -- } -- --==== other.js (0 errors) ==== -- export class Foo { -- bar = 2.4; -- } -- -- export default class Bar { -- foo = 1.2; -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/incrementalOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/incrementalOut.errors.txt.diff new file mode 100644 index 0000000000..b5cd0c5543 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/incrementalOut.errors.txt.diff @@ -0,0 +1,12 @@ +--- old.incrementalOut.errors.txt ++++ new.incrementalOut.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== incrementalOut.ts (0 errors) ==== ++ const x = 10; ++ ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/inlineSourceMap2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/inlineSourceMap2.errors.txt.diff new file mode 100644 index 0000000000..f072172c64 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/inlineSourceMap2.errors.txt.diff @@ -0,0 +1,14 @@ +--- old.inlineSourceMap2.errors.txt ++++ new.inlineSourceMap2.errors.txt +@@= skipped -0, +0 lines =@@ + error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. + error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + + !!! error TS5053: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'. + !!! error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== inlineSourceMap2.ts (0 errors) ==== + // configuration errors + \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/inlineSources.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/inlineSources.errors.txt.diff new file mode 100644 index 0000000000..9078ab82cc --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/inlineSources.errors.txt.diff @@ -0,0 +1,16 @@ +--- old.inlineSources.errors.txt ++++ new.inlineSources.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ var a = 0; ++ console.log(a); ++ ++==== b.ts (0 errors) ==== ++ var b = 0; ++ console.log(b); ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/inlineSources2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/inlineSources2.errors.txt.diff new file mode 100644 index 0000000000..ea85eccc64 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/inlineSources2.errors.txt.diff @@ -0,0 +1,16 @@ +--- old.inlineSources2.errors.txt ++++ new.inlineSources2.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ var a = 0; ++ console.log(a); ++ ++==== b.ts (0 errors) ==== ++ var b = 0; ++ console.log(b); ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/isolatedDeclarationsAllowJs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/isolatedDeclarationsAllowJs.errors.txt.diff index d8c44561f1..1241ea74bb 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/isolatedDeclarationsAllowJs.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/isolatedDeclarationsAllowJs.errors.txt.diff @@ -1,20 +1,20 @@ --- old.isolatedDeclarationsAllowJs.errors.txt +++ new.isolatedDeclarationsAllowJs.errors.txt @@= skipped -0, +0 lines =@@ --error TS5053: Option 'allowJs' cannot be specified with option 'isolatedDeclarations'. --error TS5055: Cannot write file 'file2.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5053: Option 'allowJs' cannot be specified with option 'isolatedDeclarations'. + error TS5055: Cannot write file 'file2.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -file1.ts(1,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -- -- --!!! error TS5053: Option 'allowJs' cannot be specified with option 'isolatedDeclarations'. --!!! error TS5055: Cannot write file 'file2.js' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + + !!! error TS5053: Option 'allowJs' cannot be specified with option 'isolatedDeclarations'. + !!! error TS5055: Cannot write file 'file2.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. -==== file1.ts (1 errors) ==== -- export var x; ++==== file1.ts (0 errors) ==== + export var x; - ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 file1.ts:1:12: Add a type annotation to the variable x. --==== file2.js (0 errors) ==== -- export var y; -+ \ No newline at end of file + ==== file2.js (0 errors) ==== + export var y; \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsDeclarationEmitExportedClassWithExtends.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsDeclarationEmitExportedClassWithExtends.errors.txt.diff index 056b6ed454..1a81cea926 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsDeclarationEmitExportedClassWithExtends.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsDeclarationEmitExportedClassWithExtends.errors.txt.diff @@ -1,48 +1,11 @@ --- old.jsDeclarationEmitExportedClassWithExtends.errors.txt +++ new.jsDeclarationEmitExportedClassWithExtends.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== node_modules/lit/package.json (0 errors) ==== -- { -- "name": "lit", -- "version": "0.0.1", -- "type": "module", -- "exports": { -- ".": { -- "types": "./development/index.d.ts" -- } -- } -- } --==== node_modules/lit/development/index.d.ts (0 errors) ==== -- export * from "lit-element/lit-element.js"; --==== node_modules/lit-element/package.json (0 errors) ==== -- { -- "name": "lit-element", -- "version": "0.0.1", -- "type": "module", -- "exports": { -- ".": { -- "types": "./development/index.d.ts" -- }, -- "./lit-element.js": { -- "types": "./development/lit-element.d.ts" -- } -- } -- } --==== node_modules/lit-element/development/index.d.ts (0 errors) ==== -- export * from "./lit-element.js"; +@@= skipped -30, +30 lines =@@ + } + ==== node_modules/lit-element/development/index.d.ts (0 errors) ==== + export * from "./lit-element.js"; -==== node_modules/lit-element/development//lit-element.d.ts (0 errors) ==== -- export class LitElement {} --==== package.json (0 errors) ==== -- { -- "type": "module", -- "private": true -- } --==== index.js (0 errors) ==== -- import { LitElement, LitElement as LitElement2 } from "lit"; -- export class ElementB extends LitElement {} -- export class ElementC extends LitElement2 {} -+ \ No newline at end of file ++==== node_modules/lit-element/development/lit-element.d.ts (0 errors) ==== + export class LitElement {} + ==== package.json (0 errors) ==== + { \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationAbstractModifier.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationAbstractModifier.errors.txt.diff index ca83426250..ceba0f9db3 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationAbstractModifier.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationAbstractModifier.errors.txt.diff @@ -1,20 +1,20 @@ --- old.jsFileCompilationAbstractModifier.errors.txt +++ new.jsFileCompilationAbstractModifier.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,1): error TS8009: The 'abstract' modifier can only be used in TypeScript files. -a.js(2,5): error TS8009: The 'abstract' modifier can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 (2 errors) ==== -- abstract class c { ++==== a.js (0 errors) ==== + abstract class c { - ~~~~~~~~ -!!! error TS8009: The 'abstract' modifier can only be used in TypeScript files. -- abstract x; + abstract x; - ~~~~~~~~ -!!! error TS8009: The 'abstract' modifier 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/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt.diff index 057a42bafe..b6b3c82d97 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationAmbientVarDeclarationSyntax.errors.txt +++ new.jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,1): error TS8009: The 'declare' modifier can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- declare var v; ++==== a.js (0 errors) ==== + declare var v; - ~~~~~~~ --!!! error TS8009: The 'declare' modifier can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8009: The 'declare' modifier can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationClassMethodContainingArrowFunction.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationClassMethodContainingArrowFunction.errors.txt.diff new file mode 100644 index 0000000000..801e55a5b0 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationClassMethodContainingArrowFunction.errors.txt.diff @@ -0,0 +1,19 @@ +--- old.jsFileCompilationClassMethodContainingArrowFunction.errors.txt ++++ new.jsFileCompilationClassMethodContainingArrowFunction.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! 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. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.js (0 errors) ==== ++ class c { ++ method(a) { ++ let x = a => this.method(a); ++ } ++ } ++ \ 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 new file mode 100644 index 0000000000..0e0a30a8b4 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateFunctionImplementation.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.jsFileCompilationDuplicateFunctionImplementation.errors.txt ++++ new.jsFileCompilationDuplicateFunctionImplementation.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + a.ts(1,10): error TS2393: Duplicate function implementation. + + ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== b.js (0 errors) ==== + function foo() { + return 10; \ 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 new file mode 100644 index 0000000000..70265e7427 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt ++++ new.jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + a.ts(1,10): error TS2393: Duplicate function implementation. + + ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== a.ts (1 errors) ==== + function foo() { + ~~~ \ 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 new file mode 100644 index 0000000000..fbe44be830 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateVariable.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.jsFileCompilationDuplicateVariable.errors.txt ++++ new.jsFileCompilationDuplicateVariable.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ var x = 10; ++ ++==== b.js (0 errors) ==== ++ var x = "hello"; // Error is recorded here, but suppressed because the js file isn't checked ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateVariableErrorReported.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateVariableErrorReported.errors.txt.diff new file mode 100644 index 0000000000..50718c6410 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationDuplicateVariableErrorReported.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.jsFileCompilationDuplicateVariableErrorReported.errors.txt ++++ new.jsFileCompilationDuplicateVariableErrorReported.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + a.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'. + + ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== b.js (0 errors) ==== + var x = "hello"; + \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitBlockedCorrectly.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitBlockedCorrectly.errors.txt.diff deleted file mode 100644 index 56775be1e6..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitBlockedCorrectly.errors.txt.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.jsFileCompilationEmitBlockedCorrectly.errors.txt -+++ new.jsFileCompilationEmitBlockedCorrectly.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. -- -- --!!! 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. --!!! error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. --==== a.ts (0 errors) ==== -- class c { -- } -- --==== b.ts (0 errors) ==== -- // this should be emitted -- class d { -- } -- --==== a.js (0 errors) ==== -- function foo() { -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitDeclarations.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitDeclarations.errors.txt.diff new file mode 100644 index 0000000000..a5e1e98ecb --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitDeclarations.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.jsFileCompilationEmitDeclarations.errors.txt ++++ new.jsFileCompilationEmitDeclarations.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class c { ++ } ++ ++==== b.js (0 errors) ==== ++ function foo() { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitTrippleSlashReference.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitTrippleSlashReference.errors.txt.diff new file mode 100644 index 0000000000..bd80e773b1 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEmitTrippleSlashReference.errors.txt.diff @@ -0,0 +1,29 @@ +--- old.jsFileCompilationEmitTrippleSlashReference.errors.txt ++++ new.jsFileCompilationEmitTrippleSlashReference.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5055: Cannot write file 'c.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5055: Cannot write file 'c.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class c { ++ } ++ ++==== b.js (0 errors) ==== ++ /// ++ function foo() { ++ } ++ ++==== c.js (0 errors) ==== ++ function bar() { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEnumSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEnumSyntax.errors.txt.diff index ae4611c2a0..216b463d40 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEnumSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationEnumSyntax.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationEnumSyntax.errors.txt +++ new.jsFileCompilationEnumSyntax.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,6): error TS8006: 'enum' declarations can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- enum E { } ++==== a.js (0 errors) ==== + enum E { } - ~ --!!! error TS8006: 'enum' declarations can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8006: 'enum' declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt.diff deleted file mode 100644 index 3f4d78b97f..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt -+++ new.jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'c.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! error TS5055: Cannot write file 'c.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.ts (0 errors) ==== -- class c { -- } -- --==== b.ts (0 errors) ==== -- /// -- // b.d.ts should have c.d.ts as the reference path -- function foo() { -- } -- --==== c.js (0 errors) ==== -- function bar() { -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt.diff new file mode 100644 index 0000000000..dcdb165e16 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt.diff @@ -0,0 +1,25 @@ +--- old.jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt ++++ new.jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'c.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'c.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class c { ++ } ++ ++==== b.ts (0 errors) ==== ++ /// ++ function foo() { ++ } ++ ++==== c.js (0 errors) ==== ++ function bar() { ++ } ++ \ 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 60680cb98b..530f0d0ab4 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationExportAssignmentSyntax.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationExportAssignmentSyntax.errors.txt +++ new.jsFileCompilationExportAssignmentSyntax.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,1): error TS8003: 'export =' can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- export = b; ++==== a.js (0 errors) ==== + export = b; - ~~~~~~~~~~~ --!!! error TS8003: 'export =' can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8003: 'export =' can only be used in TypeScript files. \ 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 05d36ec8a4..a710e3349d 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt +++ new.jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,9): error TS8005: 'implements' clauses can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- class C implements D { } ++==== a.js (0 errors) ==== + class C implements D { } - ~~~~~~~~~~~~ --!!! error TS8005: 'implements' clauses can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8005: 'implements' clauses can only be used in TypeScript files. \ 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 00077eac3c..36f4f35e3f 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationImportEqualsSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationImportEqualsSyntax.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationImportEqualsSyntax.errors.txt +++ new.jsFileCompilationImportEqualsSyntax.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,1): error TS8002: 'import ... =' can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- import a = b; ++==== a.js (0 errors) ==== + import a = b; - ~~~~~~~~~~~~~ --!!! error TS8002: 'import ... =' can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8002: 'import ... =' can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationInterfaceSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationInterfaceSyntax.errors.txt.diff index 3b84fccbba..b7090eb786 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationInterfaceSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationInterfaceSyntax.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationInterfaceSyntax.errors.txt +++ new.jsFileCompilationInterfaceSyntax.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,11): error TS8006: 'interface' declarations can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- interface I { } ++==== a.js (0 errors) ==== + interface I { } - ~ --!!! error TS8006: 'interface' declarations can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8006: 'interface' declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetBeingRenamed.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetBeingRenamed.errors.txt.diff new file mode 100644 index 0000000000..207a2ba312 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetBeingRenamed.errors.txt.diff @@ -0,0 +1,19 @@ +--- old.jsFileCompilationLetBeingRenamed.errors.txt ++++ new.jsFileCompilationLetBeingRenamed.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! 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. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.js (0 errors) ==== ++ function foo(a) { ++ for (let a = 0; a < 10; a++) { ++ // do something ++ } ++ } ++ \ 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 new file mode 100644 index 0000000000..07628a3880 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetDeclarationOrder.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.jsFileCompilationLetDeclarationOrder.errors.txt ++++ new.jsFileCompilationLetDeclarationOrder.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== b.js (0 errors) ==== ++ let a = 10; ++ b = 30; ++ ++==== a.ts (0 errors) ==== ++ let b = 30; ++ a = 10; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetDeclarationOrder2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetDeclarationOrder2.errors.txt.diff new file mode 100644 index 0000000000..a33f3984a1 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationLetDeclarationOrder2.errors.txt.diff @@ -0,0 +1,24 @@ +--- old.jsFileCompilationLetDeclarationOrder2.errors.txt ++++ new.jsFileCompilationLetDeclarationOrder2.errors.txt +@@= skipped -0, +0 lines =@@ +-a.ts(2,1): error TS2448: Block-scoped variable 'a' used before its declaration. +- +- +-==== a.ts (1 errors) ==== ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== + let b = 30; + a = 10; +- ~ +-!!! error TS2448: Block-scoped variable 'a' used before its declaration. +-!!! related TS2728 b.js:1:5: 'a' is declared here. + ==== b.js (0 errors) ==== + let a = 10; + b = 30; \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationModuleSyntax.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationModuleSyntax.errors.txt.diff index c322194367..fea4d1f2ef 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationModuleSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationModuleSyntax.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationModuleSyntax.errors.txt +++ new.jsFileCompilationModuleSyntax.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,8): error TS8006: 'module' declarations can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- module M { } ++==== a.js (0 errors) ==== + module M { } - ~ --!!! error TS8006: 'module' declarations can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8006: 'module' declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt.diff deleted file mode 100644 index 2143880804..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt -+++ new.jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'c.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! error TS5055: Cannot write file 'c.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.ts (0 errors) ==== -- class c { -- } -- --==== b.ts (0 errors) ==== -- /// -- // no error on above reference path since not emitting declarations -- function foo() { -- } -- --==== c.js (0 errors) ==== -- function bar() { -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.errors.txt.diff new file mode 100644 index 0000000000..c8679c9130 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.errors.txt.diff @@ -0,0 +1,26 @@ +--- old.jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.errors.txt ++++ new.jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'c.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'c.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class c { ++ } ++ ++==== b.ts (0 errors) ==== ++ /// ++ //no error on above reference since not emitting declarations ++ function foo() { ++ } ++ ++==== c.js (0 errors) ==== ++ function bar() { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNonNullAssertion.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNonNullAssertion.errors.txt.diff index 49f06fda71..5599398c6c 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNonNullAssertion.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationNonNullAssertion.errors.txt.diff @@ -5,8 +5,16 @@ - - -==== /src/a.js (1 errors) ==== -- 0! ++error TS5055: Cannot write file '/src/a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file '/src/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. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== /src/a.js (0 errors) ==== + 0! - ~~ -!!! error TS8013: Non-null assertions 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/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt.diff index a0b034f6ff..7a2b34613c 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt.diff @@ -1,22 +1,22 @@ --- old.jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt +++ new.jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(2,8): error TS8009: The '?' modifier can only be used in TypeScript files. -a.js(4,8): error TS8009: The '?' modifier can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 (2 errors) ==== -- class C { -- foo?() { ++==== a.js (0 errors) ==== + class C { + foo?() { - ~ -!!! error TS8009: The '?' modifier can only be used in TypeScript files. -- } -- bar? = 1; + } + bar? = 1; - ~ -!!! error TS8009: The '?' modifier 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/jsFileCompilationOptionalParameter.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationOptionalParameter.errors.txt.diff index f17694a5b4..1449369838 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationOptionalParameter.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationOptionalParameter.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationOptionalParameter.errors.txt +++ new.jsFileCompilationOptionalParameter.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,13): error TS8009: The '?' modifier can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- function F(p?) { } ++==== a.js (0 errors) ==== + function F(p?) { } - ~ --!!! error TS8009: The '?' modifier can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8009: The '?' modifier can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt.diff index 143ff3571d..7b12a213e1 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt.diff @@ -1,18 +1,18 @@ --- old.jsFileCompilationPublicMethodSyntaxOfClass.errors.txt +++ new.jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(2,5): error TS8009: The 'public' modifier can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- class C { -- public foo() { ++==== a.js (0 errors) ==== + class C { + public foo() { - ~~~~~~ -!!! error TS8009: The 'public' modifier 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/jsFileCompilationPublicParameterModifier.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationPublicParameterModifier.errors.txt.diff index e09006c18e..9563e07b1a 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationPublicParameterModifier.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationPublicParameterModifier.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationPublicParameterModifier.errors.txt +++ new.jsFileCompilationPublicParameterModifier.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,23): error TS8012: Parameter modifiers can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- class C { constructor(public x) { }} ++==== a.js (0 errors) ==== + class C { constructor(public x) { }} - ~~~~~~ --!!! error TS8012: Parameter modifiers can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8012: Parameter modifiers can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationRestParameter.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationRestParameter.errors.txt.diff new file mode 100644 index 0000000000..ef86de6a95 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationRestParameter.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.jsFileCompilationRestParameter.errors.txt ++++ new.jsFileCompilationRestParameter.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! 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. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.js (0 errors) ==== ++ function foo(...a) { } ++ \ 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 5e500bbd82..2fbcaadba2 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt +++ new.jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,15): error TS8010: Type annotations can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- function F(): number { } ++==== a.js (0 errors) ==== + function F(): number { } - ~~~~~~ --!!! error TS8010: Type annotations can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationShortHandProperty.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationShortHandProperty.errors.txt.diff new file mode 100644 index 0000000000..214cb808a0 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationShortHandProperty.errors.txt.diff @@ -0,0 +1,22 @@ +--- old.jsFileCompilationShortHandProperty.errors.txt ++++ new.jsFileCompilationShortHandProperty.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! 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. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.js (0 errors) ==== ++ function foo() { ++ var a = 10; ++ var b = "Hello"; ++ return { ++ a, ++ b ++ }; ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationSyntaxError.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationSyntaxError.errors.txt.diff deleted file mode 100644 index 4ab5110bb2..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationSyntaxError.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.jsFileCompilationSyntaxError.errors.txt -+++ new.jsFileCompilationSyntaxError.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! 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 (0 errors) ==== -- /** -- * @type {number} -- * @type {string} -- */ -- var v; -- -+ \ 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 9de5cd2c94..c78a471eb3 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationTypeAliasSyntax.errors.txt +++ new.jsFileCompilationTypeAliasSyntax.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,6): error TS8008: Type aliases can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- type a = b; ++==== a.js (0 errors) ==== + type a = b; - ~ --!!! error TS8008: Type aliases can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8008: Type aliases can only be used in TypeScript files. \ 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 deleted file mode 100644 index 920ee806f9..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAliasSyntax.types.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- 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/jsFileCompilationTypeAssertions.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAssertions.errors.txt.diff index c5c94d57ca..89dc3ac954 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAssertions.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeAssertions.errors.txt.diff @@ -2,11 +2,17 @@ +++ 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. ++error TS5055: Cannot write file '/src/a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. /src/a.js(2,10): error TS17008: JSX element 'string' has no corresponding closing tag. /src/a.js(3,1): error TS1005: ' \ No newline at end of file +-!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt.diff index d62372836f..cf5851e510 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationTypeParameterSyntaxOfClass.errors.txt +++ new.jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,9): error TS8004: Type parameter declarations can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- class C { } ++==== a.js (0 errors) ==== + class C { } - ~ --!!! error TS8004: Type parameter declarations can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8004: Type parameter declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt.diff index 284305e5be..ccebf9c041 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt +++ new.jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,12): error TS8004: Type parameter declarations can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- function F() { } ++==== a.js (0 errors) ==== + function F() { } - ~ --!!! error TS8004: Type parameter declarations can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8004: Type parameter declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeSyntaxOfVar.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeSyntaxOfVar.errors.txt.diff index a1b6e6c83c..eb1c29ba40 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeSyntaxOfVar.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationTypeSyntaxOfVar.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsFileCompilationTypeSyntaxOfVar.errors.txt +++ new.jsFileCompilationTypeSyntaxOfVar.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,8): error TS8010: Type annotations can only be used in TypeScript files. -- -- --!!! 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. + + + !!! 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 errors) ==== -- var v: () => number; ++==== a.js (0 errors) ==== + var v: () => number; - ~~~~~~~~~~~~ --!!! error TS8010: Type annotations can only be used in TypeScript files. -+ \ No newline at end of file +-!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithEnabledCompositeOption.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithEnabledCompositeOption.errors.txt.diff new file mode 100644 index 0000000000..72c1287a7e --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithEnabledCompositeOption.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.jsFileCompilationWithEnabledCompositeOption.errors.txt ++++ new.jsFileCompilationWithEnabledCompositeOption.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class c { ++ } ++ ++==== b.js (0 errors) ==== ++ function foo() { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt.diff deleted file mode 100644 index f2293b8e5a..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.jsFileCompilationWithJsEmitPathSameAsInput.errors.txt -+++ new.jsFileCompilationWithJsEmitPathSameAsInput.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. -- -- --!!! 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. --!!! error TS5056: Cannot write file 'a.js' because it would be overwritten by multiple input files. --==== a.ts (0 errors) ==== -- class c { -- } -- --==== a.js (0 errors) ==== -- function foo() { -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithMapFileAsJs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithMapFileAsJs.errors.txt.diff index 7de5e76cce..3ab4e20c9e 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithMapFileAsJs.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithMapFileAsJs.errors.txt.diff @@ -1,27 +1,18 @@ --- old.jsFileCompilationWithMapFileAsJs.errors.txt +++ new.jsFileCompilationWithMapFileAsJs.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'b.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -error TS6054: File 'b.js.map' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. - The file is in the program because: - Root file specified for compilation -- -- --!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + + !!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. + !!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -!!! error TS6054: File 'b.js.map' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. -!!! error TS6054: The file is in the program because: -!!! error TS6054: Root file specified for compilation --==== a.ts (0 errors) ==== -- class c { -- } -- --==== b.js.map (0 errors) ==== -- function foo() { -- } -- --==== b.js (0 errors) ==== -- function bar() { -- } -+ \ No newline at end of file + ==== a.ts (0 errors) ==== + class c { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt.diff index a3cc113792..47c9caba5b 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt.diff @@ -1,27 +1,18 @@ --- old.jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt +++ new.jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'b.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -error TS6054: File 'b.js.map' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. - The file is in the program because: - Root file specified for compilation -- -- --!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + + + !!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. + !!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -!!! error TS6054: File 'b.js.map' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. -!!! error TS6054: The file is in the program because: -!!! error TS6054: Root file specified for compilation --==== a.ts (0 errors) ==== -- class c { -- } -- --==== b.js.map (0 errors) ==== -- function foo() { -- } -- --==== b.js (0 errors) ==== -- function bar() { -- } -+ \ No newline at end of file + ==== a.ts (0 errors) ==== + class c { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOut.errors.txt.diff new file mode 100644 index 0000000000..6a293d71f6 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOut.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.jsFileCompilationWithOut.errors.txt ++++ new.jsFileCompilationWithOut.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ class c { ++ } ++ ++==== b.js (0 errors) ==== ++ function foo() { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt.diff similarity index 73% rename from testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt.diff index 724a1f4778..1f86bc14cf 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt.diff @@ -7,11 +7,10 @@ - -!!! error TS5055: Cannot write file '/b.d.ts' because it would overwrite input file. -!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --==== /a.ts (0 errors) ==== -- class c { -- } -- --==== /b.d.ts (0 errors) ==== -- declare function foo(): boolean; -- -+ \ No newline at end of file ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== /a.ts (0 errors) ==== + class c { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt.diff index 05c6244688..0d0626696c 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt.diff @@ -1,18 +1,14 @@ --- old.jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt +++ new.jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file '/b.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! error TS5055: Cannot write file '/b.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.ts (0 errors) ==== -- class c { -- } -- --==== /b.js (0 errors) ==== -- function foo() { -- } -- -+ \ No newline at end of file + error TS5055: Cannot write file '/b.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + + + !!! error TS5055: Cannot write file '/b.js' because it would overwrite input file. + !!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== /a.ts (0 errors) ==== + class c { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithoutOut.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithoutOut.errors.txt.diff deleted file mode 100644 index 0ead58b1b3..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/jsFileCompilationWithoutOut.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.jsFileCompilationWithoutOut.errors.txt -+++ new.jsFileCompilationWithoutOut.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'b.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! error TS5055: Cannot write file 'b.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.ts (0 errors) ==== -- class c { -- } -- --==== b.js (0 errors) ==== -- function foo() { -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/letDeclarations-useBeforeDefinition2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/letDeclarations-useBeforeDefinition2.errors.txt.diff new file mode 100644 index 0000000000..c2d271b455 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/letDeclarations-useBeforeDefinition2.errors.txt.diff @@ -0,0 +1,19 @@ +--- old.letDeclarations-useBeforeDefinition2.errors.txt ++++ new.letDeclarations-useBeforeDefinition2.errors.txt +@@= skipped -0, +0 lines =@@ +-file1.ts(1,1): error TS2448: Block-scoped variable 'l' used before its declaration. +- +- +-==== file1.ts (1 errors) ==== ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== file1.ts (0 errors) ==== + l; +- ~ +-!!! error TS2448: Block-scoped variable 'l' used before its declaration. +-!!! related TS2728 file2.ts:1:7: 'l' is declared here. + + ==== file2.ts (0 errors) ==== + const l = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneDynamicImport(target=es2015).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneDynamicImport(target=es2015).errors.txt.diff index 650bef8479..d83b6dc856 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneDynamicImport(target=es2015).errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneDynamicImport(target=es2015).errors.txt.diff @@ -2,9 +2,15 @@ +++ new.moduleNoneDynamicImport(target=es2015).errors.txt @@= skipped -0, +0 lines =@@ - ++error TS5055: Cannot write file '/b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +/a.ts(1,13): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'. + + ++!!! error TS5055: Cannot write file '/b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /a.ts (1 errors) ==== + const foo = import("./b"); + ~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneDynamicImport(target=es2020).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneDynamicImport(target=es2020).errors.txt.diff index da9f08d27a..185b39bf25 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneDynamicImport(target=es2020).errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneDynamicImport(target=es2020).errors.txt.diff @@ -2,9 +2,15 @@ +++ new.moduleNoneDynamicImport(target=es2020).errors.txt @@= skipped -0, +0 lines =@@ - ++error TS5055: Cannot write file '/b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +/a.ts(1,13): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'. + + ++!!! error TS5055: Cannot write file '/b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== /a.ts (1 errors) ==== + const foo = import("./b"); + ~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneOutFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneOutFile.errors.txt.diff new file mode 100644 index 0000000000..828328de17 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleNoneOutFile.errors.txt.diff @@ -0,0 +1,12 @@ +--- old.moduleNoneOutFile.errors.txt ++++ new.moduleNoneOutFile.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== first.ts (0 errors) ==== ++ class Foo {} ++==== second.ts (0 errors) ==== ++ class Bar extends Foo {} \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt.diff new file mode 100644 index 0000000000..90d4b4c6f8 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt.diff @@ -0,0 +1,59 @@ +--- old.moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt ++++ new.moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/project/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== /project/tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "@shared/*": ["../shared/*"] ++ } ++ }, ++ //"files": ["src/app.ts"] ++ } ++==== /project/src/app.ts (0 errors) ==== ++ import * as t from "anotherLib"; // Include the lib that recursively includes option as relative module resolution in this directory ++ import { makeSharedOption } from "@shared/lib/app"; // Includes option as module in shared folder but as module in node_modules folder ++ ++==== /shared/node_modules/troublesome-lib/package.json (0 errors) ==== ++ { ++ "name": "troublesome-lib", ++ "version": "1.17.1" ++ } ++==== /shared/node_modules/troublesome-lib/lib/Compactable.d.ts (0 errors) ==== ++ import { Option } from './Option'; ++ export class Compactable { ++ option: Option; ++ } ++==== /shared/node_modules/troublesome-lib/lib/Option.d.ts (0 errors) ==== ++ export class Option { ++ someProperty: string; ++ } ++==== /shared/lib/app.d.ts (0 errors) ==== ++ import { Option } from "troublesome-lib/lib/Option"; ++ export class SharedOption extends Option { } ++ export const makeSharedOption: () => SharedOption; ++==== /project/node_modules/anotherLib/index.d.ts (0 errors) ==== ++ import { Compactable } from "troublesome-lib/lib/Compactable"; // Including this will resolve Option as relative through the imports of compactable ++==== /project/node_modules/troublesome-lib/package.json (0 errors) ==== ++ { ++ "name": "troublesome-lib", ++ "version": "1.17.1" ++ } ++==== /project/node_modules/troublesome-lib/lib/Compactable.d.ts (0 errors) ==== ++ import { Option } from './Option'; ++ export class Compactable { ++ option: Option; ++ } ++==== /project/node_modules/troublesome-lib/lib/Option.d.ts (0 errors) ==== ++ export class Option { ++ someProperty: string; ++ } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff new file mode 100644 index 0000000000..d6a6878582 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff @@ -0,0 +1,55 @@ +--- old.moduleResolutionWithExtensions_withPaths.errors.txt ++++ new.moduleResolutionWithExtensions_withPaths.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/tsconfig.json(6,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++/tsconfig.json(11,14): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== /tsconfig.json (2 errors) ==== ++ { ++ "compilerOptions": { ++ "outDir": "lib", ++ "target": "ES6", ++ "module": "ES6", ++ "baseUrl": "/", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "moduleResolution": "Node", ++ "noImplicitAny": true, ++ "traceResolution": true, ++ "paths": { ++ "foo/*": ["node_modules/foo/lib/*"] ++ ~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ } ++ } ++ } ++ ++==== /relative.d.ts (0 errors) ==== ++ export declare function relative(): void; ++ ++ ++==== /test.ts (0 errors) ==== ++ import { test } from "foo/test.js"; ++ import { test as test2 } from "foo/test"; ++ import { relative } from "./relative.js"; ++ import { relative as relative2 } from "./relative"; ++ ++ ++ ++==== /node_modules/foo/lib/test.js (0 errors) ==== ++ export function test() { ++ console.log("test"); ++ } ++ ++==== /node_modules/foo/lib/test.d.ts (0 errors) ==== ++ export declare function test(): void; ++ ++==== /relative.js (0 errors) ==== ++ export function relative() { ++ console.log("test"); ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt.diff new file mode 100644 index 0000000000..3e388380a0 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt.diff @@ -0,0 +1,54 @@ +--- old.moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt ++++ new.moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/tsconfig.json(9,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++/tsconfig.json(11,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(12,23): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== /tsconfig.json (3 errors) ==== ++ { ++ "compilerOptions": { ++ "allowJs": true, ++ "checkJs": false, ++ "outDir": "bin", ++ "moduleResolution": "node", ++ "traceResolution": true, ++ "moduleSuffixes": [".ios"], ++ "baseUrl": "/", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "some-library": ["node_modules/some-library/lib"], ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ "some-library/*": ["node_modules/some-library/lib/*"] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ } ++ } ++ } ++ ++==== /test.ts (0 errors) ==== ++ import { ios } from "some-library"; ++ import { ios as ios2 } from "some-library/index"; ++ import { ios as ios3 } from "some-library/index.js"; ++ ++==== /node_modules/some-library/lib/index.ios.js (0 errors) ==== ++ "use strict"; ++ exports.__esModule = true; ++ function ios() {} ++ exports.ios = ios; ++==== /node_modules/some-library/lib/index.ios.d.ts (0 errors) ==== ++ export declare function ios(): void; ++==== /node_modules/some-library/lib/index.js (0 errors) ==== ++ "use strict"; ++ exports.__esModule = true; ++ function base() {} ++ exports.base = base; ++==== /node_modules/some-library/lib/index.d.ts (0 errors) ==== ++ export declare function base(): void; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionsOutAndNoModuleGen.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/optionsOutAndNoModuleGen.errors.txt.diff similarity index 62% rename from testdata/baselines/reference/submodule/compiler/optionsOutAndNoModuleGen.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/optionsOutAndNoModuleGen.errors.txt.diff index 43ed13c5f6..50dc55f52f 100644 --- a/testdata/baselines/reference/submodule/compiler/optionsOutAndNoModuleGen.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/optionsOutAndNoModuleGen.errors.txt.diff @@ -5,8 +5,12 @@ - - -==== optionsOutAndNoModuleGen.ts (1 errors) ==== -- export var x = 10; ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== optionsOutAndNoModuleGen.ts (0 errors) ==== + export var x = 10; - ~~~~~~~~~~~~~~~~~~ -!!! error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. -- -+ \ No newline at end of file + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/out-flag2.errors.txt.diff similarity index 51% rename from testdata/baselines/reference/submodule/compiler/out-flag2.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/out-flag2.errors.txt.diff index 644d8522e5..bc4be59555 100644 --- a/testdata/baselines/reference/submodule/compiler/out-flag2.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/out-flag2.errors.txt.diff @@ -5,10 +5,10 @@ - - -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. --==== a.ts (0 errors) ==== -- class A { } -- --==== b.ts (0 errors) ==== -- class B { } -- -+ \ No newline at end of file ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== a.ts (0 errors) ==== + class A { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/out-flag3.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/out-flag3.errors.txt.diff similarity index 51% rename from testdata/baselines/reference/submodule/compiler/out-flag3.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/out-flag3.errors.txt.diff index 99509da87f..4d0cf1ba57 100644 --- a/testdata/baselines/reference/submodule/compiler/out-flag3.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/out-flag3.errors.txt.diff @@ -5,10 +5,10 @@ - - -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. --==== a.ts (0 errors) ==== -- class A { } -- --==== b.ts (0 errors) ==== -- class B { } -- -+ \ No newline at end of file ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== a.ts (0 errors) ==== + class A { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatCommonjs.errors.txt.diff similarity index 53% rename from testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatCommonjs.errors.txt.diff index be4aab57c9..fdb2458a5e 100644 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatCommonjs.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatCommonjs.errors.txt.diff @@ -5,11 +5,10 @@ - - -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. --==== ref/a.ts (0 errors) ==== -- export class A { } -- --==== b.ts (0 errors) ==== -- import {A} from "./ref/a"; -- export class B extends A { } -- -+ \ No newline at end of file ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== ref/a.ts (0 errors) ==== + export class A { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatCommonjsDeclarationOnly.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatCommonjsDeclarationOnly.errors.txt.diff new file mode 100644 index 0000000000..5139b34766 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatCommonjsDeclarationOnly.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.outModuleConcatCommonjsDeclarationOnly.errors.txt ++++ new.outModuleConcatCommonjsDeclarationOnly.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== ref/a.ts (0 errors) ==== ++ export class A { } ++ ++==== b.ts (0 errors) ==== ++ import {A} from "./ref/a"; ++ export class B extends A { } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatES6.errors.txt.diff similarity index 52% rename from testdata/baselines/reference/submodule/compiler/outModuleConcatES6.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatES6.errors.txt.diff index 2f71174d41..7956c71daf 100644 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatES6.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatES6.errors.txt.diff @@ -5,10 +5,10 @@ - - -!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. --==== ref/a.ts (0 errors) ==== -- export class A { } -- --==== b.ts (0 errors) ==== -- import {A} from "./ref/a"; -- export class B extends A { } -+ \ No newline at end of file ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== ref/a.ts (0 errors) ==== + export class A { } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt.diff similarity index 57% rename from testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt.diff index f1ad0cc470..99b0bfea42 100644 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatUnspecifiedModuleKind.errors.txt.diff @@ -5,10 +5,14 @@ - - -==== a.ts (1 errors) ==== -- export class A { } // module ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== + export class A { } // module - ~ -!!! error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. -- --==== b.ts (0 errors) ==== -- var x = 0; // global -+ \ No newline at end of file + + ==== b.ts (0 errors) ==== + var x = 0; // global \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt.diff similarity index 62% rename from testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt.diff index 3b28d97510..79a662f7aa 100644 --- a/testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt.diff @@ -5,10 +5,10 @@ - - -!!! error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. --==== a.ts (0 errors) ==== -- export class A { } // module -- --==== b.ts (0 errors) ==== -- var x = 0; // global -- -+ \ No newline at end of file ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== a.ts (0 errors) ==== + export class A { } // module + \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution2_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution2_node.errors.txt.diff index bc615e85e7..89bf4d0547 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution2_node.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution2_node.errors.txt.diff @@ -1,24 +1,31 @@ --- old.pathMappingBasedModuleResolution2_node.errors.txt +++ new.pathMappingBasedModuleResolution2_node.errors.txt @@= skipped -0, +0 lines =@@ --root/tsconfig.json(5,13): error TS5061: Pattern '*1*' can have at most one '*' character. --root/tsconfig.json(5,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ++root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./src/*"}' instead. + root/tsconfig.json(5,13): error TS5061: Pattern '*1*' can have at most one '*' character. + root/tsconfig.json(5,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. - - -==== root/tsconfig.json (2 errors) ==== -- { -- "compilerOptions": { -- "baseUrl": "./src", -- "paths": { -- "*1*": [ "*2*" ] -- ~~~~~ --!!! error TS5061: Pattern '*1*' can have at most one '*' character. -- ~~~~~ --!!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. -- } -- } -- } -- --==== root/src/folder1/file1.ts (0 errors) ==== -- export var x = 1; -+ \ No newline at end of file ++root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== root/tsconfig.json (4 errors) ==== + { + "compilerOptions": { + "baseUrl": "./src", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./src/*"}' instead. + "paths": { + "*1*": [ "*2*" ] + ~~~~~ + !!! error TS5061: Pattern '*1*' can have at most one '*' character. + ~~~~~ + !!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ++ ~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution3_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution3_node.errors.txt.diff index db9221935d..79c920ad8a 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution3_node.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution3_node.errors.txt.diff @@ -2,9 +2,11 @@ +++ new.pathMappingBasedModuleResolution3_node.errors.txt @@= skipped -0, +0 lines =@@ - ++error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +c:/root/folder1/file1.ts(1,17): error TS2307: Cannot find module 'folder2/file2' or its corresponding type declarations. + + ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +==== c:/root/folder1/file1.ts (1 errors) ==== + import {x} from "folder2/file2" + ~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution4_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution4_node.errors.txt.diff index 22ac451392..51265191bb 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution4_node.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution4_node.errors.txt.diff @@ -3,12 +3,17 @@ @@= skipped -0, +0 lines =@@ - +c:/root/folder1/file1.ts(1,17): error TS2307: Cannot find module 'folder2/file2' or its corresponding type declarations. ++c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. + + -+==== c:/root/tsconfig.json (0 errors) ==== ++==== c:/root/tsconfig.json (1 errors) ==== + { + "compilerOptions": { + "baseUrl": "." ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + } + } + diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution5_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution5_node.errors.txt.diff new file mode 100644 index 0000000000..ceb8f38bdd --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution5_node.errors.txt.diff @@ -0,0 +1,60 @@ +--- old.pathMappingBasedModuleResolution5_node.errors.txt ++++ new.pathMappingBasedModuleResolution5_node.errors.txt +@@= skipped -0, +0 lines =@@ +- ++c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++c:/root/tsconfig.json(7,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== c:/root/tsconfig.json (4 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "*": [ ++ "*", ++ ~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ "generated/*" ++ ~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ], ++ "components/*": [ ++ "shared/components/*" ++ ~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ] ++ } ++ } ++ } ++==== c:/root/folder1/file1.ts (0 errors) ==== ++ import {x} from "folder2/file1" ++ import {y} from "folder3/file2" ++ import {z} from "components/file3" ++ import {z1} from "file4" ++ ++ declare function use(a: any): void; ++ ++ use(x.toExponential()); ++ use(y.toExponential()); ++ use(z.toExponential()); ++ use(z1.toExponential()); ++ ++==== c:/root/folder2/file1.ts (0 errors) ==== ++ export var x = 1; ++ ++==== c:/root/generated/folder3/file2.ts (0 errors) ==== ++ export var y = 1; ++ ++==== c:/root/shared/components/file3/index.d.ts (0 errors) ==== ++ export var z: number; ++ ++==== c:/node_modules/file4.ts (0 errors) ==== ++ export var z1 = 1; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution7_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution7_node.errors.txt.diff index cd27c483bc..a1fc7cc1b4 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution7_node.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution7_node.errors.txt.diff @@ -3,19 +3,30 @@ @@= skipped -0, +0 lines =@@ - +c:/root/src/file1.ts(1,17): error TS2307: Cannot find module './project/file2' or its corresponding type declarations. ++c:/root/src/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./../*"}' instead. ++c:/root/src/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++c:/root/src/tsconfig.json(10,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + + -+==== c:/root/src/tsconfig.json (0 errors) ==== ++==== c:/root/src/tsconfig.json (3 errors) ==== + { + "compilerOptions": { + "baseUrl": "../", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./../*"}' instead. + "paths": { + "*": [ + "*", ++ ~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + "c:/shared/*" + ], + "templates/*": [ + "generated/src/templates/*" ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + ] + }, + "rootDirs": [ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution8_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution8_node.errors.txt.diff new file mode 100644 index 0000000000..0e9697db9b --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution8_node.errors.txt.diff @@ -0,0 +1,32 @@ +--- old.pathMappingBasedModuleResolution8_node.errors.txt ++++ new.pathMappingBasedModuleResolution8_node.errors.txt +@@= skipped -0, +0 lines =@@ +- ++c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++c:/root/tsconfig.json(6,16): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== c:/root/tsconfig.json (2 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "@speedy/*/testing": [ ++ "*/dist/index.ts" ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ] ++ } ++ } ++ } ++ ++==== c:/root/index.ts (0 errors) ==== ++ import {x} from "@speedy/folder1/testing" ++ ++==== c:/root/folder1/dist/index.ts (0 errors) ==== ++ export const x = 1 + 2; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot.errors.txt.diff new file mode 100644 index 0000000000..8dd34fb786 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot.errors.txt.diff @@ -0,0 +1,33 @@ +--- old.pathMappingBasedModuleResolution_rootImport_aliasWithRoot.errors.txt ++++ new.pathMappingBasedModuleResolution_rootImport_aliasWithRoot.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== /root/tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "/*": ["./src/*"] ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /root/src/foo.ts (0 errors) ==== ++ export function foo() {} ++ ++==== /root/src/bar.js (0 errors) ==== ++ export function bar() {} ++ ++==== /root/a.ts (0 errors) ==== ++ import { foo } from "/foo"; ++ import { bar } from "/bar"; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.errors.txt.diff new file mode 100644 index 0000000000..1a0bc2932a --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.errors.txt.diff @@ -0,0 +1,57 @@ +--- old.pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.errors.txt ++++ new.pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== /root/tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "/*": ["./src/*"], ++ "c:/*": ["./src/*"], ++ "c:\\*": ["./src/*"], ++ "//server/*": ["./src/*"], ++ "\\\\server\\*": ["./src/*"], ++ "file:///*": ["./src/*"], ++ "file://c:/*": ["./src/*"], ++ "file://server/*": ["./src/*"], ++ "http://server/*": ["./src/*"] ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /root/src/foo.ts (0 errors) ==== ++ export function foo() {} ++ ++==== /root/src/bar.js (0 errors) ==== ++ export function bar() {} ++ ++==== /root/a.ts (0 errors) ==== ++ import { foo as foo1 } from "/foo"; ++ import { bar as bar1 } from "/bar"; ++ import { foo as foo2 } from "c:/foo"; ++ import { bar as bar2 } from "c:/bar"; ++ import { foo as foo3 } from "c:\\foo"; ++ import { bar as bar3 } from "c:\\bar"; ++ import { foo as foo4 } from "//server/foo"; ++ import { bar as bar4 } from "//server/bar"; ++ import { foo as foo5 } from "\\\\server\\foo"; ++ import { bar as bar5 } from "\\\\server\\bar"; ++ import { foo as foo6 } from "file:///foo"; ++ import { bar as bar6 } from "file:///bar"; ++ import { foo as foo7 } from "file://c:/foo"; ++ import { bar as bar7 } from "file://c:/bar"; ++ import { foo as foo8 } from "file://server/foo"; ++ import { bar as bar8 } from "file://server/bar"; ++ import { foo as foo9 } from "http://server/foo"; ++ import { bar as bar9 } from "http://server/bar"; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.errors.txt.diff new file mode 100644 index 0000000000..4a9987e913 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.errors.txt.diff @@ -0,0 +1,34 @@ +--- old.pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.errors.txt ++++ new.pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== /root/tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "/client/*": ["./client/*"], ++ "/import/*": ["./import/*"] ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /root/import/foo.ts (0 errors) ==== ++ export function foo() {} ++ ++==== /root/client/bar.js (0 errors) ==== ++ export function bar() {} ++ ++==== /root/src/a.ts (0 errors) ==== ++ import { foo } from "/import/foo"; ++ import { bar } from "/client/bar"; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.errors.txt.diff new file mode 100644 index 0000000000..864b4d1f2b --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.errors.txt.diff @@ -0,0 +1,33 @@ +--- old.pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.errors.txt ++++ new.pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== /root/tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "/*": ["./src/*"] ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /root/a.ts (0 errors) ==== ++ import { foo } from "/foo"; ++ import { bar } from "/bar"; ++ ++==== /foo.ts (0 errors) ==== ++ export function foo() {} ++ ++==== /bar.js (0 errors) ==== ++ export function bar() {} ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.errors.txt.diff new file mode 100644 index 0000000000..1e23b92bdc --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.errors.txt.diff @@ -0,0 +1,33 @@ +--- old.pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.errors.txt ++++ new.pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== /root/tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "*": ["./src/*"] ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /root/src/foo.ts (0 errors) ==== ++ export function foo() {} ++ ++==== /root/src/bar.js (0 errors) ==== ++ export function bar() {} ++ ++==== /root/a.ts (0 errors) ==== ++ import { foo } from "/foo"; ++ import { bar } from "/bar"; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.errors.txt.diff new file mode 100644 index 0000000000..efaaca6fe8 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.errors.txt.diff @@ -0,0 +1,33 @@ +--- old.pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.errors.txt ++++ new.pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++ ++ ++==== /root/tsconfig.json (1 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "*": ["./src/*"] ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /root/a.ts (0 errors) ==== ++ import { foo } from "/foo"; ++ import { bar } from "/bar"; ++ ++==== /foo.ts (0 errors) ==== ++ export function foo() {} ++ ++==== /bar.js (0 errors) ==== ++ export function bar() {} ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt.diff new file mode 100644 index 0000000000..0d33c557c3 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt.diff @@ -0,0 +1,40 @@ +--- old.pathMappingBasedModuleResolution_withExtension.errors.txt ++++ new.pathMappingBasedModuleResolution_withExtension.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(6,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== /tsconfig.json (3 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "foo": ["foo/foo.ts"], ++ ~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ "bar": ["bar/bar.js"] ++ ~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /foo/foo.ts (0 errors) ==== ++ export function foo() {} ++ ++==== /bar/bar.js (0 errors) ==== ++ export function bar() {} ++ ++==== /a.ts (0 errors) ==== ++ import { foo } from "foo"; ++ import { bar } from "bar"; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt.diff new file mode 100644 index 0000000000..b42398de94 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt.diff @@ -0,0 +1,34 @@ +--- old.pathMappingBasedModuleResolution_withExtensionInName.errors.txt ++++ new.pathMappingBasedModuleResolution_withExtensionInName.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== /tsconfig.json (2 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "*": ["foo/*"] ++ ~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ } ++ } ++ } ++ ++==== /foo/zone.js/index.d.ts (0 errors) ==== ++ export const x: number; ++ ++==== /foo/zone.tsx/index.d.ts (0 errors) ==== ++ export const y: number; ++ ++==== /a.ts (0 errors) ==== ++ import { x } from "zone.js"; ++ import { y } from "zone.tsx"; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt.diff new file mode 100644 index 0000000000..fe1ae18248 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt.diff @@ -0,0 +1,35 @@ +--- old.pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt ++++ new.pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== /tsconfig.json (3 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "*": ["node_modules/*", "src/types"] ++ ~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /a.ts (0 errors) ==== ++ import foobar from "foo/bar/foobar.js"; ++ ++==== /node_modules/foo/bar/foobar.js (0 errors) ==== ++ module.exports = { a: 10 }; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt.diff new file mode 100644 index 0000000000..e7807f0d7c --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt.diff @@ -0,0 +1,26 @@ +--- old.pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt ++++ new.pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt +@@= skipped -0, +0 lines =@@ + /a.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +- +- +-==== /tsconfig.json (0 errors) ==== ++/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== /tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "foo": ["foo/foo.ts"] ++ ~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingInheritedBaseUrl.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingInheritedBaseUrl.errors.txt.diff index 5f2c14f002..4faa90b334 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingInheritedBaseUrl.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingInheritedBaseUrl.errors.txt.diff @@ -3,12 +3,17 @@ @@= skipped -0, +0 lines =@@ - +/project/index.ts(1,20): error TS2307: Cannot find module 'p1' or its corresponding type declarations. ++/project/tsconfig.json(3,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "../other/*"}' instead. + + -+==== /project/tsconfig.json (0 errors) ==== ++==== /project/tsconfig.json (1 errors) ==== + { + "extends": "../other/tsconfig.base.json", + "compilerOptions": { ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "../other/*"}' instead. + "module": "commonjs", + "paths": { + "p1": ["./lib/p1"] diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation1.errors.txt.diff index a732a0c32d..4f71928f52 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation1.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation1.errors.txt.diff @@ -1,20 +1,19 @@ --- old.pathsValidation1.errors.txt +++ new.pathsValidation1.errors.txt @@= skipped -0, +0 lines =@@ --tsconfig.json(5,18): error TS5063: Substitutions for pattern '*' should be an array. -- -- ++tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. + tsconfig.json(5,18): error TS5063: Substitutions for pattern '*' should be an array. + + -==== tsconfig.json (1 errors) ==== -- { -- "compilerOptions": { -- "baseUrl": ".", -- "paths": { -- "*": "*" -- ~~~ --!!! error TS5063: Substitutions for pattern '*' should be an array. -- } -- } -- } --==== a.ts (0 errors) ==== -- let x = 1; -+ \ No newline at end of file ++==== tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": "*" + ~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation2.errors.txt.diff index 56b700bf0c..b7ca34e515 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation2.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation2.errors.txt.diff @@ -5,16 +5,24 @@ - - -==== tsconfig.json (1 errors) ==== -- { -- "compilerOptions": { -- "baseUrl": ".", -- "paths": { -- "*": [1] ++tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++tsconfig.json(5,18): error TS5066: Substitutions for pattern '*' shouldn't be an empty array. ++ ++ ++==== tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": [1] - ~ -!!! error TS5064: Substitution '1' for pattern '*' has incorrect type, expected 'string', got 'number'. -- } -- } -- } --==== a.ts (0 errors) ==== -- let x = 1; -+ \ No newline at end of file ++ ~~~ ++!!! error TS5066: Substitutions for pattern '*' shouldn't be an empty array. + } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation3.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation3.errors.txt.diff index dfb6a7dccb..a17eb02fc5 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation3.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation3.errors.txt.diff @@ -1,21 +1,19 @@ --- old.pathsValidation3.errors.txt +++ new.pathsValidation3.errors.txt @@= skipped -0, +0 lines =@@ --tsconfig.json(5,20): error TS5066: Substitutions for pattern 'foo' shouldn't be an empty array. -- -- ++tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. + tsconfig.json(5,20): error TS5066: Substitutions for pattern 'foo' shouldn't be an empty array. + + -==== tsconfig.json (1 errors) ==== -- { -- "compilerOptions": { -- "baseUrl": ".", -- "paths": { -- "foo": [] -- ~~ --!!! error TS5066: Substitutions for pattern 'foo' shouldn't be an empty array. -- } -- } -- } -- --==== a.ts (0 errors) ==== -- let x = 1; -+ \ No newline at end of file ++==== tsconfig.json (2 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "foo": [] + ~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation4.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation4.errors.txt.diff index f7f70f20a4..aa1dd0cee2 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation4.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation4.errors.txt.diff @@ -1,30 +1,34 @@ --- old.pathsValidation4.errors.txt +++ new.pathsValidation4.errors.txt @@= skipped -0, +0 lines =@@ --tsconfig.json(6,11): error TS5061: Pattern '@interface/**/*' can have at most one '*' character. --tsconfig.json(7,11): error TS5061: Pattern '@service/**/*' can have at most one '*' character. --tsconfig.json(7,29): error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. ++tsconfig.json(4,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./src/*"}' instead. + tsconfig.json(6,11): error TS5061: Pattern '@interface/**/*' can have at most one '*' character. + tsconfig.json(7,11): error TS5061: Pattern '@service/**/*' can have at most one '*' character. + tsconfig.json(7,29): error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. - - -==== tsconfig.json (3 errors) ==== -- { -- "compilerOptions": { -- "traceResolution": true, -- "baseUrl": "./src", -- "paths": { -- "@interface/**/*" : ["./src/interface/*"], -- ~~~~~~~~~~~~~~~~~ --!!! error TS5061: Pattern '@interface/**/*' can have at most one '*' character. -- "@service/**/*": ["./src/service/**/*"], -- ~~~~~~~~~~~~~~~ --!!! error TS5061: Pattern '@service/**/*' can have at most one '*' character. -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. -- "@controller/*": ["controller/*"], -- } -- } -- } -- --==== src/main.ts (0 errors) ==== -- import 'someModule'; -+ \ No newline at end of file ++tsconfig.json(8,29): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== tsconfig.json (5 errors) ==== + { + "compilerOptions": { + "traceResolution": true, + "baseUrl": "./src", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./src/*"}' instead. + "paths": { + "@interface/**/*" : ["./src/interface/*"], + ~~~~~~~~~~~~~~~~~ +@@= skipped -17, +23 lines =@@ + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. + "@controller/*": ["controller/*"], ++ ~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt.diff new file mode 100644 index 0000000000..f6df22ae7f --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt.diff @@ -0,0 +1,29 @@ +--- old.requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt ++++ new.requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt +@@= skipped -0, +0 lines =@@ + /a.ts(1,20): error TS2732: Cannot find module 'foo/bar/foobar.json'. Consider using '--resolveJsonModule' to import module with '.json' extension. +- +- +-==== /tsconfig.json (0 errors) ==== ++/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== /tsconfig.json (3 errors) ==== + { + "compilerOptions": { + "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. + "paths": { + "*": ["node_modules/*", "src/types"] ++ ~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? + }, + "allowJs": true, + "outDir": "bin" \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFile_PathMapping.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFile_PathMapping.errors.txt.diff new file mode 100644 index 0000000000..3f8f971808 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFile_PathMapping.errors.txt.diff @@ -0,0 +1,35 @@ +--- old.requireOfJsonFile_PathMapping.errors.txt ++++ new.requireOfJsonFile_PathMapping.errors.txt +@@= skipped -0, +0 lines =@@ +- ++/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++ Use '"paths": {"*": "./*"}' instead. ++/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ++ ++==== /tsconfig.json (3 errors) ==== ++ { ++ "compilerOptions": { ++ "baseUrl": ".", ++ ~~~~~~~~~ ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. ++!!! error TS5102: Use '"paths": {"*": "./*"}' instead. ++ "paths": { ++ "*": ["node_modules/*", "src/types"] ++ ~~~~~~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ ~~~~~~~~~~~ ++!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++ }, ++ "allowJs": true, ++ "outDir": "bin" ++ } ++ } ++ ++==== /a.ts (0 errors) ==== ++ import foobar from "foo/bar/foobar.json"; ++ ++==== /node_modules/foo/bar/foobar.json (0 errors) ==== ++ { "a": 10 } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/signaturesUseJSDocForOptionalParameters.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/signaturesUseJSDocForOptionalParameters.errors.txt.diff new file mode 100644 index 0000000000..43e74e3959 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/signaturesUseJSDocForOptionalParameters.errors.txt.diff @@ -0,0 +1,28 @@ +--- old.signaturesUseJSDocForOptionalParameters.errors.txt ++++ new.signaturesUseJSDocForOptionalParameters.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'jsDocOptionality.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'jsDocOptionality.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== jsDocOptionality.js (0 errors) ==== ++ function MyClass() { ++ this.prop = null; ++ } ++ /** ++ * @param {string} required ++ * @param {string} [notRequired] ++ * @returns {MyClass} ++ */ ++ MyClass.prototype.optionalParam = function(required, notRequired) { ++ return this; ++ }; ++ let pInst = new MyClass(); ++ let c1 = pInst.optionalParam('hello') ++ let c2 = pInst.optionalParam('hello', null) ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithCaseSensitiveFileNames.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithCaseSensitiveFileNames.errors.txt.diff new file mode 100644 index 0000000000..d0b34de703 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithCaseSensitiveFileNames.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.sourceMapWithCaseSensitiveFileNames.errors.txt ++++ new.sourceMapWithCaseSensitiveFileNames.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== testFiles/app.ts (0 errors) ==== ++ // Note in the out result we are using same folder name only different in casing ++ // Since this is case sensitive, the folders are different and hence the relative paths in sourcemap shouldn't be just app.ts or app2.ts ++ class c { ++ } ++ ++==== testFiles/app2.ts (0 errors) ==== ++ class d { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithMultipleFilesWithCopyright.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithMultipleFilesWithCopyright.errors.txt.diff new file mode 100644 index 0000000000..6ceaccc98e --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithMultipleFilesWithCopyright.errors.txt.diff @@ -0,0 +1,26 @@ +--- old.sourceMapWithMultipleFilesWithCopyright.errors.txt ++++ new.sourceMapWithMultipleFilesWithCopyright.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== b.ts (0 errors) ==== ++ /*-------------------------------------------------------------------------- ++ Copyright ++ ---------------------------------------------------------------------------*/ ++ ++ /// ++ var y = x; ++ ++==== a.ts (0 errors) ==== ++ /*-------------------------------------------------------------------------- ++ Copyright ++ ---------------------------------------------------------------------------*/ ++ ++ var x = { ++ a: 10, ++ b: 20 ++ }; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.errors.txt.diff new file mode 100644 index 0000000000..84ea7d8cb0 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.errors.txt.diff @@ -0,0 +1,25 @@ +--- old.sourceMapWithMultipleFilesWithFileEndingWithInterface.errors.txt ++++ new.sourceMapWithMultipleFilesWithFileEndingWithInterface.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== a.ts (0 errors) ==== ++ module M { ++ export var X = 1; ++ } ++ interface Navigator { ++ getGamepads(func?: any): any; ++ webkitGetGamepads(func?: any): any ++ msGetGamepads(func?: any): any; ++ webkitGamepads(func?: any): any; ++ } ++ ++==== b.ts (0 errors) ==== ++ module m1 { ++ export class c1 { ++ } ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithNonCaseSensitiveFileNames.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithNonCaseSensitiveFileNames.errors.txt.diff new file mode 100644 index 0000000000..d7d018245c --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/sourceMapWithNonCaseSensitiveFileNames.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.sourceMapWithNonCaseSensitiveFileNames.errors.txt ++++ new.sourceMapWithNonCaseSensitiveFileNames.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== testFiles/app.ts (0 errors) ==== ++ // Note in the out result we are using same folder name only different in casing ++ // Since this is non case sensitive, the relative paths should be just app.ts and app2.ts in the sourcemap ++ class c { ++ } ++ ++==== testFiles/app2.ts (0 errors) ==== ++ class d { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives11.errors.txt.diff similarity index 68% rename from testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives11.errors.txt.diff index 8e981fafc6..bf4ed6ceb9 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives11.errors.txt.diff @@ -2,11 +2,17 @@ +++ new.typeReferenceDirectives11.errors.txt @@= skipped -0, +0 lines =@@ -/mod1.ts(1,17): error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. +- +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +/mod1.ts(1,24): error TS2304: Cannot find name 'Lib'. - - ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== /mod2.ts (0 errors) ==== -@@= skipped -9, +9 lines =@@ + import {foo} from "./mod1"; + export const bar = foo(); +@@= skipped -9, +11 lines =@@ ==== /mod1.ts (1 errors) ==== export function foo(): Lib { return {x: 1} } diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives12.errors.txt.diff similarity index 80% rename from testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt.diff rename to testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives12.errors.txt.diff index e8afd2a9de..604f29ddb4 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives12.errors.txt.diff @@ -2,12 +2,18 @@ +++ new.typeReferenceDirectives12.errors.txt @@= skipped -0, +0 lines =@@ -/main.ts(1,14): error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. +- +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +/mod1.ts(8,16): error TS2304: Cannot find name 'Lib'. +/mod1.ts(11,25): error TS2304: Cannot find name 'Lib'. - - ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== /mod2.ts (0 errors) ==== -@@= skipped -11, +12 lines =@@ + import { Cls } from "./main"; + import "./mod1"; +@@= skipped -11, +14 lines =@@ ==== /types/lib/index.d.ts (0 errors) ==== interface Lib { x } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/useBeforeDeclaration.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/useBeforeDeclaration.errors.txt.diff new file mode 100644 index 0000000000..2f107b6c10 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/compiler/useBeforeDeclaration.errors.txt.diff @@ -0,0 +1,27 @@ +--- old.useBeforeDeclaration.errors.txt ++++ new.useBeforeDeclaration.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== A.ts (0 errors) ==== ++ namespace ts { ++ export function printVersion():void { ++ log("Version: " + sys.version); // the call of sys.version is deferred, should not report an error. ++ } ++ ++ export function log(info:string):void { ++ ++ } ++ } ++ ++==== B.ts (0 errors) ==== ++ namespace ts { ++ ++ export let sys:{version:string} = {version: "2.0.5"}; ++ ++ } ++ ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt.diff index 41175e8df6..3f0ddab501 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt.diff @@ -1,20 +1,18 @@ --- old.bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt +++ new.bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt @@= skipped -0, +0 lines =@@ --error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. --error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. + error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. + error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. -error TS6054: File '/project/e.txt' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. - The file is in the program because: - Root file specified for compilation /project/main.ts(3,16): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. /project/main.ts(7,16): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. /project/main.ts(8,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './b.js' instead? -@@= skipped -12, +7 lines =@@ - /project/types.d.ts(2,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? +@@= skipped -14, +11 lines =@@ - --!!! error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. --!!! error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. + !!! error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. + !!! error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. -!!! error TS6054: File '/project/e.txt' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. -!!! error TS6054: The file is in the program because: -!!! error TS6054: Root file specified for compilation diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt.diff index f755b9e8b9..aac931d80d 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt.diff @@ -1,20 +1,19 @@ --- old.bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt +++ new.bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt @@= skipped -0, +0 lines =@@ --error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. --error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. --error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. + error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. + error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. + error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. -error TS6054: File '/project/e.txt' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. - The file is in the program because: - Root file specified for compilation /project/main.ts(8,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './b.ts' instead? /project/main.ts(12,16): error TS6142: Module './c.tsx' was resolved to '/project/c.tsx', but '--jsx' is not set. /project/types.d.ts(2,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.ts' instead? - - --!!! error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. --!!! error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. --!!! error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. +@@= skipped -11, +8 lines =@@ + !!! error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. + !!! error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. + !!! error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. -!!! error TS6054: File '/project/e.txt' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. -!!! error TS6054: The file is in the program because: -!!! error TS6054: Root file specified for compilation diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocOnEndOfFile.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocOnEndOfFile.errors.txt.diff new file mode 100644 index 0000000000..bdd99a963b --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocOnEndOfFile.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.checkJsdocOnEndOfFile.errors.txt ++++ new.checkJsdocOnEndOfFile.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'eof.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + eof.js(2,20): error TS2304: Cannot find name 'bad'. + + ++!!! error TS5055: Cannot write file 'eof.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== eof.js (1 errors) ==== + /** + * @typedef {Array} Should have error here \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocReturnTag1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocReturnTag1.errors.txt.diff new file mode 100644 index 0000000000..78b346a05f --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocReturnTag1.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.checkJsdocReturnTag1.errors.txt ++++ new.checkJsdocReturnTag1.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'returns.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + returns.js(20,12): error TS2872: This kind of expression is always truthy. + + ++!!! error TS5055: Cannot write file 'returns.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== returns.js (1 errors) ==== + // @ts-check + /** \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocReturnTag2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocReturnTag2.errors.txt.diff new file mode 100644 index 0000000000..62dc9ab029 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocReturnTag2.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.checkJsdocReturnTag2.errors.txt ++++ new.checkJsdocReturnTag2.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'returns.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + returns.js(6,5): error TS2322: Type 'number' is not assignable to type 'string'. + returns.js(13,5): error TS2322: Type 'number | boolean' is not assignable to type 'string | number'. + Type 'boolean' is not assignable to type 'string | number'. + returns.js(13,12): error TS2872: This kind of expression is always truthy. + + ++!!! error TS5055: Cannot write file 'returns.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== returns.js (3 errors) ==== + // @ts-check + /** \ 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 new file mode 100644 index 0000000000..47ab0f7e0a --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/computedPropertyNames52(target=es2015).errors.txt.diff @@ -0,0 +1,21 @@ +--- old.computedPropertyNames52(target=es2015).errors.txt ++++ new.computedPropertyNames52(target=es2015).errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'computedPropertyNames52.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'computedPropertyNames52.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== computedPropertyNames52.js (0 errors) ==== ++ const array = []; ++ for (let i = 0; i < 10; ++i) { ++ array.push(class C { ++ [i] = () => C; ++ static [i] = 100; ++ }) ++ } ++ \ 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 new file mode 100644 index 0000000000..c24cbe73ee --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/computedPropertyNames52(target=es5).errors.txt.diff @@ -0,0 +1,21 @@ +--- old.computedPropertyNames52(target=es5).errors.txt ++++ new.computedPropertyNames52(target=es5).errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'computedPropertyNames52.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'computedPropertyNames52.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== computedPropertyNames52.js (0 errors) ==== ++ const array = []; ++ for (let i = 0; i < 10; ++i) { ++ array.push(class C { ++ [i] = () => C; ++ static [i] = 100; ++ }) ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt.diff deleted file mode 100644 index 47c71c8408..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt -+++ new.conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== /node_modules/dep/package.json (0 errors) ==== -- { -- "name": "dep", -- "version": "1.0.0", -- "exports": { -- ".": { -- "import": "./dist/index.mjs", -- "require": "./dist/index.js", -- "types": "./dist/index.d.ts" -- } -- } -- } -- --==== /node_modules/dep/dist/index.d.ts (0 errors) ==== -- export {}; -- --==== /node_modules/dep/dist/index.mjs (0 errors) ==== -- export {}; -- --==== /index.mts (0 errors) ==== -- import {} from "dep"; -- // Should be an untyped resolution to dep/dist/index.mjs, -- // but the first search is only for TS files, and when -- // there's no dist/index.d.mts, it continues looking for -- // matching conditions and resolves via `types`. -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt.diff deleted file mode 100644 index 57ad094589..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt -+++ new.conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== /node_modules/dep/package.json (0 errors) ==== -- { -- "name": "dep", -- "version": "1.0.0", -- "exports": { -- ".": { -- "import": "./dist/index.mjs", -- "require": "./dist/index.js", -- "types": "./dist/index.d.ts" -- } -- } -- } -- --==== /node_modules/dep/dist/index.d.ts (0 errors) ==== -- export {}; -- --==== /node_modules/dep/dist/index.mjs (0 errors) ==== -- export {}; -- --==== /index.mts (0 errors) ==== -- import {} from "dep"; -- // Should be an untyped resolution to dep/dist/index.mjs, -- // but the first search is only for TS files, and when -- // there's no dist/index.d.mts, it continues looking for -- // matching conditions and resolves via `types`. -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/exportDefaultInJsFile01.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/exportDefaultInJsFile01.errors.txt.diff deleted file mode 100644 index 1719621b69..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/exportDefaultInJsFile01.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.exportDefaultInJsFile01.errors.txt -+++ new.exportDefaultInJsFile01.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'myFile01.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! error TS5055: Cannot write file 'myFile01.js' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --==== myFile01.js (0 errors) ==== -- export default "hello"; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/exportDefaultInJsFile02.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/exportDefaultInJsFile02.errors.txt.diff deleted file mode 100644 index 0ed5fa2932..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/exportDefaultInJsFile02.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.exportDefaultInJsFile02.errors.txt -+++ new.exportDefaultInJsFile02.errors.txt -@@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'myFile02.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -- -- --!!! error TS5055: Cannot write file 'myFile02.js' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --==== myFile02.js (0 errors) ==== -- export default "hello"; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=node16).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=node16).errors.txt.diff deleted file mode 100644 index dfcff33cde..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=node16).errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.extensionLoadingPriority(moduleresolution=node16).errors.txt -+++ new.extensionLoadingPriority(moduleresolution=node16).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -- -- --!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. --==== /project/a.js (0 errors) ==== -- export default "a.js"; -- --==== /project/a.js.js (0 errors) ==== -- export default "a.js.js"; -- --==== /project/dir/index.ts (0 errors) ==== -- export default "dir/index.ts"; -- --==== /project/dir.js (0 errors) ==== -- export default "dir.js"; -- --==== /project/b.ts (0 errors) ==== -- import a from "./a.js"; -- import dir from "./dir"; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=nodenext).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=nodenext).errors.txt.diff deleted file mode 100644 index 40ee7ec00f..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=nodenext).errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.extensionLoadingPriority(moduleresolution=nodenext).errors.txt -+++ new.extensionLoadingPriority(moduleresolution=nodenext).errors.txt -@@= skipped -0, +0 lines =@@ --error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -- -- --!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. --==== /project/a.js (0 errors) ==== -- export default "a.js"; -- --==== /project/a.js.js (0 errors) ==== -- export default "a.js.js"; -- --==== /project/dir/index.ts (0 errors) ==== -- export default "dir/index.ts"; -- --==== /project/dir.js (0 errors) ==== -- export default "dir.js"; -- --==== /project/b.ts (0 errors) ==== -- import a from "./a.js"; -- import dir from "./dir"; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/genericSetterInClassTypeJsDoc.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/genericSetterInClassTypeJsDoc.errors.txt.diff new file mode 100644 index 0000000000..a36e8c01e6 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/genericSetterInClassTypeJsDoc.errors.txt.diff @@ -0,0 +1,36 @@ +--- old.genericSetterInClassTypeJsDoc.errors.txt ++++ new.genericSetterInClassTypeJsDoc.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'genericSetterInClassTypeJsDoc.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'genericSetterInClassTypeJsDoc.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== genericSetterInClassTypeJsDoc.js (0 errors) ==== ++ /** ++ * @template T ++ */ ++ class Box { ++ #value; ++ ++ /** @param {T} initialValue */ ++ constructor(initialValue) { ++ this.#value = initialValue; ++ } ++ ++ /** @type {T} */ ++ get value() { ++ return this.#value; ++ } ++ ++ set value(value) { ++ this.#value = value; ++ } ++ } ++ ++ new Box(3).value = 3; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/globalThisVarDeclaration.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/globalThisVarDeclaration.errors.txt.diff new file mode 100644 index 0000000000..6bcae3f222 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/globalThisVarDeclaration.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.globalThisVarDeclaration.errors.txt ++++ new.globalThisVarDeclaration.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + actual.ts(12,5): error TS2339: Property 'a' does not exist on type 'Window'. + actual.ts(13,5): error TS2339: Property 'b' does not exist on type 'Window'. + b.js(12,5): error TS2339: Property 'a' does not exist on type 'Window'. + b.js(13,5): error TS2339: Property 'b' does not exist on type 'Window'. + + ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== b.js (2 errors) ==== + var a = 10; + this.a; \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/grammarErrors.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/grammarErrors.errors.txt.diff index 9da266ec89..30becf83db 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/grammarErrors.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/grammarErrors.errors.txt.diff @@ -1,22 +1,15 @@ --- old.grammarErrors.errors.txt +++ new.grammarErrors.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file '/a.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. --error TS5056: Cannot write file '/a.js' because it would be overwritten by multiple input files. + error TS5055: Cannot write file '/a.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5056: Cannot write file '/a.js' because it would be overwritten by multiple input files. -/a.js(1,1): error TS8006: 'import type' declarations can only be used in TypeScript files. -/a.js(2,1): error TS8006: 'export type' declarations can only be used in TypeScript files. /b.ts(1,8): error TS1363: A type-only import can specify a default import or named bindings, but not both. /c.ts(4,1): error TS1392: An import alias cannot use 'import type' - --!!! 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. --!!! error TS5056: Cannot write file '/a.js' because it would be overwritten by multiple input files. - ==== /a.ts (0 errors) ==== - export default class A {} - export class B {} -@@= skipped -19, +11 lines =@@ +@@= skipped -19, +17 lines =@@ ~~~~~~~~~~~~~~~~ !!! error TS1363: A type-only import can specify a default import or named bindings, but not both. diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff new file mode 100644 index 0000000000..2970225a26 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/inferringClassMembersFromAssignments.errors.txt.diff @@ -0,0 +1,17 @@ +--- old.inferringClassMembersFromAssignments.errors.txt ++++ new.inferringClassMembersFromAssignments.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + a.js(14,13): error TS7008: Member 'inMethodNullable' implicitly has an 'any' type. + a.js(20,9): error TS2322: Type 'string' is not assignable to type 'number'. + a.js(39,9): error TS2322: Type 'boolean' is not assignable to type 'number'. + + ++!!! 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. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== a.js (3 errors) ==== + class C { + constructor() { \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff index 59ee8f427b..fe64e53f34 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsObjectsMarkedAsOpenEnded.errors.txt.diff @@ -2,12 +2,18 @@ +++ new.jsObjectsMarkedAsOpenEnded.errors.txt @@= skipped -0, +0 lines =@@ - ++error TS5055: Cannot write file 'a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +b.ts(3,29): error TS2339: Property 'a' does not exist on type '{}'. +b.ts(4,14): error TS2339: Property 'a' does not exist on type '{}'. +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 '{}'. + + ++!!! 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. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.js (0 errors) ==== + var variable = {}; + variable.a = 0; diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTagsDeclarations.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTagsDeclarations.errors.txt.diff new file mode 100644 index 0000000000..1813c006bb --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocAccessibilityTagsDeclarations.errors.txt.diff @@ -0,0 +1,51 @@ +--- old.jsdocAccessibilityTagsDeclarations.errors.txt ++++ new.jsdocAccessibilityTagsDeclarations.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'jsdocAccessibilityTagDeclarations.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'jsdocAccessibilityTagDeclarations.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== jsdocAccessibilityTagDeclarations.js (0 errors) ==== ++ class Protected { ++ /** @protected */ ++ constructor(c) { ++ /** @protected */ ++ this.c = c ++ } ++ /** @protected */ ++ m() { ++ return this.c ++ } ++ /** @protected */ ++ get p() { return this.c } ++ /** @protected */ ++ set p(value) { this.c = value } ++ } ++ ++ class Private { ++ /** @private */ ++ constructor(c) { ++ /** @private */ ++ this.c = c ++ } ++ /** @private */ ++ m() { ++ return this.c ++ } ++ /** @private */ ++ get p() { return this.c } ++ /** @private */ ++ set p(value) { this.c = value } ++ } ++ ++ // https://github.com/microsoft/TypeScript/issues/38401 ++ class C { ++ constructor(/** @public */ x, /** @protected */ y, /** @private */ z) { ++ } ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocLiteral.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocLiteral.errors.txt.diff new file mode 100644 index 0000000000..d22e40ecc7 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocLiteral.errors.txt.diff @@ -0,0 +1,24 @@ +--- old.jsdocLiteral.errors.txt ++++ new.jsdocLiteral.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'in.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'in.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== in.js (0 errors) ==== ++ /** ++ * @param {'literal'} p1 ++ * @param {"literal"} p2 ++ * @param {'literal' | 'other'} p3 ++ * @param {'literal' | number} p4 ++ * @param {12 | true | 'str'} p5 ++ */ ++ function f(p1, p2, p3, p4, p5) { ++ return p1 + p2 + p3 + p4 + p5 + '.'; ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocNeverUndefinedNull.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocNeverUndefinedNull.errors.txt.diff new file mode 100644 index 0000000000..4bf87aedf5 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocNeverUndefinedNull.errors.txt.diff @@ -0,0 +1,22 @@ +--- old.jsdocNeverUndefinedNull.errors.txt ++++ new.jsdocNeverUndefinedNull.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'in.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'in.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== in.js (0 errors) ==== ++ /** ++ * @param {never} p1 ++ * @param {undefined} p2 ++ * @param {null} p3 ++ * @returns {void} nothing ++ */ ++ function f(p1, p2, p3) { ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters1.errors.txt.diff index dcc2f56e2b..241ccbd587 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters1.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters1.errors.txt.diff @@ -1,16 +1,16 @@ --- old.jsdocOuterTypeParameters1.errors.txt +++ new.jsdocOuterTypeParameters1.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'jsdocOuterTypeParameters1.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'jsdocOuterTypeParameters1.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. jsdocOuterTypeParameters1.js(1,14): error TS2304: Cannot find name 'T'. -jsdocOuterTypeParameters1.js(4,17): error TS2304: Cannot find name 'T'. -jsdocOuterTypeParameters1.js(4,19): error TS1069: Unexpected token. A type parameter name was expected without curly braces. jsdocOuterTypeParameters1.js(7,35): error TS2339: Property 'foo' does not exist on type 'Bar'. --!!! error TS5055: Cannot write file 'jsdocOuterTypeParameters1.js' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + !!! error TS5055: Cannot write file 'jsdocOuterTypeParameters1.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. -==== jsdocOuterTypeParameters1.js (4 errors) ==== +==== jsdocOuterTypeParameters1.js (2 errors) ==== /** @return {T} */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters2.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters2.errors.txt.diff index da32259324..c7c8bb5387 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters2.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters2.errors.txt.diff @@ -1,15 +1,14 @@ --- old.jsdocOuterTypeParameters2.errors.txt +++ new.jsdocOuterTypeParameters2.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'jsdocOuterTypeParameters1.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'jsdocOuterTypeParameters1.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -jsdocOuterTypeParameters1.js(1,14): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +jsdocOuterTypeParameters1.js(1,14): error TS2304: Cannot find name 'T'. jsdocOuterTypeParameters1.js(7,35): error TS2339: Property 'foo' does not exist on type 'Bar'. --!!! error TS5055: Cannot write file 'jsdocOuterTypeParameters1.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. +@@= skipped -8, +8 lines =@@ ==== jsdocOuterTypeParameters1.js (2 errors) ==== /** @return {T} */ ~ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters3.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters3.errors.txt.diff index 8375606652..4622725904 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters3.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocOuterTypeParameters3.errors.txt.diff @@ -1,15 +1,15 @@ --- old.jsdocOuterTypeParameters3.errors.txt +++ new.jsdocOuterTypeParameters3.errors.txt @@= skipped -0, +0 lines =@@ --error TS5055: Cannot write file 'jsdocOuterTypeParameters3.js' because it would overwrite input file. -- Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + error TS5055: Cannot write file 'jsdocOuterTypeParameters3.js' because it would overwrite input file. + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -jsdocOuterTypeParameters3.js(1,16): error TS2304: Cannot find name 'T'. -jsdocOuterTypeParameters3.js(1,18): error TS1069: Unexpected token. A type parameter name was expected without curly braces. jsdocOuterTypeParameters3.js(5,43): error TS2339: Property 'foo' does not exist on type 'Bar'. --!!! error TS5055: Cannot write file 'jsdocOuterTypeParameters3.js' because it would overwrite input file. --!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. + !!! error TS5055: Cannot write file 'jsdocOuterTypeParameters3.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. -==== jsdocOuterTypeParameters3.js (3 errors) ==== +==== jsdocOuterTypeParameters3.js (1 errors) ==== /** @template {T} */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.errors.txt.diff index 6c46f1071b..97cdecef25 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReadonlyDeclarations.errors.txt.diff @@ -2,9 +2,15 @@ +++ new.jsdocReadonlyDeclarations.errors.txt @@= skipped -0, +0 lines =@@ - ++error TS5055: Cannot write file 'jsdocReadonlyDeclarations.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +jsdocReadonlyDeclarations.js(14,1): error TS2554: Expected 1 arguments, but got 0. + + ++!!! error TS5055: Cannot write file 'jsdocReadonlyDeclarations.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== jsdocReadonlyDeclarations.js (1 errors) ==== + class C { + /** @readonly */ diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReturnTag1.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReturnTag1.errors.txt.diff new file mode 100644 index 0000000000..10985f75b2 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocReturnTag1.errors.txt.diff @@ -0,0 +1,34 @@ +--- old.jsdocReturnTag1.errors.txt ++++ new.jsdocReturnTag1.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'returns.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'returns.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== returns.js (0 errors) ==== ++ /** ++ * @returns {string} This comment is not currently exposed ++ */ ++ function f() { ++ return 5; ++ } ++ ++ /** ++ * @returns {string=} This comment is not currently exposed ++ */ ++ function f1() { ++ return 5; ++ } ++ ++ /** ++ * @returns {string|number} This comment is not currently exposed ++ */ ++ function f2() { ++ return 5 || "hello"; ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/methodsReturningThis.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/methodsReturningThis.errors.txt.diff new file mode 100644 index 0000000000..2aa9ea3027 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/methodsReturningThis.errors.txt.diff @@ -0,0 +1,32 @@ +--- old.methodsReturningThis.errors.txt ++++ new.methodsReturningThis.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'input.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'input.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== input.js (0 errors) ==== ++ function Class() ++ { ++ } ++ ++ // error: 'Class' doesn't have property 'notPresent' ++ Class.prototype.containsError = function () { return this.notPresent; }; ++ ++ // lots of methods that return this, which caused out-of-memory in #9527 ++ Class.prototype.m1 = function (a, b, c, d, tx, ty) { return this; }; ++ Class.prototype.m2 = function (x, y) { return this; }; ++ Class.prototype.m3 = function (x, y) { return this; }; ++ Class.prototype.m4 = function (angle) { return this; }; ++ Class.prototype.m5 = function (matrix) { return this; }; ++ Class.prototype.m6 = function (x, y, pivotX, pivotY, scaleX, scaleY, rotation, skewX, skewY) { return this; }; ++ Class.prototype.m7 = function(matrix) { return this; }; ++ Class.prototype.m8 = function() { return this; }; ++ Class.prototype.m9 = function () { return this; }; ++ ++ \ 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 new file mode 100644 index 0000000000..e0b3dd7b2b --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/multipleDeclarations.errors.txt.diff @@ -0,0 +1,48 @@ +--- old.multipleDeclarations.errors.txt ++++ new.multipleDeclarations.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'input.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'input.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== input.js (0 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'; ++ } ++ m() { ++ } ++ mistake() { ++ } ++ } ++ let x = new X(); ++ X.prototype.mistake = false; ++ x.m(); ++ x.mistake; ++ class Y { ++ mistake() { ++ } ++ m() { ++ } ++ constructor() { ++ this.m = this.m.bind(this); ++ this.mistake = 'even more nonsense'; ++ } ++ } ++ Y.prototype.mistake = true; ++ let y = new Y(); ++ y.m(); ++ y.mistake(); ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/topLevelThisAssignment.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/topLevelThisAssignment.errors.txt.diff index fa73b8b304..938aa0e9c2 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/topLevelThisAssignment.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/topLevelThisAssignment.errors.txt.diff @@ -2,10 +2,20 @@ +++ new.topLevelThisAssignment.errors.txt @@= skipped -0, +0 lines =@@ - ++error TS5055: Cannot write file 'a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +a.js(3,1): error TS2304: Cannot find name 'a'. +b.js(2,1): error TS2304: Cannot find name 'a'. + + ++!!! 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. ++!!! error TS5055: Cannot write file 'b.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. +==== a.js (1 errors) ==== + this.a = 10; + this.a; diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typeSatisfaction_js.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typeSatisfaction_js.errors.txt.diff index 05fed40e02..05a8be7c26 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typeSatisfaction_js.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typeSatisfaction_js.errors.txt.diff @@ -5,8 +5,16 @@ - - -==== /src/a.js (1 errors) ==== -- var v = undefined satisfies 1; ++error TS5055: Cannot write file '/src/a.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file '/src/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. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== /src/a.js (0 errors) ==== + var v = undefined satisfies 1; - ~ -!!! error TS8037: Type satisfaction expressions 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/conformance/typesVersions.emptyTypes.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typesVersions.emptyTypes.errors.txt.diff index 1e274dad98..d98c7e28e9 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typesVersions.emptyTypes.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typesVersions.emptyTypes.errors.txt.diff @@ -2,9 +2,11 @@ +++ new.typesVersions.emptyTypes.errors.txt @@= skipped -0, +0 lines =@@ - ++error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +/b/user.ts(1,19): error TS2307: Cannot find module 'a' or its corresponding type declarations. + + ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +==== /a/package.json (0 errors) ==== + { + "types": "", diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/typesVersions.justIndex.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/typesVersions.justIndex.errors.txt.diff index 7fcdae0204..f743bc2658 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/typesVersions.justIndex.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/typesVersions.justIndex.errors.txt.diff @@ -2,9 +2,11 @@ +++ new.typesVersions.justIndex.errors.txt @@= skipped -0, +0 lines =@@ - ++error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +/b/user.ts(1,19): error TS2307: Cannot find module 'a' or its corresponding type declarations. + + ++!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. +==== /a/package.json (0 errors) ==== + { + "typesVersions": { diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/uniqueSymbolsDeclarationsInJs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/uniqueSymbolsDeclarationsInJs.errors.txt.diff new file mode 100644 index 0000000000..ec745b980a --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/uniqueSymbolsDeclarationsInJs.errors.txt.diff @@ -0,0 +1,41 @@ +--- old.uniqueSymbolsDeclarationsInJs.errors.txt ++++ new.uniqueSymbolsDeclarationsInJs.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS5055: Cannot write file 'uniqueSymbolsDeclarationsInJs.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++ ++ ++!!! error TS5055: Cannot write file 'uniqueSymbolsDeclarationsInJs.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ++==== uniqueSymbolsDeclarationsInJs.js (0 errors) ==== ++ // classes ++ class C { ++ /** ++ * @readonly ++ */ ++ static readonlyStaticCall = Symbol(); ++ /** ++ * @type {unique symbol} ++ * @readonly ++ */ ++ static readonlyStaticType; ++ /** ++ * @type {unique symbol} ++ * @readonly ++ */ ++ static readonlyStaticTypeAndCall = Symbol(); ++ static readwriteStaticCall = Symbol(); ++ ++ /** ++ * @readonly ++ */ ++ readonlyCall = Symbol(); ++ readwriteCall = Symbol(); ++ } ++ ++ /** @type {unique symbol} */ ++ const a = Symbol(); ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/uniqueSymbolsDeclarationsInJsErrors.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/uniqueSymbolsDeclarationsInJsErrors.errors.txt.diff new file mode 100644 index 0000000000..7896e7b1e6 --- /dev/null +++ b/testdata/baselines/reference/submoduleAccepted/conformance/uniqueSymbolsDeclarationsInJsErrors.errors.txt.diff @@ -0,0 +1,16 @@ +--- old.uniqueSymbolsDeclarationsInJsErrors.errors.txt ++++ new.uniqueSymbolsDeclarationsInJsErrors.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS5055: Cannot write file 'uniqueSymbolsDeclarationsInJsErrors.js' because it would overwrite input file. ++ Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + uniqueSymbolsDeclarationsInJsErrors.js(5,12): error TS1331: A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'. + uniqueSymbolsDeclarationsInJsErrors.js(14,12): error TS1331: A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'. + + ++!!! error TS5055: Cannot write file 'uniqueSymbolsDeclarationsInJsErrors.js' because it would overwrite input file. ++!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ++!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + ==== uniqueSymbolsDeclarationsInJsErrors.js (2 errors) ==== + class C { + /** \ No newline at end of file diff --git a/testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js b/testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js index 9b9bc68483..bcb5418c24 100644 --- a/testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js +++ b/testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js @@ -63,13 +63,19 @@ CompilerOptions::{ "explainFiles": true } Output:: -src/secondary.ts:4:20 - error TS2307: Cannot find module 'other/sometype2' or its corresponding type declarations. +tsconfig.json:3:2 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -4 import { k } from "other/sometype2"; -   ~~~~~~~~~~~~~~~~~ +3 "compilerOptions": { +   ~~~~~~~~~~~~~~~~~ +tsconfig.json:3:2 - error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -Found 1 error in src/secondary.ts:4 +3 "compilerOptions": { +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in the same file, starting at: tsconfig.json:3 //// [/home/src/projects/configs/first/tsconfig.json] no change //// [/home/src/projects/configs/second/tsconfig.json] no change diff --git a/testdata/baselines/reference/tsc/extends/configDir-template.js b/testdata/baselines/reference/tsc/extends/configDir-template.js index b9bf5ed030..ab1e8c2623 100644 --- a/testdata/baselines/reference/tsc/extends/configDir-template.js +++ b/testdata/baselines/reference/tsc/extends/configDir-template.js @@ -62,13 +62,19 @@ CompilerOptions::{ "explainFiles": true } Output:: -src/secondary.ts:4:20 - error TS2307: Cannot find module 'other/sometype2' or its corresponding type declarations. +tsconfig.json:3:2 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -4 import { k } from "other/sometype2"; -   ~~~~~~~~~~~~~~~~~ +3 "compilerOptions": { +   ~~~~~~~~~~~~~~~~~ +tsconfig.json:3:2 - error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -Found 1 error in src/secondary.ts:4 +3 "compilerOptions": { +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in the same file, starting at: tsconfig.json:3 //// [/home/src/projects/configs/first/tsconfig.json] no change //// [/home/src/projects/configs/second/tsconfig.json] no change diff --git a/testdata/baselines/reference/tsc/noCheck/outFile/dts-errors.js b/testdata/baselines/reference/tsc/noCheck/outFile/dts-errors.js index 145824660a..e48ac7257c 100644 --- a/testdata/baselines/reference/tsc/noCheck/outFile/dts-errors.js +++ b/testdata/baselines/reference/tsc/noCheck/outFile/dts-errors.js @@ -29,8 +29,17 @@ Output:: 1 export const a = class { private p = 10; };    ~ +tsconfig.json:2:2 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -Found 1 error in a.ts:1 +2 "compilerOptions": { +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 a.ts:1 + 1 tsconfig.json:2 //// [/home/src/workspaces/project/a.d.ts] new file export declare const a: { diff --git a/testdata/baselines/reference/tsc/noCheck/outFile/semantic-errors.js b/testdata/baselines/reference/tsc/noCheck/outFile/semantic-errors.js index 02a350977c..e9e71c7fd4 100644 --- a/testdata/baselines/reference/tsc/noCheck/outFile/semantic-errors.js +++ b/testdata/baselines/reference/tsc/noCheck/outFile/semantic-errors.js @@ -13,13 +13,21 @@ export const b = 10; } } -ExitStatus:: 0 +ExitStatus:: 2 CompilerOptions::{ "noCheck": true, "outFile": "/home/src/workspaces/project/built" } Output:: +tsconfig.json:2:2 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +2 "compilerOptions": { +   ~~~~~~~~~~~~~~~~~ + + +Found 1 error in tsconfig.json:2 + //// [/home/src/workspaces/project/a.d.ts] new file export declare const a: number; diff --git a/testdata/baselines/reference/tsc/noCheck/outFile/syntax-errors.js b/testdata/baselines/reference/tsc/noCheck/outFile/syntax-errors.js index 55c3efc93d..11c8dc5fab 100644 --- a/testdata/baselines/reference/tsc/noCheck/outFile/syntax-errors.js +++ b/testdata/baselines/reference/tsc/noCheck/outFile/syntax-errors.js @@ -25,8 +25,17 @@ Output:: 1 export const a = "hello    ~ +tsconfig.json:2:2 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -Found 1 error in a.ts:1 +2 "compilerOptions": { +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 a.ts:1 + 1 tsconfig.json:2 //// [/home/src/workspaces/project/a.d.ts] new file export declare const a = "hello"; diff --git a/testdata/baselines/reference/tscWatch/noEmit/dts-errors-without-dts-enabled.js b/testdata/baselines/reference/tscWatch/noEmit/dts-errors-without-dts-enabled.js index 847e9edd27..0e88f0aa02 100644 --- a/testdata/baselines/reference/tscWatch/noEmit/dts-errors-without-dts-enabled.js +++ b/testdata/baselines/reference/tscWatch/noEmit/dts-errors-without-dts-enabled.js @@ -20,6 +20,14 @@ CompilerOptions::{ Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.ts] no change //// [/home/src/workspaces/project/tsconfig.json] no change @@ -28,6 +36,14 @@ Output:: Edit:: fix syntax error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.ts] modified. new content: const a = "hello"; //// [/home/src/workspaces/project/tsconfig.json] no change @@ -37,6 +53,14 @@ const a = "hello"; Edit:: emit after fixing error Output:: +tsconfig.json:3:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +3 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:3 + //// [/home/src/workspaces/project/a.js] new file const a = "hello"; @@ -53,6 +77,14 @@ const a = "hello"; Edit:: no emit run after fixing error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] no change //// [/home/src/workspaces/project/tsconfig.json] modified. new content: @@ -68,6 +100,14 @@ Output:: Edit:: introduce error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] modified. new content: const a = class { private p = 10; }; @@ -78,6 +118,14 @@ const a = class { private p = 10; }; Edit:: emit when error Output:: +tsconfig.json:3:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +3 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:3 + //// [/home/src/workspaces/project/a.js] modified. new content: const a = class { p = 10; @@ -96,6 +144,14 @@ const a = class { Edit:: no emit run when error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] no change //// [/home/src/workspaces/project/tsconfig.json] modified. new content: diff --git a/testdata/baselines/reference/tscWatch/noEmit/dts-errors.js b/testdata/baselines/reference/tscWatch/noEmit/dts-errors.js index 66365eafbd..89e7c3eb2f 100644 --- a/testdata/baselines/reference/tscWatch/noEmit/dts-errors.js +++ b/testdata/baselines/reference/tscWatch/noEmit/dts-errors.js @@ -21,17 +21,13 @@ CompilerOptions::{ Output:: -a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -1 const a = class { private p = 10; }; -   ~ - - a.ts:1:7 - Add a type annotation to the variable a. - 1 const a = class { private p = 10; }; -    ~ +4 "outFile": "../outFile.js", +   ~~~~~~~~~ -Found 1 error in a.ts:1 +Found 1 error in tsconfig.json:4 //// [/home/src/workspaces/project/a.ts] no change //// [/home/src/workspaces/project/tsconfig.json] no change @@ -41,6 +37,14 @@ Found 1 error in a.ts:1 Edit:: fix syntax error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js", +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.ts] modified. new content: const a = "hello"; //// [/home/src/workspaces/project/tsconfig.json] no change @@ -50,6 +54,14 @@ const a = "hello"; Edit:: emit after fixing error Output:: +tsconfig.json:3:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +3 "outFile": "../outFile.js", +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:3 + //// [/home/src/workspaces/project/a.d.ts] new file declare const a = "hello"; @@ -70,6 +82,14 @@ const a = "hello"; Edit:: no emit run after fixing error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js", +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.d.ts] no change //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] no change @@ -87,17 +107,13 @@ Output:: Edit:: introduce error Output:: -a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -1 const a = class { private p = 10; }; -   ~ +4 "outFile": "../outFile.js", +   ~~~~~~~~~ - a.ts:1:7 - Add a type annotation to the variable a. - 1 const a = class { private p = 10; }; -    ~ - -Found 1 error in a.ts:1 +Found 1 error in tsconfig.json:4 //// [/home/src/workspaces/project/a.d.ts] no change //// [/home/src/workspaces/project/a.js] no change @@ -119,8 +135,17 @@ Output:: 1 const a = class { private p = 10; };    ~ +tsconfig.json:3:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +3 "outFile": "../outFile.js", +   ~~~~~~~~~ -Found 1 error in a.ts:1 + +Found 2 errors in 2 files. + +Errors Files + 1 a.ts:1 + 1 tsconfig.json:3 //// [/home/src/workspaces/project/a.d.ts] modified. new content: declare const a: { @@ -148,17 +173,13 @@ const a = class { Edit:: no emit run when error Output:: -a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -1 const a = class { private p = 10; }; -   ~ - - a.ts:1:7 - Add a type annotation to the variable a. - 1 const a = class { private p = 10; }; -    ~ +4 "outFile": "../outFile.js", +   ~~~~~~~~~ -Found 1 error in a.ts:1 +Found 1 error in tsconfig.json:4 //// [/home/src/workspaces/project/a.d.ts] no change //// [/home/src/workspaces/project/a.js] no change diff --git a/testdata/baselines/reference/tscWatch/noEmit/semantic-errors.js b/testdata/baselines/reference/tscWatch/noEmit/semantic-errors.js index a0eacfa2e0..629eb31063 100644 --- a/testdata/baselines/reference/tscWatch/noEmit/semantic-errors.js +++ b/testdata/baselines/reference/tscWatch/noEmit/semantic-errors.js @@ -20,13 +20,13 @@ CompilerOptions::{ Output:: -a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -1 const a: number = "hello" -   ~ +4 "outFile": "../outFile.js" +   ~~~~~~~~~ -Found 1 error in a.ts:1 +Found 1 error in tsconfig.json:4 //// [/home/src/workspaces/project/a.ts] no change //// [/home/src/workspaces/project/tsconfig.json] no change @@ -36,6 +36,14 @@ Found 1 error in a.ts:1 Edit:: fix syntax error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.ts] modified. new content: const a = "hello"; //// [/home/src/workspaces/project/tsconfig.json] no change @@ -45,6 +53,14 @@ const a = "hello"; Edit:: emit after fixing error Output:: +tsconfig.json:3:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +3 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:3 + //// [/home/src/workspaces/project/a.js] new file const a = "hello"; @@ -61,6 +77,14 @@ const a = "hello"; Edit:: no emit run after fixing error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] no change //// [/home/src/workspaces/project/tsconfig.json] modified. new content: @@ -76,13 +100,13 @@ Output:: Edit:: introduce error Output:: -a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -1 const a: number = "hello" -   ~ +4 "outFile": "../outFile.js" +   ~~~~~~~~~ -Found 1 error in a.ts:1 +Found 1 error in tsconfig.json:4 //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] modified. new content: @@ -94,13 +118,13 @@ const a: number = "hello" Edit:: emit when error Output:: -a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. +tsconfig.json:3:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -1 const a: number = "hello" -   ~ +3 "outFile": "../outFile.js" +   ~~~~~~~~~ -Found 1 error in a.ts:1 +Found 1 error in tsconfig.json:3 //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] no change @@ -116,13 +140,13 @@ Found 1 error in a.ts:1 Edit:: no emit run when error Output:: -a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -1 const a: number = "hello" -   ~ +4 "outFile": "../outFile.js" +   ~~~~~~~~~ -Found 1 error in a.ts:1 +Found 1 error in tsconfig.json:4 //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] no change diff --git a/testdata/baselines/reference/tscWatch/noEmit/syntax-errors.js b/testdata/baselines/reference/tscWatch/noEmit/syntax-errors.js index c2616d28af..4a9505fde2 100644 --- a/testdata/baselines/reference/tscWatch/noEmit/syntax-errors.js +++ b/testdata/baselines/reference/tscWatch/noEmit/syntax-errors.js @@ -25,8 +25,17 @@ Output:: 1 const a = "hello    ~ +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -Found 1 error in a.ts:1 +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 a.ts:1 + 1 tsconfig.json:4 //// [/home/src/workspaces/project/a.ts] no change //// [/home/src/workspaces/project/tsconfig.json] no change @@ -36,6 +45,14 @@ Found 1 error in a.ts:1 Edit:: fix syntax error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.ts] modified. new content: const a = "hello"; //// [/home/src/workspaces/project/tsconfig.json] no change @@ -45,6 +62,14 @@ const a = "hello"; Edit:: emit after fixing error Output:: +tsconfig.json:3:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +3 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:3 + //// [/home/src/workspaces/project/a.js] new file const a = "hello"; @@ -61,6 +86,14 @@ const a = "hello"; Edit:: no emit run after fixing error Output:: +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] no change //// [/home/src/workspaces/project/tsconfig.json] modified. new content: @@ -81,8 +114,17 @@ Output:: 1 const a = "hello    ~ +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 2 errors in 2 files. -Found 1 error in a.ts:1 +Errors Files + 1 a.ts:1 + 1 tsconfig.json:4 //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] modified. new content: @@ -99,8 +141,17 @@ Output:: 1 const a = "hello    ~ +tsconfig.json:3:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. -Found 1 error in a.ts:1 +3 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 a.ts:1 + 1 tsconfig.json:3 //// [/home/src/workspaces/project/a.js] modified. new content: const a = "hello; @@ -123,8 +174,17 @@ Output:: 1 const a = "hello    ~ +tsconfig.json:4:13 - error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. + +4 "outFile": "../outFile.js" +   ~~~~~~~~~ + + +Found 2 errors in 2 files. -Found 1 error in a.ts:1 +Errors Files + 1 a.ts:1 + 1 tsconfig.json:4 //// [/home/src/workspaces/project/a.js] no change //// [/home/src/workspaces/project/a.ts] no change