>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
->ReactNode : Symbol(ReactNode, Decl(index.d.ts, 6, 25))
+>ReactNode : Symbol(ReactNode, Decl(index.d.ts, 3, 25))
| boolean
| null
| undefined;
type JSXElementConstructor = (props: P) => ReactNode;
->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16))
->P : Symbol(P, Decl(index.d.ts, 15, 29))
->props : Symbol(props, Decl(index.d.ts, 15, 35))
->P : Symbol(P, Decl(index.d.ts, 15, 29))
->ReactNode : Symbol(ReactNode, Decl(index.d.ts, 6, 25))
+>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16))
+>P : Symbol(P, Decl(index.d.ts, 12, 29))
+>props : Symbol(props, Decl(index.d.ts, 12, 35))
+>P : Symbol(P, Decl(index.d.ts, 12, 29))
+>ReactNode : Symbol(ReactNode, Decl(index.d.ts, 3, 25))
interface ReactElement<
->ReactElement : Symbol(ReactElement, Decl(index.d.ts, 15, 58))
+>ReactElement : Symbol(ReactElement, Decl(index.d.ts, 12, 58))
P = any,
->P : Symbol(P, Decl(index.d.ts, 16, 25))
+>P : Symbol(P, Decl(index.d.ts, 13, 25))
T extends string | JSXElementConstructor =
->T : Symbol(T, Decl(index.d.ts, 17, 12))
->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16))
+>T : Symbol(T, Decl(index.d.ts, 14, 12))
+>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16))
| string
| JSXElementConstructor,
->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16))
+>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16))
> {
type: T;
->type : Symbol(ReactElement.type, Decl(index.d.ts, 21, 5))
->T : Symbol(T, Decl(index.d.ts, 17, 12))
+>type : Symbol(ReactElement.type, Decl(index.d.ts, 18, 5))
+>T : Symbol(T, Decl(index.d.ts, 14, 12))
props: P;
->props : Symbol(ReactElement.props, Decl(index.d.ts, 22, 12))
->P : Symbol(P, Decl(index.d.ts, 16, 25))
+>props : Symbol(ReactElement.props, Decl(index.d.ts, 19, 12))
+>P : Symbol(P, Decl(index.d.ts, 13, 25))
key: string | null;
->key : Symbol(ReactElement.key, Decl(index.d.ts, 23, 13))
+>key : Symbol(ReactElement.key, Decl(index.d.ts, 20, 13))
}
type ComponentProps> =
->ComponentProps : Symbol(ComponentProps, Decl(index.d.ts, 25, 3))
->T : Symbol(T, Decl(index.d.ts, 27, 22))
->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16))
+>ComponentProps : Symbol(ComponentProps, Decl(index.d.ts, 22, 3))
+>T : Symbol(T, Decl(index.d.ts, 24, 22))
+>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16))
T extends JSXElementConstructor ? P : never;
->T : Symbol(T, Decl(index.d.ts, 27, 22))
->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16))
->P : Symbol(P, Decl(index.d.ts, 28, 41))
->P : Symbol(P, Decl(index.d.ts, 28, 41))
+>T : Symbol(T, Decl(index.d.ts, 24, 22))
+>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16))
+>P : Symbol(P, Decl(index.d.ts, 25, 41))
+>P : Symbol(P, Decl(index.d.ts, 25, 41))
interface ExoticComponent {
->ExoticComponent : Symbol(ExoticComponent, Decl(index.d.ts, 28, 57))
->P : Symbol(P, Decl(index.d.ts, 30, 28))
+>ExoticComponent : Symbol(ExoticComponent, Decl(index.d.ts, 25, 57))
+>P : Symbol(P, Decl(index.d.ts, 27, 28))
(props: P): ReactNode;
->props : Symbol(props, Decl(index.d.ts, 31, 5))
->P : Symbol(P, Decl(index.d.ts, 30, 28))
->ReactNode : Symbol(ReactNode, Decl(index.d.ts, 6, 25))
+>props : Symbol(props, Decl(index.d.ts, 28, 5))
+>P : Symbol(P, Decl(index.d.ts, 27, 28))
+>ReactNode : Symbol(ReactNode, Decl(index.d.ts, 3, 25))
readonly $$typeof: symbol;
->$$typeof : Symbol(ExoticComponent.$$typeof, Decl(index.d.ts, 31, 26))
+>$$typeof : Symbol(ExoticComponent.$$typeof, Decl(index.d.ts, 28, 26))
}
type LazyExoticComponent> =
->LazyExoticComponent : Symbol(LazyExoticComponent, Decl(index.d.ts, 33, 3))
->T : Symbol(T, Decl(index.d.ts, 35, 27))
->JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 14, 16))
+>LazyExoticComponent : Symbol(LazyExoticComponent, Decl(index.d.ts, 30, 3))
+>T : Symbol(T, Decl(index.d.ts, 32, 27))
+>JSXElementConstructor : Symbol(JSXElementConstructor, Decl(index.d.ts, 11, 16))
ExoticComponent> & {
->ExoticComponent : Symbol(ExoticComponent, Decl(index.d.ts, 28, 57))
->ComponentProps : Symbol(ComponentProps, Decl(index.d.ts, 25, 3))
->T : Symbol(T, Decl(index.d.ts, 35, 27))
+>ExoticComponent : Symbol(ExoticComponent, Decl(index.d.ts, 25, 57))
+>ComponentProps : Symbol(ComponentProps, Decl(index.d.ts, 22, 3))
+>T : Symbol(T, Decl(index.d.ts, 32, 27))
readonly _result: T;
->_result : Symbol(_result, Decl(index.d.ts, 36, 42))
->T : Symbol(T, Decl(index.d.ts, 35, 27))
+>_result : Symbol(_result, Decl(index.d.ts, 33, 42))
+>T : Symbol(T, Decl(index.d.ts, 32, 27))
};
function createElement(): void;
->createElement : Symbol(createElement, Decl(index.d.ts, 38, 6))
+>createElement : Symbol(createElement, Decl(index.d.ts, 35, 6))
namespace JSX {
->JSX : Symbol(JSX, Decl(index.d.ts, 40, 33))
+>JSX : Symbol(JSX, Decl(index.d.ts, 37, 33))
interface Element extends GlobalJSXElement {}
->Element : Symbol(Element, Decl(index.d.ts, 42, 17))
->GlobalJSXElement : Symbol(GlobalJSXElement, Decl(index.d.ts, 74, 1))
+>Element : Symbol(Element, Decl(index.d.ts, 39, 17))
+>GlobalJSXElement : Symbol(GlobalJSXElement, Decl(index.d.ts, 71, 1))
interface ElementChildrenAttribute
->ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(index.d.ts, 43, 49))
+>ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(index.d.ts, 40, 49))
extends GlobalJSXElementChildrenAttribute {}
->GlobalJSXElementChildrenAttribute : Symbol(GlobalJSXElementChildrenAttribute, Decl(index.d.ts, 76, 49))
+>GlobalJSXElementChildrenAttribute : Symbol(GlobalJSXElementChildrenAttribute, Decl(index.d.ts, 73, 49))
type LibraryManagedAttributes = GlobalJSXLibraryManagedAttributes<
->LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(index.d.ts, 45, 50))
->C : Symbol(C, Decl(index.d.ts, 46, 34))
->P : Symbol(P, Decl(index.d.ts, 46, 36))
->GlobalJSXLibraryManagedAttributes : Symbol(GlobalJSXLibraryManagedAttributes, Decl(index.d.ts, 78, 41))
+>LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(index.d.ts, 42, 50))
+>C : Symbol(C, Decl(index.d.ts, 43, 34))
+>P : Symbol(P, Decl(index.d.ts, 43, 36))
+>GlobalJSXLibraryManagedAttributes : Symbol(GlobalJSXLibraryManagedAttributes, Decl(index.d.ts, 75, 41))
C,
->C : Symbol(C, Decl(index.d.ts, 46, 34))
+>C : Symbol(C, Decl(index.d.ts, 43, 34))
P
->P : Symbol(P, Decl(index.d.ts, 46, 36))
+>P : Symbol(P, Decl(index.d.ts, 43, 36))
>;
interface IntrinsicElements extends GlobalJSXIntrinsicElements {}
->IntrinsicElements : Symbol(IntrinsicElements, Decl(index.d.ts, 49, 6))
->GlobalJSXIntrinsicElements : Symbol(GlobalJSXIntrinsicElements, Decl(index.d.ts, 82, 2))
+>IntrinsicElements : Symbol(IntrinsicElements, Decl(index.d.ts, 46, 6))
+>GlobalJSXIntrinsicElements : Symbol(GlobalJSXIntrinsicElements, Decl(index.d.ts, 79, 2))
}
}
type ReactManagedAttributes = C extends { defaultProps: infer D }
->ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 52, 1))
->C : Symbol(C, Decl(index.d.ts, 54, 28))
->P : Symbol(P, Decl(index.d.ts, 54, 30))
->C : Symbol(C, Decl(index.d.ts, 54, 28))
->defaultProps : Symbol(defaultProps, Decl(index.d.ts, 54, 47))
->D : Symbol(D, Decl(index.d.ts, 54, 67))
+>ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 49, 1))
+>C : Symbol(C, Decl(index.d.ts, 51, 28))
+>P : Symbol(P, Decl(index.d.ts, 51, 30))
+>C : Symbol(C, Decl(index.d.ts, 51, 28))
+>defaultProps : Symbol(defaultProps, Decl(index.d.ts, 51, 47))
+>D : Symbol(D, Decl(index.d.ts, 51, 67))
? P & D
->P : Symbol(P, Decl(index.d.ts, 54, 30))
->D : Symbol(D, Decl(index.d.ts, 54, 67))
+>P : Symbol(P, Decl(index.d.ts, 51, 30))
+>D : Symbol(D, Decl(index.d.ts, 51, 67))
: P;
->P : Symbol(P, Decl(index.d.ts, 54, 30))
+>P : Symbol(P, Decl(index.d.ts, 51, 30))
declare global {
->global : Symbol(global, Decl(index.d.ts, 56, 6))
+>global : Symbol(global, Decl(index.d.ts, 53, 6))
namespace JSX {
->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16))
+>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16))
interface Element extends React.ReactElement {}
->Element : Symbol(Element, Decl(index.d.ts, 59, 17))
->React.ReactElement : Symbol(React.ReactElement, Decl(index.d.ts, 15, 58))
->React : Symbol(React, Decl(index.d.ts, 4, 26))
->ReactElement : Symbol(React.ReactElement, Decl(index.d.ts, 15, 58))
+>Element : Symbol(Element, Decl(index.d.ts, 56, 17))
+>React.ReactElement : Symbol(React.ReactElement, Decl(index.d.ts, 12, 58))
+>React : Symbol(React, Decl(index.d.ts, 1, 26))
+>ReactElement : Symbol(React.ReactElement, Decl(index.d.ts, 12, 58))
interface ElementChildrenAttribute {
->ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(index.d.ts, 60, 61))
+>ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(index.d.ts, 57, 61))
children: {};
->children : Symbol(ElementChildrenAttribute.children, Decl(index.d.ts, 61, 40))
+>children : Symbol(ElementChildrenAttribute.children, Decl(index.d.ts, 58, 40))
}
type LibraryManagedAttributes = C extends React.LazyExoticComponent<
->LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(index.d.ts, 63, 5))
->C : Symbol(C, Decl(index.d.ts, 64, 34))
->P : Symbol(P, Decl(index.d.ts, 64, 36))
->C : Symbol(C, Decl(index.d.ts, 64, 34))
->React : Symbol(React, Decl(index.d.ts, 4, 26))
->LazyExoticComponent : Symbol(React.LazyExoticComponent, Decl(index.d.ts, 33, 3))
+>LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(index.d.ts, 60, 5))
+>C : Symbol(C, Decl(index.d.ts, 61, 34))
+>P : Symbol(P, Decl(index.d.ts, 61, 36))
+>C : Symbol(C, Decl(index.d.ts, 61, 34))
+>React : Symbol(React, Decl(index.d.ts, 1, 26))
+>LazyExoticComponent : Symbol(React.LazyExoticComponent, Decl(index.d.ts, 30, 3))
infer T
->T : Symbol(T, Decl(index.d.ts, 65, 11))
+>T : Symbol(T, Decl(index.d.ts, 62, 11))
>
? ReactManagedAttributes
->ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 52, 1))
->T : Symbol(T, Decl(index.d.ts, 65, 11))
->P : Symbol(P, Decl(index.d.ts, 64, 36))
+>ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 49, 1))
+>T : Symbol(T, Decl(index.d.ts, 62, 11))
+>P : Symbol(P, Decl(index.d.ts, 61, 36))
: ReactManagedAttributes;
->ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 52, 1))
->C : Symbol(C, Decl(index.d.ts, 64, 34))
->P : Symbol(P, Decl(index.d.ts, 64, 36))
+>ReactManagedAttributes : Symbol(ReactManagedAttributes, Decl(index.d.ts, 49, 1))
+>C : Symbol(C, Decl(index.d.ts, 61, 34))
+>P : Symbol(P, Decl(index.d.ts, 61, 36))
interface IntrinsicElements {
->IntrinsicElements : Symbol(IntrinsicElements, Decl(index.d.ts, 68, 37))
+>IntrinsicElements : Symbol(IntrinsicElements, Decl(index.d.ts, 65, 37))
div: {};
->div : Symbol(IntrinsicElements.div, Decl(index.d.ts, 69, 33))
+>div : Symbol(IntrinsicElements.div, Decl(index.d.ts, 66, 33))
span: {};
->span : Symbol(IntrinsicElements.span, Decl(index.d.ts, 70, 14))
+>span : Symbol(IntrinsicElements.span, Decl(index.d.ts, 67, 14))
}
}
}
interface GlobalJSXElement extends JSX.Element {}
->GlobalJSXElement : Symbol(GlobalJSXElement, Decl(index.d.ts, 74, 1))
->JSX.Element : Symbol(JSX.Element, Decl(index.d.ts, 59, 17))
->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16))
->Element : Symbol(JSX.Element, Decl(index.d.ts, 59, 17))
+>GlobalJSXElement : Symbol(GlobalJSXElement, Decl(index.d.ts, 71, 1))
+>JSX.Element : Symbol(JSX.Element, Decl(index.d.ts, 56, 17))
+>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16))
+>Element : Symbol(JSX.Element, Decl(index.d.ts, 56, 17))
interface GlobalJSXElementChildrenAttribute
->GlobalJSXElementChildrenAttribute : Symbol(GlobalJSXElementChildrenAttribute, Decl(index.d.ts, 76, 49))
+>GlobalJSXElementChildrenAttribute : Symbol(GlobalJSXElementChildrenAttribute, Decl(index.d.ts, 73, 49))
extends JSX.ElementChildrenAttribute {}
->JSX.ElementChildrenAttribute : Symbol(JSX.ElementChildrenAttribute, Decl(index.d.ts, 60, 61))
->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16))
->ElementChildrenAttribute : Symbol(JSX.ElementChildrenAttribute, Decl(index.d.ts, 60, 61))
+>JSX.ElementChildrenAttribute : Symbol(JSX.ElementChildrenAttribute, Decl(index.d.ts, 57, 61))
+>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16))
+>ElementChildrenAttribute : Symbol(JSX.ElementChildrenAttribute, Decl(index.d.ts, 57, 61))
type GlobalJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes<
->GlobalJSXLibraryManagedAttributes : Symbol(GlobalJSXLibraryManagedAttributes, Decl(index.d.ts, 78, 41))
->C : Symbol(C, Decl(index.d.ts, 79, 39))
->P : Symbol(P, Decl(index.d.ts, 79, 41))
->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16))
->LibraryManagedAttributes : Symbol(JSX.LibraryManagedAttributes, Decl(index.d.ts, 63, 5))
+>GlobalJSXLibraryManagedAttributes : Symbol(GlobalJSXLibraryManagedAttributes, Decl(index.d.ts, 75, 41))
+>C : Symbol(C, Decl(index.d.ts, 76, 39))
+>P : Symbol(P, Decl(index.d.ts, 76, 41))
+>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16))
+>LibraryManagedAttributes : Symbol(JSX.LibraryManagedAttributes, Decl(index.d.ts, 60, 5))
C,
->C : Symbol(C, Decl(index.d.ts, 79, 39))
+>C : Symbol(C, Decl(index.d.ts, 76, 39))
P
->P : Symbol(P, Decl(index.d.ts, 79, 41))
+>P : Symbol(P, Decl(index.d.ts, 76, 41))
>;
interface GlobalJSXIntrinsicElements extends JSX.IntrinsicElements {}
->GlobalJSXIntrinsicElements : Symbol(GlobalJSXIntrinsicElements, Decl(index.d.ts, 82, 2))
->JSX.IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(index.d.ts, 68, 37))
->JSX : Symbol(JSX, Decl(index.d.ts, 58, 16))
->IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(index.d.ts, 68, 37))
+>GlobalJSXIntrinsicElements : Symbol(GlobalJSXIntrinsicElements, Decl(index.d.ts, 79, 2))
+>JSX.IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(index.d.ts, 65, 37))
+>JSX : Symbol(JSX, Decl(index.d.ts, 55, 16))
+>IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(index.d.ts, 65, 37))
=== src/index.tsx ===
import React from 'react'
@@ -262,14 +259,14 @@ function Comp() {
>Comp : Symbol(Comp, Decl(index.tsx, 4, 70))
return
->div : Symbol(JSX.IntrinsicElements.div, Decl(index.d.ts, 69, 33))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(index.d.ts, 66, 33))
Scope: {displayEnum("VALUE")}
->span : Symbol(JSX.IntrinsicElements.span, Decl(index.d.ts, 70, 14))
->span : Symbol(JSX.IntrinsicElements.span, Decl(index.d.ts, 70, 14))
+>span : Symbol(JSX.IntrinsicElements.span, Decl(index.d.ts, 67, 14))
+>span : Symbol(JSX.IntrinsicElements.span, Decl(index.d.ts, 67, 14))
>displayEnum : Symbol(displayEnum, Decl(index.tsx, 4, 5))
->div : Symbol(JSX.IntrinsicElements.div, Decl(index.d.ts, 69, 33))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(index.d.ts, 66, 33))
}
diff --git a/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.types b/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.types
index db99c94a2c9..5e1ae8802a8 100644
--- a/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.types
+++ b/tests/baselines/reference/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.types
@@ -1,9 +1,6 @@
//// [tests/cases/compiler/unionReductionWithStringMappingAndIdenticalBaseTypeExistsNoCrash.tsx] ////
=== node_modules/@types/react/index.d.ts ===
-// https://github.com/microsoft/TypeScript/issues/56688
-
-
export = React;
>React : typeof React
diff --git a/tests/baselines/reference/untypedModuleImport.js b/tests/baselines/reference/untypedModuleImport.js
index 75d5ede0e55..9f93f968c4b 100644
--- a/tests/baselines/reference/untypedModuleImport.js
+++ b/tests/baselines/reference/untypedModuleImport.js
@@ -1,9 +1,6 @@
//// [tests/cases/conformance/moduleResolution/untypedModuleImport.ts] ////
//// [index.js]
-// This tests that importing from a JS file globally works in an untyped way.
-// (Assuming we don't have `--noImplicitAny` or `--allowJs`.)
-
This file is not processed.
//// [a.ts]
diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.js b/tests/baselines/reference/untypedModuleImport_allowJs.js
index fcdb3d23210..c4bbe0d49f8 100644
--- a/tests/baselines/reference/untypedModuleImport_allowJs.js
+++ b/tests/baselines/reference/untypedModuleImport_allowJs.js
@@ -1,8 +1,6 @@
//// [tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs.ts] ////
//// [index.js]
-// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed.
-
exports.default = { bar() { return 0; } }
//// [a.ts]
diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.symbols b/tests/baselines/reference/untypedModuleImport_allowJs.symbols
index a7bbaf6a06c..0c9665a5aff 100644
--- a/tests/baselines/reference/untypedModuleImport_allowJs.symbols
+++ b/tests/baselines/reference/untypedModuleImport_allowJs.symbols
@@ -5,16 +5,14 @@ import foo from "foo";
>foo : Symbol(foo, Decl(a.ts, 0, 6))
foo.bar();
->foo.bar : Symbol(bar, Decl(index.js, 2, 19))
+>foo.bar : Symbol(bar, Decl(index.js, 0, 19))
>foo : Symbol(foo, Decl(a.ts, 0, 6))
->bar : Symbol(bar, Decl(index.js, 2, 19))
+>bar : Symbol(bar, Decl(index.js, 0, 19))
=== /node_modules/foo/index.js ===
-// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed.
-
exports.default = { bar() { return 0; } }
>exports.default : Symbol(default, Decl(index.js, 0, 0))
>exports : Symbol(default, Decl(index.js, 0, 0))
>default : Symbol(default, Decl(index.js, 0, 0))
->bar : Symbol(bar, Decl(index.js, 2, 19))
+>bar : Symbol(bar, Decl(index.js, 0, 19))
diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.types b/tests/baselines/reference/untypedModuleImport_allowJs.types
index 130e985abd7..114f087c642 100644
--- a/tests/baselines/reference/untypedModuleImport_allowJs.types
+++ b/tests/baselines/reference/untypedModuleImport_allowJs.types
@@ -11,8 +11,6 @@ foo.bar();
>bar : () => number
=== /node_modules/foo/index.js ===
-// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed.
-
exports.default = { bar() { return 0; } }
>exports.default = { bar() { return 0; } } : { bar(): number; }
>exports.default : { bar(): number; }
diff --git a/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt b/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt
index 55715dc4ece..f7e0a3b8c25 100644
--- a/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt
+++ b/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt
@@ -9,8 +9,6 @@
!!! error TS7016: Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';`
==== /node_modules/foo/package.json (0 errors) ====
- // This tests that `--noImplicitAny` disables untyped modules.
-
{ "name": "foo", "version": "1.2.3" }
==== /node_modules/foo/index.js (0 errors) ====
diff --git a/tests/baselines/reference/untypedModuleImport_noImplicitAny.js b/tests/baselines/reference/untypedModuleImport_noImplicitAny.js
index 7f4274fed19..d51002def8c 100644
--- a/tests/baselines/reference/untypedModuleImport_noImplicitAny.js
+++ b/tests/baselines/reference/untypedModuleImport_noImplicitAny.js
@@ -1,8 +1,6 @@
//// [tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny.ts] ////
//// [package.json]
-// This tests that `--noImplicitAny` disables untyped modules.
-
{ "name": "foo", "version": "1.2.3" }
//// [index.js]
diff --git a/tests/baselines/reference/untypedModuleImport_vsAmbient.js b/tests/baselines/reference/untypedModuleImport_vsAmbient.js
index 973d37b1b59..c41320cd635 100644
--- a/tests/baselines/reference/untypedModuleImport_vsAmbient.js
+++ b/tests/baselines/reference/untypedModuleImport_vsAmbient.js
@@ -1,8 +1,6 @@
//// [tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient.ts] ////
//// [index.js]
-// This tests that an ambient module declaration overrides an untyped import.
-
This file is not processed.
//// [declarations.d.ts]
diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt b/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt
index 290cfbc6cbd..54a9d18359a 100644
--- a/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt
+++ b/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt
@@ -11,7 +11,5 @@
x;
==== /node_modules/foo/index.js (0 errors) ====
- // This tests that augmenting an untyped module is forbidden.
-
This file is not processed.
\ No newline at end of file
diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation.js b/tests/baselines/reference/untypedModuleImport_withAugmentation.js
index 6712464e5be..fbfb08a7c59 100644
--- a/tests/baselines/reference/untypedModuleImport_withAugmentation.js
+++ b/tests/baselines/reference/untypedModuleImport_withAugmentation.js
@@ -1,8 +1,6 @@
//// [tests/cases/conformance/moduleResolution/untypedModuleImport_withAugmentation.ts] ////
//// [index.js]
-// This tests that augmenting an untyped module is forbidden.
-
This file is not processed.
//// [a.ts]
diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.errors.txt b/tests/baselines/reference/untypedModuleImport_withAugmentation2.errors.txt
index 628533b93d5..f0c6781abae 100644
--- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.errors.txt
+++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.errors.txt
@@ -1,12 +1,10 @@
-/node_modules/augmenter/index.d.ts(3,16): error TS2665: Invalid module name in augmentation. Module 'js' resolves to an untyped module at '/node_modules/js/index.js', which cannot be augmented.
+/node_modules/augmenter/index.d.ts(1,16): error TS2665: Invalid module name in augmentation. Module 'js' resolves to an untyped module at '/node_modules/js/index.js', which cannot be augmented.
==== /a.ts (0 errors) ====
import { } from "augmenter";
==== /node_modules/augmenter/index.d.ts (1 errors) ====
- // This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`.
-
declare module "js" {
~~~~
!!! error TS2665: Invalid module name in augmentation. Module 'js' resolves to an untyped module at '/node_modules/js/index.js', which cannot be augmented.
diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.js b/tests/baselines/reference/untypedModuleImport_withAugmentation2.js
index 61f4440de32..9dc1e065789 100644
--- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.js
+++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.js
@@ -1,8 +1,6 @@
//// [tests/cases/compiler/untypedModuleImport_withAugmentation2.ts] ////
//// [index.d.ts]
-// This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`.
-
declare module "js" {
export const j: number;
}
diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.symbols b/tests/baselines/reference/untypedModuleImport_withAugmentation2.symbols
index 60b14b5eb53..a20c7cbf7d3 100644
--- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.symbols
+++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.symbols
@@ -5,13 +5,11 @@
import { } from "augmenter";
=== /node_modules/augmenter/index.d.ts ===
-// This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`.
-
declare module "js" {
>"js" : Symbol("js", Decl(index.d.ts, 0, 0))
export const j: number;
->j : Symbol(j, Decl(index.d.ts, 3, 16))
+>j : Symbol(j, Decl(index.d.ts, 1, 16))
}
export {};
diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.types b/tests/baselines/reference/untypedModuleImport_withAugmentation2.types
index 94560b5ebc1..04eb55e187a 100644
--- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.types
+++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.types
@@ -5,8 +5,6 @@
import { } from "augmenter";
=== /node_modules/augmenter/index.d.ts ===
-// This tests that augmenting an untyped module is forbidden even in an ambient context. Contrast with `moduleAugmentationInDependency.ts`.
-
declare module "js" {
>"js" : typeof import("js")
diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt b/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt
index 7a600c1bc0b..a3bae0b3543 100644
--- a/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt
+++ b/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt
@@ -7,13 +7,10 @@
/new.ts(1,21): error TS2307: Cannot find module 'unkown' or its corresponding type declarations.
/super.ts(1,22): error TS2307: Cannot find module 'unknown' or its corresponding type declarations.
/super.ts(8,17): error TS2304: Cannot find name 'InvalidReference'.
-/typeReference.ts(6,17): error TS2315: Type 'U' is not generic.
+/typeReference.ts(3,17): error TS2315: Type 'U' is not generic.
==== /typeReference.ts (1 errors) ====
- // Tests that types are marked as used, even if used in places that don't accept type arguments.
-
-
type N = number;
type U = number;
export type Z = U;
diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.js b/tests/baselines/reference/unusedInvalidTypeArguments.js
index 1d0c7ad6fa9..603e8f180bf 100644
--- a/tests/baselines/reference/unusedInvalidTypeArguments.js
+++ b/tests/baselines/reference/unusedInvalidTypeArguments.js
@@ -1,9 +1,6 @@
//// [tests/cases/compiler/unusedInvalidTypeArguments.ts] ////
//// [typeReference.ts]
-// Tests that types are marked as used, even if used in places that don't accept type arguments.
-
-
type N = number;
type U = number;
export type Z = U;
@@ -49,7 +46,6 @@ export class C extends A {
//// [typeReference.js]
"use strict";
-// Tests that types are marked as used, even if used in places that don't accept type arguments.
Object.defineProperty(exports, "__esModule", { value: true });
//// [classReference.js]
"use strict";
diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.symbols b/tests/baselines/reference/unusedInvalidTypeArguments.symbols
index 64880185bcb..d0901122875 100644
--- a/tests/baselines/reference/unusedInvalidTypeArguments.symbols
+++ b/tests/baselines/reference/unusedInvalidTypeArguments.symbols
@@ -1,18 +1,15 @@
//// [tests/cases/compiler/unusedInvalidTypeArguments.ts] ////
=== /typeReference.ts ===
-// Tests that types are marked as used, even if used in places that don't accept type arguments.
-
-
type N = number;
>N : Symbol(N, Decl(typeReference.ts, 0, 0))
type U = number;
->U : Symbol(U, Decl(typeReference.ts, 3, 16))
+>U : Symbol(U, Decl(typeReference.ts, 0, 16))
export type Z = U;
->Z : Symbol(Z, Decl(typeReference.ts, 4, 16))
->U : Symbol(U, Decl(typeReference.ts, 3, 16))
+>Z : Symbol(Z, Decl(typeReference.ts, 1, 16))
+>U : Symbol(U, Decl(typeReference.ts, 0, 16))
>N : Symbol(N, Decl(typeReference.ts, 0, 0))
=== /classReference.ts ===
diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.types b/tests/baselines/reference/unusedInvalidTypeArguments.types
index 8ef6553f778..07ebd96b780 100644
--- a/tests/baselines/reference/unusedInvalidTypeArguments.types
+++ b/tests/baselines/reference/unusedInvalidTypeArguments.types
@@ -1,9 +1,6 @@
//// [tests/cases/compiler/unusedInvalidTypeArguments.ts] ////
=== /typeReference.ts ===
-// Tests that types are marked as used, even if used in places that don't accept type arguments.
-
-
type N = number;
>N : number
diff --git a/tests/baselines/reference/usedImportNotElidedInJs.js b/tests/baselines/reference/usedImportNotElidedInJs.js
index 2f404edc8fe..2433999eec9 100644
--- a/tests/baselines/reference/usedImportNotElidedInJs.js
+++ b/tests/baselines/reference/usedImportNotElidedInJs.js
@@ -1,16 +1,12 @@
//// [tests/cases/compiler/usedImportNotElidedInJs.ts] ////
//// [test.js]
-// #38412
-
-
import * as moment from 'moment';
import rollupMoment__default from 'moment';
export const moment = rollupMoment__default || moment;
//// [test.js]
-// #38412
import * as moment from 'moment';
import rollupMoment__default from 'moment';
export const moment = rollupMoment__default || moment;
diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js
index 6cc4e495119..78cc3863ff9 100644
--- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js
+++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js
@@ -1,8 +1,6 @@
//// [tests/cases/compiler/visibilityOfCrossModuleTypeUsage.ts] ////
//// [visibilityOfCrossModuleTypeUsage_commands.ts]
-//visibilityOfCrossModuleTypeUsage
-
import fs = require('./visibilityOfCrossModuleTypeUsage_fs');
import server = require('./visibilityOfCrossModuleTypeUsage_server');
@@ -30,7 +28,6 @@ function run(configuration: commands.IConfiguration) {
Object.defineProperty(exports, "__esModule", { value: true });
//// [visibilityOfCrossModuleTypeUsage_commands.js]
"use strict";
-//visibilityOfCrossModuleTypeUsage
Object.defineProperty(exports, "__esModule", { value: true });
//// [visibilityOfCrossModuleTypeUsage_fs.js]
"use strict";
diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.symbols b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.symbols
index db279af50c6..1f680fd4ba2 100644
--- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.symbols
+++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.symbols
@@ -8,39 +8,37 @@ function run(configuration: commands.IConfiguration) {
>run : Symbol(run, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 0, 73))
>configuration : Symbol(configuration, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 1, 13))
>commands : Symbol(commands, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 0, 0))
->IConfiguration : Symbol(commands.IConfiguration, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 69))
+>IConfiguration : Symbol(commands.IConfiguration, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 1, 69))
var absoluteWorkspacePath = configuration.workspace.toAbsolutePath(configuration.server);
>absoluteWorkspacePath : Symbol(absoluteWorkspacePath, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 2, 7))
>configuration.workspace.toAbsolutePath : Symbol(IWorkspace.toAbsolutePath, Decl(visibilityOfCrossModuleTypeUsage_server.ts, 3, 29))
->configuration.workspace : Symbol(commands.IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 5, 33))
+>configuration.workspace : Symbol(commands.IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 33))
>configuration : Symbol(configuration, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 1, 13))
->workspace : Symbol(commands.IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 5, 33))
+>workspace : Symbol(commands.IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 33))
>toAbsolutePath : Symbol(IWorkspace.toAbsolutePath, Decl(visibilityOfCrossModuleTypeUsage_server.ts, 3, 29))
->configuration.server : Symbol(commands.IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 6, 33))
+>configuration.server : Symbol(commands.IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 4, 33))
>configuration : Symbol(configuration, Decl(visibilityOfCrossModuleTypeUsage_fs.ts, 1, 13))
->server : Symbol(commands.IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 6, 33))
+>server : Symbol(commands.IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 4, 33))
}
=== visibilityOfCrossModuleTypeUsage_commands.ts ===
-//visibilityOfCrossModuleTypeUsage
-
import fs = require('./visibilityOfCrossModuleTypeUsage_fs');
>fs : Symbol(fs, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 0, 0))
import server = require('./visibilityOfCrossModuleTypeUsage_server');
->server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 2, 61))
+>server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 0, 61))
export interface IConfiguration {
->IConfiguration : Symbol(IConfiguration, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 69))
+>IConfiguration : Symbol(IConfiguration, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 1, 69))
workspace: server.IWorkspace;
->workspace : Symbol(IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 5, 33))
->server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 2, 61))
+>workspace : Symbol(IConfiguration.workspace, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 3, 33))
+>server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 0, 61))
>IWorkspace : Symbol(server.IWorkspace, Decl(visibilityOfCrossModuleTypeUsage_server.ts, 1, 1))
server?: server.IServer;
->server : Symbol(IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 6, 33))
->server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 2, 61))
+>server : Symbol(IConfiguration.server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 4, 33))
+>server : Symbol(server, Decl(visibilityOfCrossModuleTypeUsage_commands.ts, 0, 61))
>IServer : Symbol(server.IServer, Decl(visibilityOfCrossModuleTypeUsage_server.ts, 0, 0))
}
diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types
index cd3ff619154..2ea96a394ee 100644
--- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types
+++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types
@@ -22,8 +22,6 @@ function run(configuration: commands.IConfiguration) {
>server : import("visibilityOfCrossModuleTypeUsage_server").IServer
}
=== visibilityOfCrossModuleTypeUsage_commands.ts ===
-//visibilityOfCrossModuleTypeUsage
-
import fs = require('./visibilityOfCrossModuleTypeUsage_fs');
>fs : typeof fs
diff --git a/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts b/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts
index 23a1000fa11..87006d3cc29 100644
--- a/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts
+++ b/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts
@@ -6,7 +6,6 @@ class C {
public foo(x: string, y: number) { }
}
-// @Filename: file1.ts
var x = 10;
/*! remove pinned comment anywhere else */
diff --git a/tests/cases/compiler/enumAssignmentCompat6.ts b/tests/cases/compiler/enumAssignmentCompat6.ts
index b91300d37c5..dccc6bdc7e8 100644
--- a/tests/cases/compiler/enumAssignmentCompat6.ts
+++ b/tests/cases/compiler/enumAssignmentCompat6.ts
@@ -1,4 +1,4 @@
-// @filename a.ts
+// @filename: a.ts
namespace numerics {
export enum DiagnosticCategory {
Warning,
diff --git a/tests/cases/compiler/exportDefaultWithJSDoc1.ts b/tests/cases/compiler/exportDefaultWithJSDoc1.ts
index 2140ccc8aa1..7010f2db7d7 100644
--- a/tests/cases/compiler/exportDefaultWithJSDoc1.ts
+++ b/tests/cases/compiler/exportDefaultWithJSDoc1.ts
@@ -3,12 +3,13 @@
// @checkJs: true
// @noEmit: true
+// @Filename: a.js
+
/**
* A number, or a string containing a number.
* @typedef {(number|string)} NumberLike
*/
-// @Filename: a.js
/** @type {NumberLike[]} */export default ([ ]);
// @Filename: b.ts
diff --git a/tests/cases/compiler/exportDefaultWithJSDoc2.ts b/tests/cases/compiler/exportDefaultWithJSDoc2.ts
index 1b14248bfa6..a652cf758d9 100644
--- a/tests/cases/compiler/exportDefaultWithJSDoc2.ts
+++ b/tests/cases/compiler/exportDefaultWithJSDoc2.ts
@@ -3,12 +3,13 @@
// @checkJs: true
// @noEmit: true
+// @Filename: a.js
+
/**
* A number, or a string containing a number.
* @typedef {(number|string)} NumberLike
*/
-// @Filename: a.js
export default /** @type {NumberLike[]} */([ ]);
// @Filename: b.ts