diff --git a/internal/fourslash/fourslash.go b/internal/fourslash/fourslash.go index a8f0f8c997..06427dbbc4 100644 --- a/internal/fourslash/fourslash.go +++ b/internal/fourslash/fourslash.go @@ -153,7 +153,7 @@ func NewFourslash(t *testing.T, capabilities *lsproto.ClientCapabilities, conten compilerOptions := &core.CompilerOptions{ SkipDefaultLibCheck: core.TSTrue, } - harnessutil.SetCompilerOptionsFromTestConfig(t, testData.GlobalOptions, compilerOptions) + harnessutil.SetCompilerOptionsFromTestConfig(t, testData.GlobalOptions, compilerOptions, rootDir) inputReader, inputWriter := newLSPPipe() outputReader, outputWriter := newLSPPipe() diff --git a/internal/incremental/snapshottobuildinfo.go b/internal/incremental/snapshottobuildinfo.go index 169d53f43f..04f6ace49f 100644 --- a/internal/incremental/snapshottobuildinfo.go +++ b/internal/incremental/snapshottobuildinfo.go @@ -91,15 +91,16 @@ func (t *toBuildInfo) toFileIdListId(set *collections.Set[tspath.Path]) BuildInf } func (t *toBuildInfo) toRelativeToBuildInfoCompilerOptionValue(option *tsoptions.CommandLineOption, v any) any { - if !option.IsFilePath { - return v - } if option.Kind == "list" { - if arr, ok := v.([]string); ok { - return core.Map(arr, t.relativeToBuildInfo) + if option.Elements().IsFilePath { + if arr, ok := v.([]string); ok { + return core.Map(arr, t.relativeToBuildInfo) + } + } + } else if option.IsFilePath { + if str, ok := v.(string); ok && str != "" { + return t.relativeToBuildInfo(v.(string)) } - } else if str, ok := v.(string); ok && str != "" { - return t.relativeToBuildInfo(v.(string)) } return v } diff --git a/internal/testutil/harnessutil/harnessutil.go b/internal/testutil/harnessutil/harnessutil.go index 0d0db4dec9..2cd2b2599f 100644 --- a/internal/testutil/harnessutil/harnessutil.go +++ b/internal/testutil/harnessutil/harnessutil.go @@ -98,7 +98,7 @@ func CompileFiles( // Parse harness and compiler options from the test configuration if testConfig != nil { - setOptionsFromTestConfig(t, testConfig, compilerOptions, &harnessOptions) + setOptionsFromTestConfig(t, testConfig, compilerOptions, &harnessOptions, currentDirectory) } return CompileFilesEx(t, inputFiles, otherFiles, &harnessOptions, compilerOptions, currentDirectory, symlinks, tsconfig) @@ -224,7 +224,7 @@ func CompileFilesEx( result.Repeat = func(testConfig TestConfiguration) *CompilationResult { newHarnessOptions := *harnessOptions newCompilerOptions := compilerOptions.Clone() - setOptionsFromTestConfig(t, testConfig, newCompilerOptions, &newHarnessOptions) + setOptionsFromTestConfig(t, testConfig, newCompilerOptions, &newHarnessOptions, currentDirectory) return CompileFilesEx(t, inputFiles, otherFiles, &newHarnessOptions, newCompilerOptions, currentDirectory, symlinks, tsconfig) } return result @@ -255,7 +255,7 @@ var testLibFolderMap = sync.OnceValue(func() map[string]any { return testfs }) -func SetCompilerOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compilerOptions *core.CompilerOptions) { +func SetCompilerOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compilerOptions *core.CompilerOptions, currentDirectory string) { for name, value := range testConfig { if name == "typescriptversion" { continue @@ -263,7 +263,7 @@ func SetCompilerOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration commandLineOption := getCommandLineOption(name) if commandLineOption != nil { - parsedValue := getOptionValue(t, commandLineOption, value) + parsedValue := getOptionValue(t, commandLineOption, value, currentDirectory) errors := tsoptions.ParseCompilerOptions(commandLineOption.Name, parsedValue, compilerOptions) if len(errors) > 0 { t.Fatalf("Error parsing value '%s' for compiler option '%s'.", value, commandLineOption.Name) @@ -272,7 +272,7 @@ func SetCompilerOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration } } -func setOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compilerOptions *core.CompilerOptions, harnessOptions *HarnessOptions) { +func setOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compilerOptions *core.CompilerOptions, harnessOptions *HarnessOptions, currentDirectory string) { for name, value := range testConfig { if name == "typescriptversion" { continue @@ -280,7 +280,7 @@ func setOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compil commandLineOption := getCommandLineOption(name) if commandLineOption != nil { - parsedValue := getOptionValue(t, commandLineOption, value) + parsedValue := getOptionValue(t, commandLineOption, value, currentDirectory) errors := tsoptions.ParseCompilerOptions(commandLineOption.Name, parsedValue, compilerOptions) if len(errors) > 0 { t.Fatalf("Error parsing value '%s' for compiler option '%s'.", value, commandLineOption.Name) @@ -289,7 +289,7 @@ func setOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compil } harnessOption := getHarnessOption(name) if harnessOption != nil { - parsedValue := getOptionValue(t, harnessOption, value) + parsedValue := getOptionValue(t, harnessOption, value, currentDirectory) parseHarnessOption(t, harnessOption.Name, parsedValue, harnessOptions) continue } @@ -395,7 +395,10 @@ func parseHarnessOption(t *testing.T, key string, value any, harnessOptions *Har case "fileName": harnessOptions.FileName = value.(string) case "libFiles": - harnessOptions.LibFiles = value.([]string) + harnessOptions.LibFiles = make([]string, 0, len(value.([]any))) + for _, v := range value.([]any) { + harnessOptions.LibFiles = append(harnessOptions.LibFiles, v.(string)) + } case "noImplicitReferences": harnessOptions.NoImplicitReferences = value.(bool) case "currentDirectory": @@ -421,9 +424,12 @@ func parseHarnessOption(t *testing.T, key string, value any, harnessOptions *Har var deprecatedModuleResolution []string = []string{"node", "classic", "node10"} -func getOptionValue(t *testing.T, option *tsoptions.CommandLineOption, value string) tsoptions.CompilerOptionsValue { +func getOptionValue(t *testing.T, option *tsoptions.CommandLineOption, value string, cwd string) tsoptions.CompilerOptionsValue { switch option.Kind { case tsoptions.CommandLineOptionTypeString: + if option.IsFilePath { + return tspath.GetNormalizedAbsolutePath(value, cwd) + } return value case tsoptions.CommandLineOptionTypeNumber: numVal, err := strconv.Atoi(value) @@ -448,6 +454,11 @@ func getOptionValue(t *testing.T, option *tsoptions.CommandLineOption, value str return enumVal case tsoptions.CommandLineOptionTypeList, tsoptions.CommandLineOptionTypeListOrElement: listVal, errors := tsoptions.ParseListTypeOption(option, value) + if option.Elements().IsFilePath { + return core.Map(listVal, func(item any) any { + return tspath.GetNormalizedAbsolutePath(item.(string), cwd) + }) + } if len(errors) > 0 { t.Fatalf("Unknown value '%s' for compiler option '%s'", value, option.Name) } @@ -987,7 +998,7 @@ func getValueOfOptionString(t *testing.T, option string, value string) tsoptions if optionDecl.Name == "moduleResolution" && slices.Contains(deprecatedModuleResolution, strings.ToLower(value)) { return value } - return getOptionValue(t, optionDecl, value) + return getOptionValue(t, optionDecl, value, "/") } func getCommandLineOption(option string) *tsoptions.CommandLineOption { diff --git a/internal/tsoptions/commandlineparser.go b/internal/tsoptions/commandlineparser.go index 4064cad038..0d8d237f55 100644 --- a/internal/tsoptions/commandlineparser.go +++ b/internal/tsoptions/commandlineparser.go @@ -282,59 +282,55 @@ func (p *commandLineParser) parseOptionValue( return i } -func (p *commandLineParser) parseListTypeOption(opt *CommandLineOption, value string) ([]string, []*ast.Diagnostic) { +func (p *commandLineParser) parseListTypeOption(opt *CommandLineOption, value string) ([]any, []*ast.Diagnostic) { return ParseListTypeOption(opt, value) } -func ParseListTypeOption(opt *CommandLineOption, value string) ([]string, []*ast.Diagnostic) { +func ParseListTypeOption(opt *CommandLineOption, value string) ([]any, []*ast.Diagnostic) { value = strings.TrimSpace(value) var errors []*ast.Diagnostic if strings.HasPrefix(value, "-") { - return []string{}, errors + return []any{}, errors } if opt.Kind == "listOrElement" && !strings.ContainsRune(value, ',') { val, err := validateJsonOptionValue(opt, value, nil, nil) if err != nil { - return []string{}, err + return []any{}, err } - return []string{val.(string)}, errors + return []any{val.(string)}, errors } if value == "" { - return []string{}, errors + return []any{}, errors } values := strings.Split(value, ",") switch opt.Elements().Kind { case "string": - elements := core.Filter(core.Map(values, func(v string) string { + elements := core.MapFiltered(values, func(v string) (any, bool) { val, err := validateJsonOptionValue(opt.Elements(), v, nil, nil) if s, ok := val.(string); ok && len(err) == 0 && s != "" { - return s + return s, true } errors = append(errors, err...) - return "" - }), isDefined) + return "", false + }) return elements, errors case "boolean", "object", "number": // do nothing: only string and enum/object types currently allowed as list entries // !!! we don't actually have number list options, so I didn't implement number list parsing panic("List of " + opt.Elements().Kind + " is not yet supported.") default: - result := core.Filter(core.Map(values, func(v string) string { + result := core.MapFiltered(values, func(v string) (any, bool) { val, err := convertJsonOptionOfEnumType(opt.Elements(), strings.TrimFunc(v, stringutil.IsWhiteSpaceLike), nil, nil) if s, ok := val.(string); ok && len(err) == 0 && s != "" { - return s + return s, true } errors = append(errors, err...) - return "" - }), isDefined) + return "", false + }) return result, errors } } -func isDefined(s string) bool { - return s != "" -} - func convertJsonOptionOfEnumType( opt *CommandLineOption, value string, diff --git a/internal/tsoptions/parsinghelpers.go b/internal/tsoptions/parsinghelpers.go index 859d65ce85..8ddcf6194d 100644 --- a/internal/tsoptions/parsinghelpers.go +++ b/internal/tsoptions/parsinghelpers.go @@ -564,16 +564,18 @@ func convertToOptionsWithAbsolutePaths(optionsBase *collections.OrderedMap[strin func ConvertOptionToAbsolutePath(o string, v any, optionMap CommandLineOptionNameMap, cwd string) (any, bool) { option := optionMap.Get(o) - if option == nil || !option.IsFilePath { + if option == nil { return nil, false } if option.Kind == "list" { - if arr, ok := v.([]string); ok { - return core.Map(arr, func(item string) string { - return tspath.GetNormalizedAbsolutePath(item, cwd) - }), true + if option.Elements().IsFilePath { + if arr, ok := v.([]string); ok { + return core.Map(arr, func(item string) string { + return tspath.GetNormalizedAbsolutePath(item, cwd) + }), true + } } - } else { + } else if option.IsFilePath { return tspath.GetNormalizedAbsolutePath(v.(string), cwd), true } return nil, false diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.errors.txt deleted file mode 100644 index e5b9f13b3d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -/src/index.ts(1,22): error TS2503: Cannot find namespace 'NS'. - - -==== /src/index.ts (1 errors) ==== - class Src implements NS.Dep { } - ~~ -!!! error TS2503: Cannot find namespace 'NS'. - -==== /deps/dep/dep.d.ts (0 errors) ==== - declare namespace NS { - interface Dep { - } - } -==== /deps/dep/package.json (0 errors) ==== - { - "typings": "dep.d.ts" - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.errors.txt.diff deleted file mode 100644 index 2a98ae77c9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.declarationEmitHasTypesRefOnNamespaceUse.errors.txt -+++ new.declarationEmitHasTypesRefOnNamespaceUse.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/src/index.ts(1,22): error TS2503: Cannot find namespace 'NS'. -+ -+ -+==== /src/index.ts (1 errors) ==== -+ class Src implements NS.Dep { } -+ ~~ -+!!! error TS2503: Cannot find namespace 'NS'. -+ -+==== /deps/dep/dep.d.ts (0 errors) ==== -+ declare namespace NS { -+ interface Dep { -+ } -+ } -+==== /deps/dep/package.json (0 errors) ==== -+ { -+ "typings": "dep.d.ts" -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.symbols index b18853c1d9..3deda15729 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.symbols +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.symbols @@ -3,4 +3,15 @@ === /src/index.ts === class Src implements NS.Dep { } >Src : Symbol(Src, Decl(index.ts, 0, 0)) +>NS.Dep : Symbol(Dep, Decl(dep.d.ts, 0, 22)) +>NS : Symbol(NS, Decl(dep.d.ts, 0, 0)) +>Dep : Symbol(Dep, Decl(dep.d.ts, 0, 22)) +=== /deps/dep/dep.d.ts === +declare namespace NS { +>NS : Symbol(NS, Decl(dep.d.ts, 0, 0)) + + interface Dep { +>Dep : Symbol(Dep, Decl(dep.d.ts, 0, 22)) + } +} diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.symbols.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.symbols.diff index 484df66b4c..fe1c7bee15 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.symbols.diff @@ -5,15 +5,10 @@ class Src implements NS.Dep { } >Src : Symbol(Src, Decl(index.ts, 0, 0)) ->NS.Dep : Symbol(NS.Dep, Decl(dep.d.ts, 0, 22)) -->NS : Symbol(NS, Decl(dep.d.ts, 0, 0)) ++>NS.Dep : Symbol(Dep, Decl(dep.d.ts, 0, 22)) + >NS : Symbol(NS, Decl(dep.d.ts, 0, 0)) ->Dep : Symbol(NS.Dep, Decl(dep.d.ts, 0, 22)) -- --=== /deps/dep/dep.d.ts === --declare namespace NS { -->NS : Symbol(NS, Decl(dep.d.ts, 0, 0)) -- -- interface Dep { -->Dep : Symbol(Dep, Decl(dep.d.ts, 0, 22)) -- } --} -+ \ No newline at end of file ++>Dep : Symbol(Dep, Decl(dep.d.ts, 0, 22)) + + === /deps/dep/dep.d.ts === + declare namespace NS { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.types b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.types index e70a84ce65..bae579d087 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.types @@ -5,3 +5,9 @@ class Src implements NS.Dep { } >Src : Src >NS : any +=== /deps/dep/dep.d.ts === + +declare namespace NS { + interface Dep { + } +} diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.types.diff deleted file mode 100644 index f892747b17..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.types.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.declarationEmitHasTypesRefOnNamespaceUse.types -+++ new.declarationEmitHasTypesRefOnNamespaceUse.types -@@= skipped -4, +4 lines =@@ - >Src : Src - >NS : any - --=== /deps/dep/dep.d.ts === -- --declare namespace NS { -- interface Dep { -- } --} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.symbols b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.symbols index aff9e3601b..2fc6eb77b8 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.symbols @@ -4,3 +4,7 @@ import { a2 } from "phaser"; >a2 : Symbol(a2, Decl(a.ts, 0, 8)) +=== /typings/phaser/types/phaser.d.ts === +export const a2: number; +>a2 : Symbol(a2, Decl(phaser.d.ts, 0, 12)) + diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.symbols.diff deleted file mode 100644 index 5f3fc26561..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.symbols.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.moduleResolutionAsTypeReferenceDirective.symbols -+++ new.moduleResolutionAsTypeReferenceDirective.symbols -@@= skipped -3, +3 lines =@@ - import { a2 } from "phaser"; - >a2 : Symbol(a2, Decl(a.ts, 0, 8)) - --=== /typings/phaser/types/phaser.d.ts === --export const a2: number; -->a2 : Symbol(a2, Decl(phaser.d.ts, 0, 12)) -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.types b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.types index 7856d10614..25861fd181 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.types +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.types @@ -4,3 +4,7 @@ import { a2 } from "phaser"; >a2 : any +=== /typings/phaser/types/phaser.d.ts === +export const a2: number; +>a2 : number + diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.types.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.types.diff index 4287d5ad6f..feb916ff54 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirective.types.diff @@ -5,8 +5,7 @@ === /a.ts === import { a2 } from "phaser"; ->a2 : number -- --=== /typings/phaser/types/phaser.d.ts === --export const a2: number; -->a2 : number +>a2 : any + + === /typings/phaser/types/phaser.d.ts === + export const a2: number; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.errors.txt deleted file mode 100644 index 96c3ff1783..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -/a.ts(1,20): error TS2307: Cannot find module 'phaser' or its corresponding type declarations. - - -==== /a.ts (1 errors) ==== - import { a2 } from "phaser"; - ~~~~~~~~ -!!! error TS2307: Cannot find module 'phaser' or its corresponding type declarations. -==== /typings/phaser/types/phaser.d.ts (0 errors) ==== - declare module "phaser" { - export const a2: number; - } - -==== /typings/phaser/package.json (0 errors) ==== - { "name": "phaser", "version": "1.2.3", "types": "types/phaser.d.ts" } - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.errors.txt.diff deleted file mode 100644 index 12c5a1d4dc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.moduleResolutionAsTypeReferenceDirectiveAmbient.errors.txt -+++ new.moduleResolutionAsTypeReferenceDirectiveAmbient.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/a.ts(1,20): error TS2307: Cannot find module 'phaser' or its corresponding type declarations. -+ -+ -+==== /a.ts (1 errors) ==== -+ import { a2 } from "phaser"; -+ ~~~~~~~~ -+!!! error TS2307: Cannot find module 'phaser' or its corresponding type declarations. -+==== /typings/phaser/types/phaser.d.ts (0 errors) ==== -+ declare module "phaser" { -+ export const a2: number; -+ } -+ -+==== /typings/phaser/package.json (0 errors) ==== -+ { "name": "phaser", "version": "1.2.3", "types": "types/phaser.d.ts" } -+ -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.symbols b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.symbols index 65839749a5..e2e00bde56 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.symbols @@ -4,3 +4,11 @@ import { a2 } from "phaser"; >a2 : Symbol(a2, Decl(a.ts, 0, 8)) +=== /typings/phaser/types/phaser.d.ts === +declare module "phaser" { +>"phaser" : Symbol("phaser", Decl(phaser.d.ts, 0, 0)) + + export const a2: number; +>a2 : Symbol(a2, Decl(phaser.d.ts, 1, 16)) +} + diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.symbols.diff deleted file mode 100644 index 4cd8652ed7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.symbols.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.moduleResolutionAsTypeReferenceDirectiveAmbient.symbols -+++ new.moduleResolutionAsTypeReferenceDirectiveAmbient.symbols -@@= skipped -3, +3 lines =@@ - import { a2 } from "phaser"; - >a2 : Symbol(a2, Decl(a.ts, 0, 8)) - --=== /typings/phaser/types/phaser.d.ts === --declare module "phaser" { -->"phaser" : Symbol("phaser", Decl(phaser.d.ts, 0, 0)) -- -- export const a2: number; -->a2 : Symbol(a2, Decl(phaser.d.ts, 1, 16)) --} -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.types b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.types index c36bb33a8c..d90608f2f1 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.types +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.types @@ -2,5 +2,13 @@ === /a.ts === import { a2 } from "phaser"; ->a2 : any +>a2 : number + +=== /typings/phaser/types/phaser.d.ts === +declare module "phaser" { +>"phaser" : typeof import("phaser") + + export const a2: number; +>a2 : number +} diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.types.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.types.diff deleted file mode 100644 index e62b71d3b1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveAmbient.types.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.moduleResolutionAsTypeReferenceDirectiveAmbient.types -+++ new.moduleResolutionAsTypeReferenceDirectiveAmbient.types -@@= skipped -1, +1 lines =@@ - - === /a.ts === - import { a2 } from "phaser"; -->a2 : number -- --=== /typings/phaser/types/phaser.d.ts === --declare module "phaser" { -->"phaser" : typeof import("phaser") -- -- export const a2: number; -->a2 : number --} -+>a2 : any diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.symbols b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.symbols index cbbc4985a8..7a56463e3a 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.symbols @@ -19,3 +19,7 @@ import { atTypesCache } from "@scoped/attypescache"; import { mangledAtTypesCache } from "@mangled/attypescache"; >mangledAtTypesCache : Symbol(mangledAtTypesCache, Decl(a.ts, 5, 8)) +=== /a/types/dummy/index.d.ts === +export const dummy: number; +>dummy : Symbol(dummy, Decl(index.d.ts, 0, 12)) + diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.symbols.diff index 92bf7e3079..ce0becb2f7 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.symbols.diff @@ -1,13 +1,9 @@ --- old.moduleResolutionAsTypeReferenceDirectiveScoped.symbols +++ new.moduleResolutionAsTypeReferenceDirectiveScoped.symbols -@@= skipped -18, +18 lines =@@ - import { mangledAtTypesCache } from "@mangled/attypescache"; - >mangledAtTypesCache : Symbol(mangledAtTypesCache, Decl(a.ts, 5, 8)) +@@= skipped -22, +22 lines =@@ + export const dummy: number; + >dummy : Symbol(dummy, Decl(index.d.ts, 0, 12)) --=== /a/types/dummy/index.d.ts === --export const dummy: number; -->dummy : Symbol(dummy, Decl(index.d.ts, 0, 12)) -- -=== /a/types/@scoped/typescache/index.d.ts === -export const typesCache: number; ->typesCache : Symbol(typesCache, Decl(index.d.ts, 0, 12)) diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.types b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.types index 989ee21135..af66a5a037 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.types +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.types @@ -19,3 +19,7 @@ import { atTypesCache } from "@scoped/attypescache"; import { mangledAtTypesCache } from "@mangled/attypescache"; >mangledAtTypesCache : any +=== /a/types/dummy/index.d.ts === +export const dummy: number; +>dummy : number + diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.types.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.types.diff index 9ba8157d2d..365ec1d9ab 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionAsTypeReferenceDirectiveScoped.types.diff @@ -21,10 +21,11 @@ import { mangledAtTypesCache } from "@mangled/attypescache"; ->mangledAtTypesCache : number -- --=== /a/types/dummy/index.d.ts === --export const dummy: number; -->dummy : number ++>mangledAtTypesCache : any + + === /a/types/dummy/index.d.ts === + export const dummy: number; + >dummy : number - -=== /a/types/@scoped/typescache/index.d.ts === -export const typesCache: number; @@ -38,4 +39,3 @@ -export const mangledAtTypesCache: number; ->mangledAtTypesCache : number - -+>mangledAtTypesCache : any diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.errors.txt index b47da3756f..00775658da 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.errors.txt @@ -1,23 +1,18 @@ -/a.ts(1,1): error TS2304: Cannot find name 'typesCache'. -/a.ts(3,1): error TS2304: Cannot find name 'nodeModulesCache'. /a.ts(4,1): error TS2304: Cannot find name 'mangledNodeModules'. -/a.ts(5,1): error TS2304: Cannot find name 'atTypesCache'. +/a.ts(5,1): error TS2552: Cannot find name 'atTypesCache'. Did you mean 'typesCache'? -==== /a.ts (4 errors) ==== +==== /a.ts (2 errors) ==== typesCache; - ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'typesCache'. mangledAtTypesCache; nodeModulesCache; - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'nodeModulesCache'. mangledNodeModules; ~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'mangledNodeModules'. atTypesCache; ~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'atTypesCache'. +!!! error TS2552: Cannot find name 'atTypesCache'. Did you mean 'typesCache'? +!!! related TS2728 /types/@scoped/typescache/index.d.ts:1:15: 'typesCache' is declared here. mangledAtTypesCache; ==== /types/@scoped/typescache/index.d.ts (0 errors) ==== declare const typesCache: number; diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.errors.txt.diff index bbb7ca5bfd..53da7530e5 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.errors.txt.diff @@ -10,12 +10,10 @@ -error TS2688: Cannot find type definition file for '@scoped/attypescache'. - The file is in the program because: - Entry point of type library '@scoped/attypescache' specified in compilerOptions -+/a.ts(1,1): error TS2304: Cannot find name 'typesCache'. -+/a.ts(3,1): error TS2304: Cannot find name 'nodeModulesCache'. /a.ts(4,1): error TS2304: Cannot find name 'mangledNodeModules'. --/a.ts(5,1): error TS2552: Cannot find name 'atTypesCache'. Did you mean 'typesCache'? -- -- + /a.ts(5,1): error TS2552: Cannot find name 'atTypesCache'. Did you mean 'typesCache'? + + -!!! error TS2688: Cannot find type definition file for '@mangled/nodemodulescache'. -!!! error TS2688: The file is in the program because: -!!! error TS2688: Entry point of type library '@mangled/nodemodulescache' specified in compilerOptions @@ -25,26 +23,6 @@ -!!! error TS2688: Cannot find type definition file for '@scoped/attypescache'. -!!! error TS2688: The file is in the program because: -!!! error TS2688: Entry point of type library '@scoped/attypescache' specified in compilerOptions --==== /a.ts (2 errors) ==== -+/a.ts(5,1): error TS2304: Cannot find name 'atTypesCache'. -+ -+ -+==== /a.ts (4 errors) ==== + ==== /a.ts (2 errors) ==== typesCache; -+ ~~~~~~~~~~ -+!!! error TS2304: Cannot find name 'typesCache'. - mangledAtTypesCache; - nodeModulesCache; -+ ~~~~~~~~~~~~~~~~ -+!!! error TS2304: Cannot find name 'nodeModulesCache'. - mangledNodeModules; - ~~~~~~~~~~~~~~~~~~ - !!! error TS2304: Cannot find name 'mangledNodeModules'. - atTypesCache; - ~~~~~~~~~~~~ --!!! error TS2552: Cannot find name 'atTypesCache'. Did you mean 'typesCache'? --!!! related TS2728 /types/@scoped/typescache/index.d.ts:1:15: 'typesCache' is declared here. -+!!! error TS2304: Cannot find name 'atTypesCache'. - mangledAtTypesCache; - ==== /types/@scoped/typescache/index.d.ts (0 errors) ==== - declare const typesCache: number; \ No newline at end of file + mangledAtTypesCache; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols index ffa2f7a38c..980352c5e3 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols @@ -2,15 +2,27 @@ === /a.ts === typesCache; +>typesCache : Symbol(typesCache, Decl(index.d.ts, 0, 13)) + mangledAtTypesCache; >mangledAtTypesCache : Symbol(mangledAtTypesCache, Decl(index.d.ts, 0, 13)) nodeModulesCache; +>nodeModulesCache : Symbol(nodeModulesCache, Decl(index.d.ts, 0, 13)) + mangledNodeModules; atTypesCache; mangledAtTypesCache; >mangledAtTypesCache : Symbol(mangledAtTypesCache, Decl(index.d.ts, 0, 13)) +=== /types/@scoped/typescache/index.d.ts === +declare const typesCache: number; +>typesCache : Symbol(typesCache, Decl(index.d.ts, 0, 13)) + +=== /node_modules/@scoped/nodemodulescache/index.d.ts === +declare const nodeModulesCache: number; +>nodeModulesCache : Symbol(nodeModulesCache, Decl(index.d.ts, 0, 13)) + === /node_modules/@types/mangled__attypescache/index.d.ts === declare const mangledAtTypesCache: number; >mangledAtTypesCache : Symbol(mangledAtTypesCache, Decl(index.d.ts, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols.diff deleted file mode 100644 index fa9781f475..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols -+++ new.typeReferenceDirectiveScopedPackageCustomTypeRoot.symbols -@@= skipped -1, +1 lines =@@ - - === /a.ts === - typesCache; -->typesCache : Symbol(typesCache, Decl(index.d.ts, 0, 13)) -- - mangledAtTypesCache; - >mangledAtTypesCache : Symbol(mangledAtTypesCache, Decl(index.d.ts, 0, 13)) - - nodeModulesCache; -->nodeModulesCache : Symbol(nodeModulesCache, Decl(index.d.ts, 0, 13)) -- - mangledNodeModules; - atTypesCache; - mangledAtTypesCache; - >mangledAtTypesCache : Symbol(mangledAtTypesCache, Decl(index.d.ts, 0, 13)) -- --=== /types/@scoped/typescache/index.d.ts === --declare const typesCache: number; -->typesCache : Symbol(typesCache, Decl(index.d.ts, 0, 13)) -- --=== /node_modules/@scoped/nodemodulescache/index.d.ts === --declare const nodeModulesCache: number; -->nodeModulesCache : Symbol(nodeModulesCache, Decl(index.d.ts, 0, 13)) - - === /node_modules/@types/mangled__attypescache/index.d.ts === - declare const mangledAtTypesCache: number; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.types index ee9a5343fc..4482607344 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.types @@ -2,13 +2,13 @@ === /a.ts === typesCache; ->typesCache : any +>typesCache : number mangledAtTypesCache; >mangledAtTypesCache : number nodeModulesCache; ->nodeModulesCache : any +>nodeModulesCache : number mangledNodeModules; >mangledNodeModules : any @@ -19,6 +19,14 @@ atTypesCache; mangledAtTypesCache; >mangledAtTypesCache : number +=== /types/@scoped/typescache/index.d.ts === +declare const typesCache: number; +>typesCache : number + +=== /node_modules/@scoped/nodemodulescache/index.d.ts === +declare const nodeModulesCache: number; +>nodeModulesCache : number + === /node_modules/@types/mangled__attypescache/index.d.ts === declare const mangledAtTypesCache: number; >mangledAtTypesCache : number diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.types.diff deleted file mode 100644 index 9d616c8725..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectiveScopedPackageCustomTypeRoot.types.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- old.typeReferenceDirectiveScopedPackageCustomTypeRoot.types -+++ new.typeReferenceDirectiveScopedPackageCustomTypeRoot.types -@@= skipped -1, +1 lines =@@ - - === /a.ts === - typesCache; -->typesCache : number -+>typesCache : any - - mangledAtTypesCache; - >mangledAtTypesCache : number - - nodeModulesCache; -->nodeModulesCache : number -+>nodeModulesCache : any - - mangledNodeModules; - >mangledNodeModules : any -@@= skipped -16, +16 lines =@@ - - mangledAtTypesCache; - >mangledAtTypesCache : number -- --=== /types/@scoped/typescache/index.d.ts === --declare const typesCache: number; -->typesCache : number -- --=== /node_modules/@scoped/nodemodulescache/index.d.ts === --declare const nodeModulesCache: number; -->nodeModulesCache : number - - === /node_modules/@types/mangled__attypescache/index.d.ts === - declare const mangledAtTypesCache: number; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.errors.txt deleted file mode 100644 index 7b17477b8c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -/app.ts(3,8): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - -==== /app.ts (1 errors) ==== - /// - interface A { - x: $ - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - } -==== /types/lib/index.d.ts (0 errors) ==== - interface $ { x } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.errors.txt.diff deleted file mode 100644 index a6b5cabea6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.typeReferenceDirectives1.errors.txt -+++ new.typeReferenceDirectives1.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/app.ts(3,8): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+ -+==== /app.ts (1 errors) ==== -+ /// -+ interface A { -+ x: $ -+ ~ -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ } -+==== /types/lib/index.d.ts (0 errors) ==== -+ interface $ { x } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.symbols index d2ad2448b6..b4657fa78e 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.symbols @@ -7,5 +7,10 @@ interface A { x: $ >x : Symbol(x, Decl(app.ts, 1, 13)) ->$ : Symbol($) +>$ : Symbol($, Decl(index.d.ts, 0, 0)) } +=== /types/lib/index.d.ts === +interface $ { x } +>$ : Symbol($, Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(index.d.ts, 0, 13)) + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.symbols.diff index 4ec27a0bcf..4258d84238 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.symbols.diff @@ -5,12 +5,11 @@ x: $ ->x : Symbol(A.x, Decl(app.ts, 1, 13)) -->$ : Symbol($, Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(app.ts, 1, 13)) -+>$ : Symbol($) + >$ : Symbol($, Decl(index.d.ts, 0, 0)) } --=== /types/lib/index.d.ts === --interface $ { x } -->$ : Symbol($, Decl(index.d.ts, 0, 0)) + === /types/lib/index.d.ts === + interface $ { x } + >$ : Symbol($, Decl(index.d.ts, 0, 0)) ->x : Symbol($.x, Decl(index.d.ts, 0, 13)) -- \ No newline at end of file ++>x : Symbol(x, Decl(index.d.ts, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.types index 91487f636d..28255a5f5b 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.types @@ -6,3 +6,7 @@ interface A { x: $ >x : $ } +=== /types/lib/index.d.ts === +interface $ { x } +>x : any + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.types.diff deleted file mode 100644 index 76d3f24184..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.types.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.typeReferenceDirectives1.types -+++ new.typeReferenceDirectives1.types -@@= skipped -5, +5 lines =@@ - x: $ - >x : $ - } --=== /types/lib/index.d.ts === --interface $ { x } -->x : any -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.symbols index 14122919c7..607ddafcf3 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.symbols @@ -18,3 +18,8 @@ export interface $ { x } >$ : Symbol($, Decl(ref.d.ts, 0, 0)) >x : Symbol(x, Decl(ref.d.ts, 0, 20)) +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.symbols.diff index 3262960507..6250ceed7b 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.symbols.diff @@ -13,9 +13,7 @@ export interface $ { x } >$ : Symbol($, Decl(ref.d.ts, 0, 0)) ->x : Symbol($.x, Decl(ref.d.ts, 0, 20)) -- --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->x : Symbol(x, Decl(index.d.ts, 0, 16)) +>x : Symbol(x, Decl(ref.d.ts, 0, 20)) + + === /types/lib/index.d.ts === + declare let $: { x: number } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.types index 60f4449b0d..01a03c4d37 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.types @@ -14,3 +14,8 @@ export interface A { export interface $ { x } >x : any +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : { x: number; } +>x : number + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.types.diff deleted file mode 100644 index ee084df282..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.typeReferenceDirectives10.types -+++ new.typeReferenceDirectives10.types -@@= skipped -13, +13 lines =@@ - export interface $ { x } - >x : any - --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : { x: number; } -->x : number -- \ 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 bd181d492b..59a7ac20e7 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.errors.txt @@ -1,5 +1,4 @@ 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. @@ -10,8 +9,6 @@ error TS5102: Option 'outFile' has been removed. Please remove it from your conf ==== /types/lib/index.d.ts (0 errors) ==== interface Lib { x } -==== /mod1.ts (1 errors) ==== +==== /mod1.ts (0 errors) ==== export function foo(): Lib { return {x: 1} } - ~~~ -!!! error TS2304: Cannot find name 'Lib'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.symbols index 10d36bfee4..e2bd8989e1 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.symbols @@ -8,9 +8,14 @@ export const bar = foo(); >bar : Symbol(bar, Decl(mod2.ts, 1, 12)) >foo : Symbol(foo, Decl(mod2.ts, 0, 8)) +=== /types/lib/index.d.ts === +interface Lib { x } +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(index.d.ts, 0, 15)) + === /mod1.ts === export function foo(): Lib { return {x: 1} } >foo : Symbol(foo, Decl(mod1.ts, 0, 0)) ->Lib : Symbol(Lib) +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) >x : Symbol(x, Decl(mod1.ts, 0, 37)) diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.symbols.diff index 9a91bdb224..6de97cd03f 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.symbols.diff @@ -1,17 +1,11 @@ --- old.typeReferenceDirectives11.symbols +++ new.typeReferenceDirectives11.symbols -@@= skipped -7, +7 lines =@@ - >bar : Symbol(bar, Decl(mod2.ts, 1, 12)) - >foo : Symbol(foo, Decl(mod2.ts, 0, 8)) - --=== /types/lib/index.d.ts === --interface Lib { x } -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +@@= skipped -10, +10 lines =@@ + === /types/lib/index.d.ts === + interface Lib { x } + >Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) ->x : Symbol(Lib.x, Decl(index.d.ts, 0, 15)) -- ++>x : Symbol(x, Decl(index.d.ts, 0, 15)) + === /mod1.ts === - export function foo(): Lib { return {x: 1} } - >foo : Symbol(foo, Decl(mod1.ts, 0, 0)) -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) -+>Lib : Symbol(Lib) - >x : Symbol(x, Decl(mod1.ts, 0, 37)) + export function foo(): Lib { return {x: 1} } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.types index 070753d86a..83f1a103db 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.types @@ -9,6 +9,10 @@ export const bar = foo(); >foo() : Lib >foo : () => Lib +=== /types/lib/index.d.ts === +interface Lib { x } +>x : any + === /mod1.ts === export function foo(): Lib { return {x: 1} } >foo : () => Lib diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.types.diff deleted file mode 100644 index 915a041aca..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives11.types.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.typeReferenceDirectives11.types -+++ new.typeReferenceDirectives11.types -@@= skipped -8, +8 lines =@@ - >foo() : Lib - >foo : () => Lib - --=== /types/lib/index.d.ts === --interface Lib { x } -->x : any -- - === /mod1.ts === - export function foo(): Lib { return {x: 1} } - >foo : () => Lib \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt index da30e5583e..e2f5348459 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.errors.txt @@ -1,6 +1,4 @@ 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. @@ -20,7 +18,7 @@ error TS5102: Option 'outFile' has been removed. Please remove it from your conf x } -==== /mod1.ts (2 errors) ==== +==== /mod1.ts (0 errors) ==== /// import {Cls} from "./main"; @@ -29,13 +27,9 @@ error TS5102: Option 'outFile' has been removed. Please remove it from your conf declare module "./main" { interface Cls { foo(): Lib; - ~~~ -!!! error TS2304: Cannot find name 'Lib'. } namespace Cls { function bar(): Lib; - ~~~ -!!! error TS2304: Cannot find name 'Lib'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.symbols index 9738a08ece..bbb26156ac 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.symbols @@ -22,6 +22,11 @@ export const bar = Cls.bar(); >Cls : Symbol(Cls, Decl(mod2.ts, 0, 8)) >bar : Symbol(bar, Decl(mod1.ts, 9, 19)) +=== /types/lib/index.d.ts === +interface Lib { x } +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(index.d.ts, 0, 15)) + === /main.ts === export class Cls { >Cls : Symbol(Cls, Decl(main.ts, 0, 0), Decl(mod1.ts, 5, 25), Decl(mod1.ts, 8, 5)) @@ -52,14 +57,14 @@ declare module "./main" { foo(): Lib; >foo : Symbol(foo, Decl(mod1.ts, 6, 19)) ->Lib : Symbol(Lib) +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) } namespace Cls { >Cls : Symbol(Cls, Decl(main.ts, 0, 0), Decl(mod1.ts, 5, 25), Decl(mod1.ts, 8, 5)) function bar(): Lib; >bar : Symbol(bar, Decl(mod1.ts, 9, 19)) ->Lib : Symbol(Lib) +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) } } diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.symbols.diff index 12defc288b..edf2c2b872 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.symbols.diff @@ -16,13 +16,14 @@ +>Cls.bar : Symbol(bar, Decl(mod1.ts, 9, 19)) >Cls : Symbol(Cls, Decl(mod2.ts, 0, 8)) ->bar : Symbol(Cls.bar, Decl(mod1.ts, 9, 19)) -- --=== /types/lib/index.d.ts === --interface Lib { x } -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) -->x : Symbol(Lib.x, Decl(index.d.ts, 0, 15)) +>bar : Symbol(bar, Decl(mod1.ts, 9, 19)) + === /types/lib/index.d.ts === + interface Lib { x } + >Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +->x : Symbol(Lib.x, Decl(index.d.ts, 0, 15)) ++>x : Symbol(x, Decl(index.d.ts, 0, 15)) + === /main.ts === export class Cls { >Cls : Symbol(Cls, Decl(main.ts, 0, 0), Decl(mod1.ts, 5, 25), Decl(mod1.ts, 8, 5)) @@ -33,7 +34,7 @@ } === /mod1.ts === -@@= skipped -30, +25 lines =@@ +@@= skipped -30, +30 lines =@@ >Cls : Symbol(Cls, Decl(mod1.ts, 2, 8)) Cls.prototype.foo = function() { return undefined; } @@ -54,16 +55,7 @@ foo(): Lib; ->foo : Symbol(Cls.foo, Decl(mod1.ts, 6, 19)) -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +>foo : Symbol(foo, Decl(mod1.ts, 6, 19)) -+>Lib : Symbol(Lib) + >Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) } - namespace Cls { - >Cls : Symbol(Cls, Decl(main.ts, 0, 0), Decl(mod1.ts, 5, 25), Decl(mod1.ts, 8, 5)) - - function bar(): Lib; - >bar : Symbol(bar, Decl(mod1.ts, 9, 19)) -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) -+>Lib : Symbol(Lib) - } - } + namespace Cls { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.types index de16f80ec9..52a332f3d6 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.types @@ -25,6 +25,10 @@ export const bar = Cls.bar(); >Cls : typeof Cls >bar : () => Lib +=== /types/lib/index.d.ts === +interface Lib { x } +>x : any + === /main.ts === export class Cls { >Cls : Cls diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.types.diff index b749d58d7a..7215d0efe2 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.types.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives12.types.diff @@ -1,17 +1,6 @@ --- old.typeReferenceDirectives12.types +++ new.typeReferenceDirectives12.types -@@= skipped -24, +24 lines =@@ - >Cls : typeof Cls - >bar : () => Lib - --=== /types/lib/index.d.ts === --interface Lib { x } -->x : any -- - === /main.ts === - export class Cls { - >Cls : Cls -@@= skipped -29, +25 lines =@@ +@@= skipped -53, +53 lines =@@ >undefined : undefined declare module "./main" { diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.errors.txt deleted file mode 100644 index ea6dc5c289..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -/app.ts(4,21): error TS2693: '$' only refers to a type, but is being used as a value here. - - -==== /app.ts (1 errors) ==== - /// - import {$} from "./ref"; - export interface A { - x: () => typeof $ - ~ -!!! error TS2693: '$' only refers to a type, but is being used as a value here. - } - -==== /ref.d.ts (0 errors) ==== - export interface $ { x } - -==== /types/lib/index.d.ts (0 errors) ==== - declare let $: { x: number } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.errors.txt.diff deleted file mode 100644 index 099c789445..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.typeReferenceDirectives13.errors.txt -+++ new.typeReferenceDirectives13.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/app.ts(4,21): error TS2693: '$' only refers to a type, but is being used as a value here. -+ -+ -+==== /app.ts (1 errors) ==== -+ /// -+ import {$} from "./ref"; -+ export interface A { -+ x: () => typeof $ -+ ~ -+!!! error TS2693: '$' only refers to a type, but is being used as a value here. -+ } -+ -+==== /ref.d.ts (0 errors) ==== -+ export interface $ { x } -+ -+==== /types/lib/index.d.ts (0 errors) ==== -+ declare let $: { x: number } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.symbols index da8c1a95ae..b3a4ab1644 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.symbols @@ -10,6 +10,7 @@ export interface A { x: () => typeof $ >x : Symbol(x, Decl(app.ts, 2, 20)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) } === /ref.d.ts === @@ -17,3 +18,8 @@ export interface $ { x } >$ : Symbol($, Decl(ref.d.ts, 0, 0)) >x : Symbol(x, Decl(ref.d.ts, 0, 20)) +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.symbols.diff index b278c24426..9776522250 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.symbols.diff @@ -5,17 +5,15 @@ x: () => typeof $ ->x : Symbol(A.x, Decl(app.ts, 2, 20)) -->$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(app.ts, 2, 20)) + >$ : Symbol($, Decl(index.d.ts, 0, 11)) } === /ref.d.ts === export interface $ { x } >$ : Symbol($, Decl(ref.d.ts, 0, 0)) ->x : Symbol($.x, Decl(ref.d.ts, 0, 20)) -- --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->x : Symbol(x, Decl(index.d.ts, 0, 16)) +>x : Symbol(x, Decl(ref.d.ts, 0, 20)) + + === /types/lib/index.d.ts === + declare let $: { x: number } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.types index c74b263a87..f9ec9756a4 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.types @@ -7,11 +7,16 @@ import {$} from "./ref"; export interface A { x: () => typeof $ ->x : () => any ->$ : any +>x : () => { x: number; } +>$ : { x: number; } } === /ref.d.ts === export interface $ { x } >x : any +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : { x: number; } +>x : number + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.types.diff index eab7da2d1b..d42d51fc5b 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.types.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.types.diff @@ -5,16 +5,6 @@ export interface A { x: () => typeof $ ->x : () => typeof $ -->$ : { x: number; } -+>x : () => any -+>$ : any ++>x : () => { x: number; } + >$ : { x: number; } } - - === /ref.d.ts === - export interface $ { x } - >x : any -- --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : { x: number; } -->x : number diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.errors.txt deleted file mode 100644 index 7fa49b23de..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -/app.ts(2,8): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - -==== /app.ts (1 errors) ==== - interface A { - x: $ - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - } -==== /types/lib/index.d.ts (0 errors) ==== - interface $ { x } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.errors.txt.diff deleted file mode 100644 index 18b0660343..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.typeReferenceDirectives2.errors.txt -+++ new.typeReferenceDirectives2.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/app.ts(2,8): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+ -+==== /app.ts (1 errors) ==== -+ interface A { -+ x: $ -+ ~ -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ } -+==== /types/lib/index.d.ts (0 errors) ==== -+ interface $ { x } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.symbols index 8a6a677b82..361a87bf5e 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.symbols @@ -6,5 +6,10 @@ interface A { x: $ >x : Symbol(x, Decl(app.ts, 0, 13)) ->$ : Symbol($) +>$ : Symbol($, Decl(index.d.ts, 0, 0)) } +=== /types/lib/index.d.ts === +interface $ { x } +>$ : Symbol($, Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(index.d.ts, 0, 13)) + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.symbols.diff index 0a508a2614..2458e98e1e 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.symbols.diff @@ -5,12 +5,11 @@ x: $ ->x : Symbol(A.x, Decl(app.ts, 0, 13)) -->$ : Symbol($, Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(app.ts, 0, 13)) -+>$ : Symbol($) + >$ : Symbol($, Decl(index.d.ts, 0, 0)) } --=== /types/lib/index.d.ts === --interface $ { x } -->$ : Symbol($, Decl(index.d.ts, 0, 0)) + === /types/lib/index.d.ts === + interface $ { x } + >$ : Symbol($, Decl(index.d.ts, 0, 0)) ->x : Symbol($.x, Decl(index.d.ts, 0, 13)) -- \ No newline at end of file ++>x : Symbol(x, Decl(index.d.ts, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.types index c636a9e709..701db071f2 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.types @@ -5,3 +5,7 @@ interface A { x: $ >x : $ } +=== /types/lib/index.d.ts === +interface $ { x } +>x : any + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.types.diff deleted file mode 100644 index bc4662f78a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives2.types.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.typeReferenceDirectives2.types -+++ new.typeReferenceDirectives2.types -@@= skipped -4, +4 lines =@@ - x: $ - >x : $ - } --=== /types/lib/index.d.ts === --interface $ { x } -->x : any -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.js b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.js index 9b23945b5b..7ca1ca25dc 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.js +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.js @@ -28,7 +28,7 @@ interface A { //// [DtsFileErrors] -/app.d.ts(3,14): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. +/app.d.ts(3,14): error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? ==== /app.d.ts (1 errors) ==== @@ -36,7 +36,7 @@ interface A { interface A { x: () => $; ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. +!!! error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? } ==== /ref.d.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.js.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.js.diff deleted file mode 100644 index 9434e84ae3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.js.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.typeReferenceDirectives3.js -+++ new.typeReferenceDirectives3.js -@@= skipped -27, +27 lines =@@ - //// [DtsFileErrors] - - --/app.d.ts(3,14): error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? -+/app.d.ts(3,14): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - - ==== /app.d.ts (1 errors) ==== -@@= skipped -8, +8 lines =@@ - interface A { - x: () => $; - ~ --!!! error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - } - - ==== /ref.d.ts (0 errors) ==== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.symbols index 2ef0defcd5..19e0104be1 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.symbols @@ -8,10 +8,15 @@ interface A { x: () => $ >x : Symbol(x, Decl(app.ts, 2, 13)) ->$ : Symbol($, Decl(ref.d.ts, 0, 0)) +>$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) } === /ref.d.ts === interface $ { x } ->$ : Symbol($, Decl(ref.d.ts, 0, 0)) +>$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) >x : Symbol(x, Decl(ref.d.ts, 0, 13)) +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.symbols.diff index 600eabb062..586b5bdebe 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.symbols.diff @@ -5,18 +5,14 @@ x: () => $ ->x : Symbol(A.x, Decl(app.ts, 2, 13)) -->$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(app.ts, 2, 13)) -+>$ : Symbol($, Decl(ref.d.ts, 0, 0)) + >$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) } === /ref.d.ts === interface $ { x } -->$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) + >$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) ->x : Symbol($.x, Decl(ref.d.ts, 0, 13)) -- --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) -->x : Symbol(x, Decl(index.d.ts, 0, 16)) -+>$ : Symbol($, Decl(ref.d.ts, 0, 0)) +>x : Symbol(x, Decl(ref.d.ts, 0, 13)) + + === /types/lib/index.d.ts === + declare let $: { x: number } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.types index bc6214c8a6..10a0715a4c 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.types @@ -11,3 +11,8 @@ interface A { interface $ { x } >x : any +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : { x: number; } +>x : number + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.types.diff deleted file mode 100644 index 38a63238a4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.typeReferenceDirectives3.types -+++ new.typeReferenceDirectives3.types -@@= skipped -10, +10 lines =@@ - interface $ { x } - >x : any - --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : { x: number; } -->x : number -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.js b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.js index 0399d84907..b610d83dc4 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.js +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.js @@ -30,18 +30,18 @@ declare let y: () => $; //// [DtsFileErrors] -/app.d.ts(2,16): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -/app.d.ts(3,22): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. +/app.d.ts(2,16): error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? +/app.d.ts(3,22): error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? ==== /app.d.ts (2 errors) ==== /// declare let x: $; ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. +!!! error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? declare let y: () => $; ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. +!!! error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? ==== /ref.d.ts (0 errors) ==== interface $ { x } diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.js.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.js.diff deleted file mode 100644 index d1c79cfe03..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.js.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.typeReferenceDirectives4.js -+++ new.typeReferenceDirectives4.js -@@= skipped -29, +29 lines =@@ - //// [DtsFileErrors] - - --/app.d.ts(2,16): error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? --/app.d.ts(3,22): error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? -+/app.d.ts(2,16): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+/app.d.ts(3,22): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - - ==== /app.d.ts (2 errors) ==== - /// - declare let x: $; - ~ --!!! error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - declare let y: () => $; - ~ --!!! error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - ==== /ref.d.ts (0 errors) ==== - interface $ { x } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.symbols index a0537bfb4d..5a46743e32 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.symbols @@ -6,7 +6,7 @@ let x: $; >x : Symbol(x, Decl(app.ts, 3, 3)) ->$ : Symbol($, Decl(ref.d.ts, 0, 0)) +>$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) let y = () => x >y : Symbol(y, Decl(app.ts, 4, 3)) @@ -14,6 +14,12 @@ let y = () => x === /ref.d.ts === interface $ { x } ->$ : Symbol($, Decl(ref.d.ts, 0, 0)) +>$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) >x : Symbol(x, Decl(ref.d.ts, 0, 13)) +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) + + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.symbols.diff index 83292a44b5..b2eaf14584 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.symbols.diff @@ -1,25 +1,11 @@ --- old.typeReferenceDirectives4.symbols +++ new.typeReferenceDirectives4.symbols -@@= skipped -5, +5 lines =@@ - - let x: $; - >x : Symbol(x, Decl(app.ts, 3, 3)) -->$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) -+>$ : Symbol($, Decl(ref.d.ts, 0, 0)) - - let y = () => x - >y : Symbol(y, Decl(app.ts, 4, 3)) -@@= skipped -8, +8 lines =@@ - +@@= skipped -14, +14 lines =@@ === /ref.d.ts === interface $ { x } -->$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) + >$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) ->x : Symbol($.x, Decl(ref.d.ts, 0, 13)) -- --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : Symbol($, Decl(ref.d.ts, 0, 0), Decl(index.d.ts, 0, 11)) -->x : Symbol(x, Decl(index.d.ts, 0, 16)) -- -+>$ : Symbol($, Decl(ref.d.ts, 0, 0)) +>x : Symbol(x, Decl(ref.d.ts, 0, 13)) + + === /types/lib/index.d.ts === + declare let $: { x: number } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.types index c478393c4e..5ed11fda01 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.types @@ -16,3 +16,9 @@ let y = () => x interface $ { x } >x : any +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : { x: number; } +>x : number + + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.types.diff deleted file mode 100644 index a8d7c7df18..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.types.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.typeReferenceDirectives4.types -+++ new.typeReferenceDirectives4.types -@@= skipped -15, +15 lines =@@ - interface $ { x } - >x : any - --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : { x: number; } -->x : number -- -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.errors.txt deleted file mode 100644 index e285413169..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -/app.ts(4,15): error TS2693: '$' only refers to a type, but is being used as a value here. - - -==== /app.ts (1 errors) ==== - /// - import {$} from "./ref"; - export interface A { - x: typeof $; - ~ -!!! error TS2693: '$' only refers to a type, but is being used as a value here. - } -==== /ref.d.ts (0 errors) ==== - export interface $ { x } - -==== /types/lib/index.d.ts (0 errors) ==== - declare let $: { x: number } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.errors.txt.diff deleted file mode 100644 index 3afcb6be8f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.typeReferenceDirectives5.errors.txt -+++ new.typeReferenceDirectives5.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/app.ts(4,15): error TS2693: '$' only refers to a type, but is being used as a value here. -+ -+ -+==== /app.ts (1 errors) ==== -+ /// -+ import {$} from "./ref"; -+ export interface A { -+ x: typeof $; -+ ~ -+!!! error TS2693: '$' only refers to a type, but is being used as a value here. -+ } -+==== /ref.d.ts (0 errors) ==== -+ export interface $ { x } -+ -+==== /types/lib/index.d.ts (0 errors) ==== -+ declare let $: { x: number } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.symbols index efd12fe43d..07a05123b9 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.symbols @@ -10,9 +10,15 @@ export interface A { x: typeof $; >x : Symbol(x, Decl(app.ts, 2, 20)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) } === /ref.d.ts === export interface $ { x } >$ : Symbol($, Decl(ref.d.ts, 0, 0)) >x : Symbol(x, Decl(ref.d.ts, 0, 20)) +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.symbols.diff index 2a67afc00f..7edd8f8c65 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.symbols.diff @@ -5,16 +5,14 @@ x: typeof $; ->x : Symbol(A.x, Decl(app.ts, 2, 20)) -->$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(app.ts, 2, 20)) + >$ : Symbol($, Decl(index.d.ts, 0, 11)) } === /ref.d.ts === export interface $ { x } >$ : Symbol($, Decl(ref.d.ts, 0, 0)) ->x : Symbol($.x, Decl(ref.d.ts, 0, 20)) -- --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->x : Symbol(x, Decl(index.d.ts, 0, 16)) +>x : Symbol(x, Decl(ref.d.ts, 0, 20)) + + === /types/lib/index.d.ts === + declare let $: { x: number } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.types index fc061beb60..92fd9a940d 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.types @@ -7,10 +7,15 @@ import {$} from "./ref"; export interface A { x: typeof $; ->x : any ->$ : any +>x : { x: number; } +>$ : { x: number; } } === /ref.d.ts === export interface $ { x } >x : any +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : { x: number; } +>x : number + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.types.diff deleted file mode 100644 index 1e2ae4ef41..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.types.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.typeReferenceDirectives5.types -+++ new.typeReferenceDirectives5.types -@@= skipped -6, +6 lines =@@ - - export interface A { - x: typeof $; -->x : { x: number; } -->$ : { x: number; } -+>x : any -+>$ : any - } - === /ref.d.ts === - export interface $ { x } - >x : any -- --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : { x: number; } -->x : number diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.errors.txt deleted file mode 100644 index 99c2bb2a3a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -/app.ts(4,8): error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? - - -==== /app.ts (1 errors) ==== - /// - /// - - let x: $; - ~ -!!! error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? - let y = () => x - - -==== /ref.d.ts (0 errors) ==== - declare let $: { x: number } - -==== /types/lib/index.d.ts (0 errors) ==== - interface $ { x } - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.errors.txt.diff deleted file mode 100644 index 3c6c28362d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.typeReferenceDirectives6.errors.txt -+++ new.typeReferenceDirectives6.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/app.ts(4,8): error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? -+ -+ -+==== /app.ts (1 errors) ==== -+ /// -+ /// -+ -+ let x: $; -+ ~ -+!!! error TS2749: '$' refers to a value, but is being used as a type here. Did you mean 'typeof $'? -+ let y = () => x -+ -+ -+==== /ref.d.ts (0 errors) ==== -+ declare let $: { x: number } -+ -+==== /types/lib/index.d.ts (0 errors) ==== -+ interface $ { x } -+ -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.symbols index e00bbf6461..c86de53899 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.symbols @@ -6,7 +6,7 @@ let x: $; >x : Symbol(x, Decl(app.ts, 3, 3)) ->$ : Symbol($) +>$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) let y = () => x >y : Symbol(y, Decl(app.ts, 4, 3)) @@ -15,6 +15,12 @@ let y = () => x === /ref.d.ts === declare let $: { x: number } ->$ : Symbol($, Decl(ref.d.ts, 0, 11)) +>$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) >x : Symbol(x, Decl(ref.d.ts, 0, 16)) +=== /types/lib/index.d.ts === +interface $ { x } +>$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(index.d.ts, 0, 13)) + + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.symbols.diff index 5c5a6a4d2d..5046caa23d 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.symbols.diff @@ -1,25 +1,9 @@ --- old.typeReferenceDirectives6.symbols +++ new.typeReferenceDirectives6.symbols -@@= skipped -5, +5 lines =@@ - - let x: $; - >x : Symbol(x, Decl(app.ts, 3, 3)) -->$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) -+>$ : Symbol($) - - let y = () => x - >y : Symbol(y, Decl(app.ts, 4, 3)) -@@= skipped -9, +9 lines =@@ - - === /ref.d.ts === - declare let $: { x: number } -->$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) -+>$ : Symbol($, Decl(ref.d.ts, 0, 11)) - >x : Symbol(x, Decl(ref.d.ts, 0, 16)) - --=== /types/lib/index.d.ts === --interface $ { x } -->$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) +@@= skipped -20, +20 lines =@@ + === /types/lib/index.d.ts === + interface $ { x } + >$ : Symbol($, Decl(ref.d.ts, 0, 11), Decl(index.d.ts, 0, 0)) ->x : Symbol($.x, Decl(index.d.ts, 0, 13)) -- -- \ No newline at end of file ++>x : Symbol(x, Decl(index.d.ts, 0, 13)) + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.types index bec17d1861..67d32fb1d7 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.types @@ -18,3 +18,8 @@ declare let $: { x: number } >$ : { x: number; } >x : number +=== /types/lib/index.d.ts === +interface $ { x } +>x : any + + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.types.diff deleted file mode 100644 index 1c0a753e1b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.typeReferenceDirectives6.types -+++ new.typeReferenceDirectives6.types -@@= skipped -17, +17 lines =@@ - >$ : { x: number; } - >x : number - --=== /types/lib/index.d.ts === --interface $ { x } -->x : any -- -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.symbols index 2400d2d02d..cfaa572afc 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.symbols @@ -14,3 +14,9 @@ export let y = () => x >y : Symbol(y, Decl(app.ts, 5, 10)) >x : Symbol(x, Decl(app.ts, 4, 10)) +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) + + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.symbols.diff deleted file mode 100644 index d6cacc3659..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.symbols.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.typeReferenceDirectives7.symbols -+++ new.typeReferenceDirectives7.symbols -@@= skipped -13, +13 lines =@@ - >y : Symbol(y, Decl(app.ts, 5, 10)) - >x : Symbol(x, Decl(app.ts, 4, 10)) - --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->x : Symbol(x, Decl(index.d.ts, 0, 16)) -- -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.types index 5386d335c2..0973e13b07 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.types @@ -16,3 +16,9 @@ export let y = () => x >() => x : () => number >x : number +=== /types/lib/index.d.ts === +declare let $: { x: number } +>$ : { x: number; } +>x : number + + diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.types.diff deleted file mode 100644 index 13c0be7c1b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.types.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.typeReferenceDirectives7.types -+++ new.typeReferenceDirectives7.types -@@= skipped -15, +15 lines =@@ - >() => x : () => number - >x : number - --=== /types/lib/index.d.ts === --declare let $: { x: number } -->$ : { x: number; } -->x : number -- -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.errors.txt deleted file mode 100644 index 9ef3d7a2a8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -/mod1.ts(1,24): error TS2304: Cannot find name 'Lib'. - - -==== /mod2.ts (0 errors) ==== - import {foo} from "./mod1"; - export const bar = foo(); -==== /types/lib/index.d.ts (0 errors) ==== - interface Lib { x } - -==== /mod1.ts (1 errors) ==== - export function foo(): Lib { return {x: 1} } - ~~~ -!!! error TS2304: Cannot find name 'Lib'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.errors.txt.diff deleted file mode 100644 index 4b38bfb80b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.typeReferenceDirectives8.errors.txt -+++ new.typeReferenceDirectives8.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/mod1.ts(1,24): error TS2304: Cannot find name 'Lib'. -+ -+ -+==== /mod2.ts (0 errors) ==== -+ import {foo} from "./mod1"; -+ export const bar = foo(); -+==== /types/lib/index.d.ts (0 errors) ==== -+ interface Lib { x } -+ -+==== /mod1.ts (1 errors) ==== -+ export function foo(): Lib { return {x: 1} } -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.symbols index 676bc60e5b..e13f4c4984 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.symbols @@ -8,9 +8,14 @@ export const bar = foo(); >bar : Symbol(bar, Decl(mod2.ts, 1, 12)) >foo : Symbol(foo, Decl(mod2.ts, 0, 8)) +=== /types/lib/index.d.ts === +interface Lib { x } +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(index.d.ts, 0, 15)) + === /mod1.ts === export function foo(): Lib { return {x: 1} } >foo : Symbol(foo, Decl(mod1.ts, 0, 0)) ->Lib : Symbol(Lib) +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) >x : Symbol(x, Decl(mod1.ts, 0, 37)) diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.symbols.diff index e5c7b5ef46..99e5353c91 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.symbols.diff @@ -1,17 +1,11 @@ --- old.typeReferenceDirectives8.symbols +++ new.typeReferenceDirectives8.symbols -@@= skipped -7, +7 lines =@@ - >bar : Symbol(bar, Decl(mod2.ts, 1, 12)) - >foo : Symbol(foo, Decl(mod2.ts, 0, 8)) - --=== /types/lib/index.d.ts === --interface Lib { x } -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +@@= skipped -10, +10 lines =@@ + === /types/lib/index.d.ts === + interface Lib { x } + >Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) ->x : Symbol(Lib.x, Decl(index.d.ts, 0, 15)) -- ++>x : Symbol(x, Decl(index.d.ts, 0, 15)) + === /mod1.ts === - export function foo(): Lib { return {x: 1} } - >foo : Symbol(foo, Decl(mod1.ts, 0, 0)) -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) -+>Lib : Symbol(Lib) - >x : Symbol(x, Decl(mod1.ts, 0, 37)) + export function foo(): Lib { return {x: 1} } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.types index b378ace317..ab17a776f6 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.types @@ -9,6 +9,10 @@ export const bar = foo(); >foo() : Lib >foo : () => Lib +=== /types/lib/index.d.ts === +interface Lib { x } +>x : any + === /mod1.ts === export function foo(): Lib { return {x: 1} } >foo : () => Lib diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.types.diff deleted file mode 100644 index d507b8d129..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives8.types.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.typeReferenceDirectives8.types -+++ new.typeReferenceDirectives8.types -@@= skipped -8, +8 lines =@@ - >foo() : Lib - >foo : () => Lib - --=== /types/lib/index.d.ts === --interface Lib { x } -->x : any -- - === /mod1.ts === - export function foo(): Lib { return {x: 1} } - >foo : () => Lib \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.errors.txt b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.errors.txt deleted file mode 100644 index 04c0023f50..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.errors.txt +++ /dev/null @@ -1,38 +0,0 @@ -/mod1.ts(8,16): error TS2304: Cannot find name 'Lib'. -/mod1.ts(11,25): error TS2304: Cannot find name 'Lib'. - - -==== /mod2.ts (0 errors) ==== - import { Cls } from "./main"; - import "./mod1"; - - export const cls = Cls; - export const foo = new Cls().foo(); - export const bar = Cls.bar(); -==== /types/lib/index.d.ts (0 errors) ==== - interface Lib { x } - -==== /main.ts (0 errors) ==== - export class Cls { - x - } - -==== /mod1.ts (2 errors) ==== - /// - - import {Cls} from "./main"; - Cls.prototype.foo = function() { return undefined; } - - declare module "./main" { - interface Cls { - foo(): Lib; - ~~~ -!!! error TS2304: Cannot find name 'Lib'. - } - namespace Cls { - function bar(): Lib; - ~~~ -!!! error TS2304: Cannot find name 'Lib'. - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.errors.txt.diff deleted file mode 100644 index 8d2050d135..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.errors.txt.diff +++ /dev/null @@ -1,42 +0,0 @@ ---- old.typeReferenceDirectives9.errors.txt -+++ new.typeReferenceDirectives9.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/mod1.ts(8,16): error TS2304: Cannot find name 'Lib'. -+/mod1.ts(11,25): error TS2304: Cannot find name 'Lib'. -+ -+ -+==== /mod2.ts (0 errors) ==== -+ import { Cls } from "./main"; -+ import "./mod1"; -+ -+ export const cls = Cls; -+ export const foo = new Cls().foo(); -+ export const bar = Cls.bar(); -+==== /types/lib/index.d.ts (0 errors) ==== -+ interface Lib { x } -+ -+==== /main.ts (0 errors) ==== -+ export class Cls { -+ x -+ } -+ -+==== /mod1.ts (2 errors) ==== -+ /// -+ -+ import {Cls} from "./main"; -+ Cls.prototype.foo = function() { return undefined; } -+ -+ declare module "./main" { -+ interface Cls { -+ foo(): Lib; -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. -+ } -+ namespace Cls { -+ function bar(): Lib; -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. -+ } -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.symbols b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.symbols index 064a7258ce..a5af277e60 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.symbols @@ -22,6 +22,11 @@ export const bar = Cls.bar(); >Cls : Symbol(Cls, Decl(mod2.ts, 0, 8)) >bar : Symbol(bar, Decl(mod1.ts, 9, 19)) +=== /types/lib/index.d.ts === +interface Lib { x } +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(index.d.ts, 0, 15)) + === /main.ts === export class Cls { >Cls : Symbol(Cls, Decl(main.ts, 0, 0), Decl(mod1.ts, 5, 25), Decl(mod1.ts, 8, 5)) @@ -52,14 +57,14 @@ declare module "./main" { foo(): Lib; >foo : Symbol(foo, Decl(mod1.ts, 6, 19)) ->Lib : Symbol(Lib) +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) } namespace Cls { >Cls : Symbol(Cls, Decl(main.ts, 0, 0), Decl(mod1.ts, 5, 25), Decl(mod1.ts, 8, 5)) function bar(): Lib; >bar : Symbol(bar, Decl(mod1.ts, 9, 19)) ->Lib : Symbol(Lib) +>Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) } } diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.symbols.diff index d97f3adfce..c7fb9d256d 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.symbols.diff @@ -16,13 +16,14 @@ +>Cls.bar : Symbol(bar, Decl(mod1.ts, 9, 19)) >Cls : Symbol(Cls, Decl(mod2.ts, 0, 8)) ->bar : Symbol(Cls.bar, Decl(mod1.ts, 9, 19)) -- --=== /types/lib/index.d.ts === --interface Lib { x } -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) -->x : Symbol(Lib.x, Decl(index.d.ts, 0, 15)) +>bar : Symbol(bar, Decl(mod1.ts, 9, 19)) + === /types/lib/index.d.ts === + interface Lib { x } + >Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +->x : Symbol(Lib.x, Decl(index.d.ts, 0, 15)) ++>x : Symbol(x, Decl(index.d.ts, 0, 15)) + === /main.ts === export class Cls { >Cls : Symbol(Cls, Decl(main.ts, 0, 0), Decl(mod1.ts, 5, 25), Decl(mod1.ts, 8, 5)) @@ -33,7 +34,7 @@ } === /mod1.ts === -@@= skipped -30, +25 lines =@@ +@@= skipped -30, +30 lines =@@ >Cls : Symbol(Cls, Decl(mod1.ts, 2, 8)) Cls.prototype.foo = function() { return undefined; } @@ -54,16 +55,7 @@ foo(): Lib; ->foo : Symbol(Cls.foo, Decl(mod1.ts, 6, 19)) -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) +>foo : Symbol(foo, Decl(mod1.ts, 6, 19)) -+>Lib : Symbol(Lib) + >Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) } - namespace Cls { - >Cls : Symbol(Cls, Decl(main.ts, 0, 0), Decl(mod1.ts, 5, 25), Decl(mod1.ts, 8, 5)) - - function bar(): Lib; - >bar : Symbol(bar, Decl(mod1.ts, 9, 19)) -->Lib : Symbol(Lib, Decl(index.d.ts, 0, 0)) -+>Lib : Symbol(Lib) - } - } + namespace Cls { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.types b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.types index b96faa4df3..c9d5a4c311 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.types +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.types @@ -25,6 +25,10 @@ export const bar = Cls.bar(); >Cls : typeof Cls >bar : () => Lib +=== /types/lib/index.d.ts === +interface Lib { x } +>x : any + === /main.ts === export class Cls { >Cls : Cls diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.types.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.types.diff index cba34d71c6..e8eecd5d43 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.types.diff +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.types.diff @@ -1,17 +1,6 @@ --- old.typeReferenceDirectives9.types +++ new.typeReferenceDirectives9.types -@@= skipped -24, +24 lines =@@ - >Cls : typeof Cls - >bar : () => Lib - --=== /types/lib/index.d.ts === --interface Lib { x } -->x : any -- - === /main.ts === - export class Cls { - >Cls : Cls -@@= skipped -29, +25 lines =@@ +@@= skipped -53, +53 lines =@@ >undefined : undefined declare module "./main" { diff --git a/testdata/baselines/reference/submodule/conformance/customConditions(resolvepackagejsonexports=true).types b/testdata/baselines/reference/submodule/conformance/customConditions(resolvepackagejsonexports=true).types index 331871f2d1..7b6d218b81 100644 --- a/testdata/baselines/reference/submodule/conformance/customConditions(resolvepackagejsonexports=true).types +++ b/testdata/baselines/reference/submodule/conformance/customConditions(resolvepackagejsonexports=true).types @@ -23,5 +23,5 @@ export = _; === /index.ts === import _ from "lodash"; ->_ : "index" +>_ : "webpack" diff --git a/testdata/baselines/reference/submodule/conformance/customConditions(resolvepackagejsonexports=true).types.diff b/testdata/baselines/reference/submodule/conformance/customConditions(resolvepackagejsonexports=true).types.diff deleted file mode 100644 index 3f34ff7f66..0000000000 --- a/testdata/baselines/reference/submodule/conformance/customConditions(resolvepackagejsonexports=true).types.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.customConditions(resolvepackagejsonexports=true).types -+++ new.customConditions(resolvepackagejsonexports=true).types -@@= skipped -22, +22 lines =@@ - - === /index.ts === - import _ from "lodash"; -->_ : "webpack" -+>_ : "index" diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-1.errors.txt b/testdata/baselines/reference/submodule/conformance/library-reference-1.errors.txt deleted file mode 100644 index 1a88f12b93..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-1.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -/src/consumer.ts(2,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - -==== /src/consumer.ts (1 errors) ==== - /// - $.foo(); - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - -==== /src/types/jquery/index.d.ts (0 errors) ==== - declare var $: { foo(): void }; - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/library-reference-1.errors.txt.diff deleted file mode 100644 index ef11f5e6d7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-1.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.library-reference-1.errors.txt -+++ new.library-reference-1.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/src/consumer.ts(2,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+ -+==== /src/consumer.ts (1 errors) ==== -+ /// -+ $.foo(); -+ ~ -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+==== /src/types/jquery/index.d.ts (0 errors) ==== -+ declare var $: { foo(): void }; -+ -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-1.symbols b/testdata/baselines/reference/submodule/conformance/library-reference-1.symbols index e3250b43ec..90c61303de 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-1.symbols +++ b/testdata/baselines/reference/submodule/conformance/library-reference-1.symbols @@ -1,7 +1,15 @@ //// [tests/cases/conformance/references/library-reference-1.ts] //// === /src/consumer.ts === - /// $.foo(); +>$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) + +=== /src/types/jquery/index.d.ts === +declare var $: { foo(): void }; +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-1.symbols.diff b/testdata/baselines/reference/submodule/conformance/library-reference-1.symbols.diff deleted file mode 100644 index 01f32caf4b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-1.symbols.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.library-reference-1.symbols -+++ new.library-reference-1.symbols -@@= skipped -0, +0 lines =@@ - //// [tests/cases/conformance/references/library-reference-1.ts] //// - - === /src/consumer.ts === -+ - /// - $.foo(); -->$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -- --=== /src/types/jquery/index.d.ts === --declare var $: { foo(): void }; -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -- diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-1.types b/testdata/baselines/reference/submodule/conformance/library-reference-1.types index dec6001f16..49ae6f7c8b 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-1.types +++ b/testdata/baselines/reference/submodule/conformance/library-reference-1.types @@ -3,8 +3,14 @@ === /src/consumer.ts === /// $.foo(); ->$.foo() : any ->$.foo : any ->$ : any ->foo : any +>$.foo() : void +>$.foo : () => void +>$ : { foo(): void; } +>foo : () => void + +=== /src/types/jquery/index.d.ts === +declare var $: { foo(): void }; +>$ : { foo(): void; } +>foo : () => void + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-1.types.diff b/testdata/baselines/reference/submodule/conformance/library-reference-1.types.diff deleted file mode 100644 index e869a8e5ca..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-1.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.library-reference-1.types -+++ new.library-reference-1.types -@@= skipped -2, +2 lines =@@ - === /src/consumer.ts === - /// - $.foo(); -->$.foo() : void -->$.foo : () => void -->$ : { foo(): void; } -->foo : () => void -- --=== /src/types/jquery/index.d.ts === --declare var $: { foo(): void }; -->$ : { foo(): void; } -->foo : () => void -- -+>$.foo() : any -+>$.foo : any -+>$ : any -+>foo : any diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-10.errors.txt b/testdata/baselines/reference/submodule/conformance/library-reference-10.errors.txt deleted file mode 100644 index b18155d217..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-10.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -/foo/consumer.ts(2,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - -==== /foo/consumer.ts (1 errors) ==== - /// - $.foo(); - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - -==== /foo/types/jquery/package.json (0 errors) ==== - { - "typings": "jquery.d.ts" - } - -==== /foo/types/jquery/jquery.d.ts (0 errors) ==== - declare var $: { foo(): void }; - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-10.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/library-reference-10.errors.txt.diff deleted file mode 100644 index c3da871e54..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-10.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.library-reference-10.errors.txt -+++ new.library-reference-10.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/foo/consumer.ts(2,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+ -+==== /foo/consumer.ts (1 errors) ==== -+ /// -+ $.foo(); -+ ~ -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+==== /foo/types/jquery/package.json (0 errors) ==== -+ { -+ "typings": "jquery.d.ts" -+ } -+ -+==== /foo/types/jquery/jquery.d.ts (0 errors) ==== -+ declare var $: { foo(): void }; -+ -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-10.symbols b/testdata/baselines/reference/submodule/conformance/library-reference-10.symbols index b991869b24..30774d4b5d 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-10.symbols +++ b/testdata/baselines/reference/submodule/conformance/library-reference-10.symbols @@ -1,7 +1,15 @@ //// [tests/cases/conformance/references/library-reference-10.ts] //// === /foo/consumer.ts === - /// $.foo(); +>$.foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) +>$ : Symbol($, Decl(jquery.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) + +=== /foo/types/jquery/jquery.d.ts === +declare var $: { foo(): void }; +>$ : Symbol($, Decl(jquery.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-10.symbols.diff b/testdata/baselines/reference/submodule/conformance/library-reference-10.symbols.diff deleted file mode 100644 index 618f8db6d3..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-10.symbols.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.library-reference-10.symbols -+++ new.library-reference-10.symbols -@@= skipped -0, +0 lines =@@ - //// [tests/cases/conformance/references/library-reference-10.ts] //// - - === /foo/consumer.ts === -+ - /// - $.foo(); -->$.foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) -->$ : Symbol($, Decl(jquery.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) -- --=== /foo/types/jquery/jquery.d.ts === --declare var $: { foo(): void }; -->$ : Symbol($, Decl(jquery.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) -- diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-10.types b/testdata/baselines/reference/submodule/conformance/library-reference-10.types index 0f26465234..de72531409 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-10.types +++ b/testdata/baselines/reference/submodule/conformance/library-reference-10.types @@ -3,8 +3,14 @@ === /foo/consumer.ts === /// $.foo(); ->$.foo() : any ->$.foo : any ->$ : any ->foo : any +>$.foo() : void +>$.foo : () => void +>$ : { foo(): void; } +>foo : () => void + +=== /foo/types/jquery/jquery.d.ts === +declare var $: { foo(): void }; +>$ : { foo(): void; } +>foo : () => void + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-10.types.diff b/testdata/baselines/reference/submodule/conformance/library-reference-10.types.diff deleted file mode 100644 index 3e7514ad58..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-10.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.library-reference-10.types -+++ new.library-reference-10.types -@@= skipped -2, +2 lines =@@ - === /foo/consumer.ts === - /// - $.foo(); -->$.foo() : void -->$.foo : () => void -->$ : { foo(): void; } -->foo : () => void -- --=== /foo/types/jquery/jquery.d.ts === --declare var $: { foo(): void }; -->$ : { foo(): void; } -->foo : () => void -- -+>$.foo() : any -+>$.foo : any -+>$ : any -+>foo : any diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-14.errors.txt b/testdata/baselines/reference/submodule/conformance/library-reference-14.errors.txt deleted file mode 100644 index 8cab648f59..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-14.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -/a/b/consumer.ts(1,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - -==== /a/b/consumer.ts (1 errors) ==== - $.foo(); - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - -==== /a/types/jquery/index.d.ts (0 errors) ==== - declare var $: { foo(): void }; - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-14.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/library-reference-14.errors.txt.diff deleted file mode 100644 index 1413187b2c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-14.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.library-reference-14.errors.txt -+++ new.library-reference-14.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/a/b/consumer.ts(1,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+ -+==== /a/b/consumer.ts (1 errors) ==== -+ $.foo(); -+ ~ -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+==== /a/types/jquery/index.d.ts (0 errors) ==== -+ declare var $: { foo(): void }; -+ -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-14.symbols b/testdata/baselines/reference/submodule/conformance/library-reference-14.symbols index d7273da6f8..7e37c5d90d 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-14.symbols +++ b/testdata/baselines/reference/submodule/conformance/library-reference-14.symbols @@ -1,6 +1,14 @@ //// [tests/cases/conformance/references/library-reference-14.ts] //// === /a/b/consumer.ts === - $.foo(); +>$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) + +=== /a/types/jquery/index.d.ts === +declare var $: { foo(): void }; +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-14.symbols.diff b/testdata/baselines/reference/submodule/conformance/library-reference-14.symbols.diff deleted file mode 100644 index 960e7af162..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-14.symbols.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.library-reference-14.symbols -+++ new.library-reference-14.symbols -@@= skipped -0, +0 lines =@@ - //// [tests/cases/conformance/references/library-reference-14.ts] //// - - === /a/b/consumer.ts === -+ - $.foo(); -->$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -- --=== /a/types/jquery/index.d.ts === --declare var $: { foo(): void }; -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -- diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-14.types b/testdata/baselines/reference/submodule/conformance/library-reference-14.types index 775752a521..53c1f84d6e 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-14.types +++ b/testdata/baselines/reference/submodule/conformance/library-reference-14.types @@ -2,8 +2,14 @@ === /a/b/consumer.ts === $.foo(); ->$.foo() : any ->$.foo : any ->$ : any ->foo : any +>$.foo() : void +>$.foo : () => void +>$ : { foo(): void; } +>foo : () => void + +=== /a/types/jquery/index.d.ts === +declare var $: { foo(): void }; +>$ : { foo(): void; } +>foo : () => void + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-14.types.diff b/testdata/baselines/reference/submodule/conformance/library-reference-14.types.diff deleted file mode 100644 index d98f823b18..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-14.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.library-reference-14.types -+++ new.library-reference-14.types -@@= skipped -1, +1 lines =@@ - - === /a/b/consumer.ts === - $.foo(); -->$.foo() : void -->$.foo : () => void -->$ : { foo(): void; } -->foo : () => void -- --=== /a/types/jquery/index.d.ts === --declare var $: { foo(): void }; -->$ : { foo(): void; } -->foo : () => void -- -+>$.foo() : any -+>$.foo : any -+>$ : any -+>foo : any diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-15.errors.txt b/testdata/baselines/reference/submodule/conformance/library-reference-15.errors.txt index 208c4e0083..f4cee66d1a 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-15.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/library-reference-15.errors.txt @@ -1,11 +1,8 @@ -/a/b/consumer.ts(1,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. /a/b/consumer.ts(2,1): error TS2304: Cannot find name '$2'. -==== /a/b/consumer.ts (2 errors) ==== +==== /a/b/consumer.ts (1 errors) ==== $.foo(); // should OK - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. $2.foo(); // should error ~~ !!! error TS2304: Cannot find name '$2'. diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-15.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/library-reference-15.errors.txt.diff deleted file mode 100644 index f2b5355de6..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-15.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.library-reference-15.errors.txt -+++ new.library-reference-15.errors.txt -@@= skipped -0, +0 lines =@@ -+/a/b/consumer.ts(1,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - /a/b/consumer.ts(2,1): error TS2304: Cannot find name '$2'. - - --==== /a/b/consumer.ts (1 errors) ==== -+==== /a/b/consumer.ts (2 errors) ==== - $.foo(); // should OK -+ ~ -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - $2.foo(); // should error - ~~ - !!! error TS2304: Cannot find name '$2'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-15.symbols b/testdata/baselines/reference/submodule/conformance/library-reference-15.symbols index cf8ca8008e..bae2099e7e 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-15.symbols +++ b/testdata/baselines/reference/submodule/conformance/library-reference-15.symbols @@ -1,6 +1,14 @@ //// [tests/cases/conformance/references/library-reference-15.ts] //// === /a/b/consumer.ts === - $.foo(); // should OK +>$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) + $2.foo(); // should error +=== /a/types/jquery/index.d.ts === +declare var $: { foo(): void }; +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(index.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-15.symbols.diff b/testdata/baselines/reference/submodule/conformance/library-reference-15.symbols.diff deleted file mode 100644 index 50977549c3..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-15.symbols.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.library-reference-15.symbols -+++ new.library-reference-15.symbols -@@= skipped -0, +0 lines =@@ - //// [tests/cases/conformance/references/library-reference-15.ts] //// - - === /a/b/consumer.ts === -+ - $.foo(); // should OK -->$.foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -- - $2.foo(); // should error --=== /a/types/jquery/index.d.ts === --declare var $: { foo(): void }; -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(index.d.ts, 0, 16)) -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-15.types b/testdata/baselines/reference/submodule/conformance/library-reference-15.types index 9f0713e6d6..d7cde7013e 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-15.types +++ b/testdata/baselines/reference/submodule/conformance/library-reference-15.types @@ -2,10 +2,10 @@ === /a/b/consumer.ts === $.foo(); // should OK ->$.foo() : any ->$.foo : any ->$ : any ->foo : any +>$.foo() : void +>$.foo : () => void +>$ : { foo(): void; } +>foo : () => void $2.foo(); // should error >$2.foo() : any @@ -13,3 +13,8 @@ $2.foo(); // should error >$2 : any >foo : any +=== /a/types/jquery/index.d.ts === +declare var $: { foo(): void }; +>$ : { foo(): void; } +>foo : () => void + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-15.types.diff b/testdata/baselines/reference/submodule/conformance/library-reference-15.types.diff deleted file mode 100644 index 7202052222..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-15.types.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.library-reference-15.types -+++ new.library-reference-15.types -@@= skipped -1, +1 lines =@@ - - === /a/b/consumer.ts === - $.foo(); // should OK -->$.foo() : void -->$.foo : () => void -->$ : { foo(): void; } -->foo : () => void -+>$.foo() : any -+>$.foo : any -+>$ : any -+>foo : any - - $2.foo(); // should error - >$2.foo() : any - >$2.foo : any - >$2 : any - >foo : any -- --=== /a/types/jquery/index.d.ts === --declare var $: { foo(): void }; -->$ : { foo(): void; } -->foo : () => void diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-2.errors.txt b/testdata/baselines/reference/submodule/conformance/library-reference-2.errors.txt deleted file mode 100644 index 5a58fb3cb4..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-2.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -/consumer.ts(2,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - -==== /consumer.ts (1 errors) ==== - /// - $.foo(); - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - -==== /types/jquery/package.json (0 errors) ==== - { - "types": "jquery.d.ts" - } - -==== /types/jquery/jquery.d.ts (0 errors) ==== - declare var $: { foo(): void }; - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/library-reference-2.errors.txt.diff deleted file mode 100644 index 57ac7d450c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-2.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.library-reference-2.errors.txt -+++ new.library-reference-2.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/consumer.ts(2,1): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+ -+==== /consumer.ts (1 errors) ==== -+ /// -+ $.foo(); -+ ~ -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+ -+==== /types/jquery/package.json (0 errors) ==== -+ { -+ "types": "jquery.d.ts" -+ } -+ -+==== /types/jquery/jquery.d.ts (0 errors) ==== -+ declare var $: { foo(): void }; -+ -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-2.symbols b/testdata/baselines/reference/submodule/conformance/library-reference-2.symbols index e80ae989e9..d0a30e072a 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-2.symbols +++ b/testdata/baselines/reference/submodule/conformance/library-reference-2.symbols @@ -1,7 +1,15 @@ //// [tests/cases/conformance/references/library-reference-2.ts] //// === /consumer.ts === - /// $.foo(); +>$.foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) +>$ : Symbol($, Decl(jquery.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) + +=== /types/jquery/jquery.d.ts === +declare var $: { foo(): void }; +>$ : Symbol($, Decl(jquery.d.ts, 0, 11)) +>foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-2.symbols.diff b/testdata/baselines/reference/submodule/conformance/library-reference-2.symbols.diff deleted file mode 100644 index 542453e2b7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-2.symbols.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.library-reference-2.symbols -+++ new.library-reference-2.symbols -@@= skipped -0, +0 lines =@@ - //// [tests/cases/conformance/references/library-reference-2.ts] //// - - === /consumer.ts === -+ - /// - $.foo(); -->$.foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) -->$ : Symbol($, Decl(jquery.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) -- --=== /types/jquery/jquery.d.ts === --declare var $: { foo(): void }; -->$ : Symbol($, Decl(jquery.d.ts, 0, 11)) -->foo : Symbol(foo, Decl(jquery.d.ts, 0, 16)) -- diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-2.types b/testdata/baselines/reference/submodule/conformance/library-reference-2.types index 38ff31b8a0..b4e5090c21 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-2.types +++ b/testdata/baselines/reference/submodule/conformance/library-reference-2.types @@ -3,8 +3,14 @@ === /consumer.ts === /// $.foo(); ->$.foo() : any ->$.foo : any ->$ : any ->foo : any +>$.foo() : void +>$.foo : () => void +>$ : { foo(): void; } +>foo : () => void + +=== /types/jquery/jquery.d.ts === +declare var $: { foo(): void }; +>$ : { foo(): void; } +>foo : () => void + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-2.types.diff b/testdata/baselines/reference/submodule/conformance/library-reference-2.types.diff deleted file mode 100644 index 9515641b80..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-2.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.library-reference-2.types -+++ new.library-reference-2.types -@@= skipped -2, +2 lines =@@ - === /consumer.ts === - /// - $.foo(); -->$.foo() : void -->$.foo : () => void -->$ : { foo(): void; } -->foo : () => void -- --=== /types/jquery/jquery.d.ts === --declare var $: { foo(): void }; -->$ : { foo(): void; } -->foo : () => void -- -+>$.foo() : any -+>$.foo : any -+>$ : any -+>foo : any diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-8.errors.txt b/testdata/baselines/reference/submodule/conformance/library-reference-8.errors.txt deleted file mode 100644 index 80800636b1..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-8.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -/test/foo.ts(3,17): error TS2304: Cannot find name 'alpha'. -/test/foo.ts(3,27): error TS2304: Cannot find name 'beta'. - - -==== /test/foo.ts (2 errors) ==== - /// - /// - var x: string = alpha.a + beta.b; - ~~~~~ -!!! error TS2304: Cannot find name 'alpha'. - ~~~~ -!!! error TS2304: Cannot find name 'beta'. - - -==== /test/types/alpha/index.d.ts (0 errors) ==== - /// - declare var alpha: { a: string }; - -==== /test/types/beta/index.d.ts (0 errors) ==== - /// - declare var beta: { b: string }; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-8.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/library-reference-8.errors.txt.diff deleted file mode 100644 index 184362edc7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-8.errors.txt.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.library-reference-8.errors.txt -+++ new.library-reference-8.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/test/foo.ts(3,17): error TS2304: Cannot find name 'alpha'. -+/test/foo.ts(3,27): error TS2304: Cannot find name 'beta'. -+ -+ -+==== /test/foo.ts (2 errors) ==== -+ /// -+ /// -+ var x: string = alpha.a + beta.b; -+ ~~~~~ -+!!! error TS2304: Cannot find name 'alpha'. -+ ~~~~ -+!!! error TS2304: Cannot find name 'beta'. -+ -+ -+==== /test/types/alpha/index.d.ts (0 errors) ==== -+ /// -+ declare var alpha: { a: string }; -+ -+==== /test/types/beta/index.d.ts (0 errors) ==== -+ /// -+ declare var beta: { b: string }; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-8.symbols b/testdata/baselines/reference/submodule/conformance/library-reference-8.symbols index 079b504146..dd0c838f77 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-8.symbols +++ b/testdata/baselines/reference/submodule/conformance/library-reference-8.symbols @@ -5,5 +5,23 @@ /// var x: string = alpha.a + beta.b; >x : Symbol(x, Decl(foo.ts, 2, 3)) +>alpha.a : Symbol(a, Decl(index.d.ts, 1, 20)) +>alpha : Symbol(alpha, Decl(index.d.ts, 1, 11)) +>a : Symbol(a, Decl(index.d.ts, 1, 20)) +>beta.b : Symbol(b, Decl(index.d.ts, 1, 19)) +>beta : Symbol(beta, Decl(index.d.ts, 1, 11)) +>b : Symbol(b, Decl(index.d.ts, 1, 19)) +=== /test/types/alpha/index.d.ts === +/// +declare var alpha: { a: string }; +>alpha : Symbol(alpha, Decl(index.d.ts, 1, 11)) +>a : Symbol(a, Decl(index.d.ts, 1, 20)) + +=== /test/types/beta/index.d.ts === +/// +declare var beta: { b: string }; +>beta : Symbol(beta, Decl(index.d.ts, 1, 11)) +>b : Symbol(b, Decl(index.d.ts, 1, 19)) + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-8.symbols.diff b/testdata/baselines/reference/submodule/conformance/library-reference-8.symbols.diff deleted file mode 100644 index 7d604c34ac..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-8.symbols.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.library-reference-8.symbols -+++ new.library-reference-8.symbols -@@= skipped -4, +4 lines =@@ - /// - var x: string = alpha.a + beta.b; - >x : Symbol(x, Decl(foo.ts, 2, 3)) -->alpha.a : Symbol(a, Decl(index.d.ts, 1, 20)) -->alpha : Symbol(alpha, Decl(index.d.ts, 1, 11)) -->a : Symbol(a, Decl(index.d.ts, 1, 20)) -->beta.b : Symbol(b, Decl(index.d.ts, 1, 19)) -->beta : Symbol(beta, Decl(index.d.ts, 1, 11)) -->b : Symbol(b, Decl(index.d.ts, 1, 19)) -- -- --=== /test/types/alpha/index.d.ts === --/// --declare var alpha: { a: string }; -->alpha : Symbol(alpha, Decl(index.d.ts, 1, 11)) -->a : Symbol(a, Decl(index.d.ts, 1, 20)) -- --=== /test/types/beta/index.d.ts === --/// --declare var beta: { b: string }; -->beta : Symbol(beta, Decl(index.d.ts, 1, 11)) -->b : Symbol(b, Decl(index.d.ts, 1, 19)) -+ diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-8.types b/testdata/baselines/reference/submodule/conformance/library-reference-8.types index 429ee7e2c6..254c24d81f 100644 --- a/testdata/baselines/reference/submodule/conformance/library-reference-8.types +++ b/testdata/baselines/reference/submodule/conformance/library-reference-8.types @@ -5,12 +5,24 @@ /// var x: string = alpha.a + beta.b; >x : string ->alpha.a + beta.b : any ->alpha.a : any ->alpha : any ->a : any ->beta.b : any ->beta : any ->b : any +>alpha.a + beta.b : string +>alpha.a : string +>alpha : { a: string; } +>a : string +>beta.b : string +>beta : { b: string; } +>b : string +=== /test/types/alpha/index.d.ts === +/// +declare var alpha: { a: string }; +>alpha : { a: string; } +>a : string + +=== /test/types/beta/index.d.ts === +/// +declare var beta: { b: string }; +>beta : { b: string; } +>b : string + diff --git a/testdata/baselines/reference/submodule/conformance/library-reference-8.types.diff b/testdata/baselines/reference/submodule/conformance/library-reference-8.types.diff deleted file mode 100644 index 3f99beefde..0000000000 --- a/testdata/baselines/reference/submodule/conformance/library-reference-8.types.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.library-reference-8.types -+++ new.library-reference-8.types -@@= skipped -4, +4 lines =@@ - /// - var x: string = alpha.a + beta.b; - >x : string -->alpha.a + beta.b : string -->alpha.a : string -->alpha : { a: string; } -->a : string -->beta.b : string -->beta : { b: string; } -->b : string -- -- --=== /test/types/alpha/index.d.ts === --/// --declare var alpha: { a: string }; -->alpha : { a: string; } -->a : string -- --=== /test/types/beta/index.d.ts === --/// --declare var beta: { b: string }; -->beta : { b: string; } -->b : string -+>alpha.a + beta.b : any -+>alpha.a : any -+>alpha : any -+>a : any -+>beta.b : any -+>beta : any -+>b : any -+ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives11.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives11.errors.txt.diff index bf4ed6ceb9..e459e50393 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives11.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives11.errors.txt.diff @@ -5,19 +5,19 @@ - - +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(); -@@= skipped -9, +11 lines =@@ +@@= skipped -7, +8 lines =@@ + ==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } - ==== /mod1.ts (1 errors) ==== +-==== /mod1.ts (1 errors) ==== ++==== /mod1.ts (0 errors) ==== export function foo(): Lib { return {x: 1} } - ~~~ -!!! error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives12.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives12.errors.txt.diff index 604f29ddb4..2494304a93 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives12.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/typeReferenceDirectives12.errors.txt.diff @@ -5,15 +5,13 @@ - - +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"; -@@= skipped -11, +14 lines =@@ +@@= skipped -11, +12 lines =@@ ==== /types/lib/index.d.ts (0 errors) ==== interface Lib { x } @@ -24,23 +22,4 @@ -!!! error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. x } - --==== /mod1.ts (0 errors) ==== -+==== /mod1.ts (2 errors) ==== - /// - - import {Cls} from "./main"; -@@= skipped -16, +14 lines =@@ - declare module "./main" { - interface Cls { - foo(): Lib; -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. - } - namespace Cls { - function bar(): Lib; -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. - } - } \ No newline at end of file