1From 93dbec5e710a8cb28ca8b7f0c70b9ade4a8fc911 Mon Sep 17 00:00:00 2001
2Date: Sat, 15 Jan 2022 21:39:48 +0800
3Subject: [PATCH] test patch
4
5---
6 .../ambient/ambientDeclarations.ts            |   1 +
7 .../ambientDeclarationsPatterns.ts            |  11 +
8 .../declarations.d.ts                         |  18 +
9 .../ambient/ambientInsideNonAmbient.ts        |   2 +
10 .../ambientInsideNonAmbientExternalModule.ts  |   4 +-
11 .../ambientShorthand_merging.ts               |   6 +
12 .../declarations1.d.ts                        |   2 +
13 .../declarations2.d.ts                        |   4 +
14 .../ambientShorthand_reExport.ts              |   5 +
15 .../declarations.d.ts                         |   2 +
16 .../ambientShorthand_reExport/jquery.d.ts     |   2 +
17 .../ambientShorthand_reExport/reExportAll.ts  |   2 +
18 .../ambientShorthand_reExport/reExportX.ts    |   2 +
19 .../async/es5/asyncMethodWithSuper_es5.ts     |   1 +
20 .../asyncOrYieldAsBindingIdentifier1.ts       |  49 ++
21 .../classAbstractAsIdentifier.ts              |   2 +-
22 .../classBody/classWithEmptyBody.ts           |   4 +-
23 .../classDeclarations/classInsideBlock.ts     |   1 +
24 .../classWithPredefinedTypesAsNames.ts        |   4 +-
25 .../classWithSemicolonClassElement1.ts        |   3 +-
26 .../classWithSemicolonClassElement2.ts        |   3 +-
27 .../classExpressions/classExpression2.ts      |   4 +-
28 .../classStaticBlock/classStaticBlock1.ts     |  11 +
29 .../classStaticBlock/classStaticBlock10.ts    |  30 ++
30 .../classStaticBlock/classStaticBlock11.ts    |  15 +
31 .../classStaticBlock/classStaticBlock12.ts    |  10 +
32 .../classStaticBlock/classStaticBlock13.ts    |  14 +
33 .../classStaticBlock/classStaticBlock14.ts    |  15 +
34 .../classStaticBlock/classStaticBlock15.ts    |  18 +
35 .../classStaticBlock/classStaticBlock16.ts    |  26 +
36 .../classStaticBlock/classStaticBlock17.ts    |  33 ++
37 .../classStaticBlock/classStaticBlock18.ts    |  15 +
38 .../classStaticBlock/classStaticBlock19.ts    |   6 +
39 .../classStaticBlock/classStaticBlock2.ts     |  20 +
40 .../classStaticBlock/classStaticBlock20.ts    |  13 +
41 .../classStaticBlock/classStaticBlock21.ts    |   7 +
42 .../classStaticBlock/classStaticBlock22.ts    |  72 +++
43 .../classStaticBlock/classStaticBlock23.ts    |  21 +
44 .../classStaticBlock/classStaticBlock24.ts    |   8 +
45 .../classStaticBlock/classStaticBlock25.ts    |  23 +
46 .../classStaticBlock/classStaticBlock26.ts    |  30 ++
47 .../classStaticBlock/classStaticBlock27.ts    |  17 +
48 .../classStaticBlock/classStaticBlock3.ts     |  19 +
49 .../classStaticBlock/classStaticBlock4.ts     |  16 +
50 .../classStaticBlock/classStaticBlock5.ts     |  19 +
51 .../classStaticBlock/classStaticBlock6.ts     |  62 +++
52 .../classStaticBlock/classStaticBlock7.ts     |  43 ++
53 .../classStaticBlock/classStaticBlock8.ts     |  48 ++
54 .../classStaticBlock/classStaticBlock9.ts     |   8 +
55 .../classStaticBlockUseBeforeDef1.ts          |  15 +
56 .../classStaticBlockUseBeforeDef2.ts          |  10 +
57 .../classConstructorAccessibility4.ts         |   4 +-
58 ...structorImplementationWithDefaultValues.ts |   6 +-
59 .../declarationEmitReadonly.ts                |   3 +-
60 .../quotedConstructors.ts                     |   4 +
61 ...idesIndexersWithAssignmentCompatibility.ts |   4 +-
62 .../superInStaticMembers1.ts                  | 492 ++++++++++++++++++
63 .../thisAndSuperInStaticMembers1.ts           |  42 ++
64 .../thisAndSuperInStaticMembers2.ts           |  42 ++
65 .../thisAndSuperInStaticMembers3.ts           |  26 +
66 .../thisAndSuperInStaticMembers4.ts           |  26 +
67 .../typeOfThisInStaticMembers.ts              |   3 +-
68 .../typeOfThisInStaticMembers10.ts            |  51 ++
69 .../typeOfThisInStaticMembers11.ts            |  51 ++
70 .../typeOfThisInStaticMembers12.ts            |  10 +
71 .../typeOfThisInStaticMembers13.ts            |  10 +
72 .../typeOfThisInStaticMembers3.ts             |  12 +
73 .../typeOfThisInStaticMembers4.ts             |  12 +
74 .../typeOfThisInStaticMembers5.ts             |   9 +
75 .../typeOfThisInStaticMembers6.ts             |   7 +
76 .../typeOfThisInStaticMembers7.ts             |  12 +
77 .../typeOfThisInStaticMembers8.ts             |  19 +
78 .../typeOfThisInStaticMembers9.ts             |  22 +
79 .../privateNameComputedPropertyName3.ts       |   2 +
80 .../privateNames/privateNameFieldAccess.ts    |   1 +
81 .../privateNames/privateNameHashCharName.ts   |  11 +
82 .../privateNames/privateNameInInExpression.ts | 119 +++++
83 .../privateNameInInExpressionTransform.ts     |  47 ++
84 .../privateNameInInExpressionUnused.ts        |  13 +
85 .../privateNamesIncompatibleModifiersJs.ts    |  65 +++
86 .../classes/mixinClassesAnnotated.ts          |   3 +
87 .../classes/mixinClassesAnonymous.ts          |   2 +
88 .../classes/mixinClassesMembers.ts            |   5 +
89 .../abstractProperty.ts                       |   3 +
90 .../abstractPropertyInitializer.ts            |   5 +
91 .../instanceMemberInitialization.ts           |   7 +-
92 ...instanceMemberWithComputedPropertyName2.ts |   1 +
93 .../staticFactory1.ts                         |   3 +-
94 .../staticAndNonStaticPropertiesSameName.ts   |   3 +-
95 .../staticPropertyAndFunctionWithSameName.ts  |   4 +-
96 ...icPropertyNameConflictsInAmbientContext.ts |  10 +
97 .../controlFlow/assertionTypePredicates2.ts   |  27 +
98 .../controlFlow/controlFlowAliasing.ts        | 285 ++++++++++
99 .../controlFlowAliasingCatchVariables.ts      |  28 +
100 .../controlFlow/controlFlowElementAccess2.ts  |   2 +-
101 .../controlFlow/controlFlowForInStatement2.ts |  25 +
102 .../controlFlow/controlFlowInOperator.ts      |  26 +
103 .../controlFlowInstanceofExtendsFunction.ts   |   4 +-
104 .../controlFlowSuperPropertyAccess.ts         |   1 +
105 .../controlFlow/controlFlowTypeofObject.ts    |  71 +++
106 .../dependentDestructuredVariables.ts         | 161 ++++++
107 .../typeGuardsNestedAssignments.ts            |   3 +-
108 .../controlFlow/typeGuardsTypeParameters.ts   |   1 +
109 .../declarationEmitWorkWithInlineComments.ts  |   5 +-
110 .../declarationEmitThisPredicates01.ts        |   3 +-
111 ...tionEmitThisPredicatesWithPrivateName01.ts |   3 +-
112 .../typeReferenceRelatedFiles/fs.d.ts         |   5 +
113 .../typeReferenceRelatedFiles/main.ts         |   2 +
114 .../typeReferenceRelatedFiles/package.json    |   4 +
115 .../typeReferenceRelatedFiles.ts              |  18 +
116 .../decoratorOnClassConstructorParameter5.ts  |  15 +
117 .../class/decoratedBlockScopedClass1.ts       |  16 +
118 .../class/decoratedBlockScopedClass2.ts       |  19 +
119 .../class/decoratedBlockScopedClass3.ts       |  27 +
120 .../class/method/decoratorOnClassMethod14.ts  |  14 +
121 .../class/method/decoratorOnClassMethod15.ts  |  12 +
122 .../class/method/decoratorOnClassMethod16.ts  |  12 +
123 .../class/method/decoratorOnClassMethod17.ts  |  11 +
124 .../class/method/decoratorOnClassMethod18.ts  |  11 +
125 .../decoratorMetadataWithTypeOnlyImport2.ts   |  17 +
126 ...ter.asyncGenerators.classMethods.es2015.ts |  11 +
127 .../conformance/es2018/es2018IntlAPIs.ts      |   7 +
128 .../conformance/es2020/es2020IntlAPIs.ts      |  45 ++
129 ...tionWithPropertyAccessInHeritageClause1.ts |   4 +-
130 .../superCallBeforeThisAccessing1.ts          |   1 +
131 .../superCallBeforeThisAccessing2.ts          |   1 +
132 .../superCallBeforeThisAccessing5.ts          |   1 +
133 .../superCallBeforeThisAccessing8.ts          |   1 +
134 .../es6/spread/arraySpreadImportHelpers.ts    |  16 +
135 ...mplateStringWithCommentsInArrowFunction.ts |  14 +
136 .../expressions/asOperator/asOperatorASI.ts   |   1 +
137 .../comparisonOperatorWithIdenticalObjects.ts |   6 +-
138 .../comparisonOperatorWithIntersectionType.ts |   5 +
139 ...nshipObjectsOnInstantiatedCallSignature.ts |   4 +-
140 ...jectsOnInstantiatedConstructorSignature.ts |   4 +-
141 ...peratorWithSubtypeObjectOnCallSignature.ts |   3 +-
142 ...WithSubtypeObjectOnConstructorSignature.ts |   3 +-
143 ...eratorWithSubtypeObjectOnIndexSignature.ts |   3 +-
144 ...ubtypeObjectOnInstantiatedCallSignature.ts |   3 +-
145 ...bjectOnInstantiatedConstructorSignature.ts |   3 +-
146 ...isonOperatorWithSubtypeObjectOnProperty.ts |   6 +-
147 ...anceofOperatorWithInvalidStaticToString.ts |   3 +
148 .../instanceofOperatorWithLHSIsObject.ts      |   1 +
149 ...ommaOperatorWithSecondOperandObjectType.ts |   1 +
150 .../conditionalOperatorWithIdenticalBCT.ts    |   3 +
151 .../superCallParameterContextualTyping1.ts    |   2 +
152 .../superCallParameterContextualTyping3.ts    |   3 +-
153 .../functionCalls/callWithSpread.ts           |   1 +
154 .../functions/arrowFunctionExpressions.ts     |   1 +
155 .../newOperator/newOperatorConformance.ts     |   1 +
156 .../expressions/superCalls/superCalls.ts      |   2 +
157 .../thisKeyword/typeOfThisGeneral.ts          | 178 +++++++
158 .../typeGuards/TypeGuardWithArrayUnion.ts     |   1 +
159 .../typeGuards/typeGuardFunction.ts           |   6 +-
160 .../typeGuards/typeGuardFunctionGenerics.ts   |   4 +-
161 .../typeGuardOfFormExpr1AndExpr2.ts           |   3 +-
162 .../typeGuards/typeGuardOfFormExpr1OrExpr2.ts |   3 +-
163 .../typeGuards/typeGuardOfFormInstanceOf.ts   |  45 +-
164 .../typeGuards/typeGuardOfFormIsType.ts       |   5 +-
165 .../typeGuardOfFormTypeOfBoolean.ts           |   1 +
166 .../typeGuards/typeGuardOfFormTypeOfNumber.ts |   1 +
167 .../typeGuards/typeGuardOfFormTypeOfString.ts |   1 +
168 .../typeGuardOfFromPropNameInUnionType.ts     |   9 +
169 .../typeGuards/typeGuardsInClassAccessors.ts  |   1 +
170 .../typeGuards/typeGuardsInClassMethods.ts    |   1 +
171 .../typeGuards/typeGuardsInProperties.ts      |   3 +-
172 .../typeGuards/typeGuardsOnClassProperty.ts   |   3 +-
173 .../bitwiseNotOperatorWithNumberType.ts       |   3 +-
174 .../bitwiseNotOperatorWithStringType.ts       |   3 +-
175 .../externalModules/exportNonVisibleType.ts   |   1 +
176 .../moduleResolutionWithoutExtension1.ts      |  12 +
177 .../moduleResolutionWithoutExtension2.ts      |   6 +
178 .../moduleResolutionWithoutExtension3.ts      |  12 +
179 .../moduleResolutionWithoutExtension4.ts      |  12 +
180 .../moduleResolutionWithoutExtension5.ts      |   6 +
181 .../moduleResolutionWithoutExtension6.ts      |   8 +
182 .../moduleResolutionWithoutExtension7.ts      |   6 +
183 .../moduleResolutionWithoutExtension8.ts      |   6 +
184 .../typeOnly/exportSpecifiers.ts              |  21 +
185 .../typeOnly/importDefaultNamedType/a.ts      |   2 +
186 .../importDefaultNamedType.ts                 |   5 +
187 .../typeOnly/importSpecifiers1.ts             |  46 ++
188 .../typeOnly/preserveValueImports.ts          |  28 +
189 .../typeOnly/preserveValueImports_errors.ts   |  47 ++
190 ...erveValueImports_importsNotUsedAsValues.ts |  14 +
191 .../preserveValueImports_mixedImports.ts      |  13 +
192 .../typeOnly/preserveValueImports_module.ts   |   4 +
193 .../importAssertion/importAssertion1.ts       |  37 ++
194 .../importAssertion/importAssertion2.ts       |  17 +
195 .../importAssertion/importAssertion3.ts       |  15 +
196 .../importAssertion/importAssertion4.ts       |   1 +
197 .../importAssertion/importAssertion5.ts       |   1 +
198 .../mergedInterfacesWithMultipleBases3.ts     |   6 +-
199 .../interfaceExtendsObjectIntersection.ts     |  12 +
200 .../interfaceWithPropertyOfEveryType.ts       |   3 +-
201 ...duleAndAmbientWithSameNameAndCommonRoot.ts |   1 -
202 ...onAmbientClassWithSameNameAndCommonRoot.ts |   1 +
203 ...ionAndNonExportedFunctionThatShareAName.ts |   4 +-
204 ...ortedAndNonExportedClassesOfTheSameName.ts |   4 +
205 ...rgeEachWithExportedModulesOfTheSameName.ts |   2 +
206 .../codeGeneration/exportCodeGen.ts           |   2 +
207 .../codeGeneration/nameCollision.ts           |   1 +
208 .../jsdoc/constructorTagOnClassConstructor.ts |   4 +-
209 ...bclassWithExplicitNoArgumentConstructor.ts |   3 +-
210 .../declarations/jsDeclarationsThisTypes.ts   |   4 +-
211 .../jsdoc/enumTagImported/enumTagImported.ts  |  23 +
212 tests/cases/conformance/jsdoc/extendsTag1.ts  |   1 +
213 .../jsdocAugments_qualifiedName.ts            |  10 +
214 .../jsdoc/jsdocAugments_withTypeParameter.ts  |   1 +
215 .../jsdocImplements_namespacedInterface.ts    |   2 +
216 .../jsdoc/jsdocTemplateTagDefault.ts          |  71 +++
217 .../jsdoc/jsdocTemplateTagNameResolution.ts   |  16 +
218 .../jsdoc/jsdocTypeReferenceUseBeforeDef.ts   |   1 +
219 .../conformance/jsdoc/jsdocVariadicType.ts    |  12 +
220 tests/cases/conformance/jsdoc/seeTag3.ts      |   7 +
221 tests/cases/conformance/jsdoc/thisTag2.ts     |  11 +
222 .../conformance/jsx/jsxParsingError4.tsx      |  18 +
223 .../jsx/jsxUnclosedParserRecovery.ts          | 140 +++++
224 .../jsx/tsxReactEmitSpreadAttribute.ts        |  32 ++
225 .../declarationNotFoundPackageBundlesTypes.ts |  23 +
226 .../scopedPackages/index.d.ts                 |   3 +
227 .../scopedPackages/scopedPackages.ts          |  12 +
228 .../moduleResolution/scopedPackages/z.d.ts    |   2 +
229 .../scopedPackagesClassic/index.d.ts          |   2 +
230 .../scopedPackagesClassic.ts                  |   9 +
231 .../untypedModuleImport_allowJs.ts            |  12 +
232 .../declarations.d.ts                         |   4 +
233 .../untypedModuleImport_vsAmbient.ts          |  12 +
234 .../allowJs/nodeAllowJsPackageSelfName.ts     |  24 +
235 .../node/allowJs/nodeModulesAllowJs1.ts       | 324 ++++++++++++
236 .../allowJs/nodeModulesAllowJsCjsFromJs.ts    |   8 +
237 ...ModulesAllowJsConditionalPackageExports.ts | 126 +++++
238 .../nodeModulesAllowJsDynamicImport.ts        |  27 +
239 .../nodeModulesAllowJsExportAssignment.ts     |  32 ++
240 ...deModulesAllowJsGeneratedNameCollisions.ts |  29 ++
241 .../nodeModulesAllowJsImportAssignment.ts     |  34 ++
242 ...eModulesAllowJsImportHelpersCollisions1.ts |  34 ++
243 ...eModulesAllowJsImportHelpersCollisions2.ts |  30 ++
244 ...eModulesAllowJsImportHelpersCollisions3.ts |  32 ++
245 .../allowJs/nodeModulesAllowJsImportMeta.ts   |  23 +
246 .../nodeModulesAllowJsPackageExports.ts       |  92 ++++
247 .../nodeModulesAllowJsPackageImports.ts       |  41 ++
248 ...nodeModulesAllowJsPackagePatternExports.ts |  69 +++
249 ...lesAllowJsPackagePatternExportsTrailers.ts |  69 +++
250 ...nodeModulesAllowJsSynchronousCallErrors.ts |  37 ++
251 .../nodeModulesAllowJsTopLevelAwait.ts        |  25 +
252 ...lesExportsSpecifierGenerationConditions.ts |  33 ++
253 tests/cases/conformance/node/nodeModules1.ts  | 321 ++++++++++++
254 ...odeModulesCjsFormatFileAlwaysHasDefault.ts |  19 +
255 .../nodeModulesConditionalPackageExports.ts   | 124 +++++
256 ...tionEmitDynamicImportWithPackageExports.ts |  71 +++
257 ...odulesDeclarationEmitWithPackageExports.ts |  93 ++++
258 .../node/nodeModulesDynamicImport.ts          |  24 +
259 .../node/nodeModulesExportAssignments.ts      |  20 +
260 ...ModulesExportsBlocksSpecifierResolution.ts |  27 +
261 ...lesExportsSpecifierGenerationConditions.ts |  34 ++
262 ...ulesExportsSpecifierGenerationDirectory.ts |  29 ++
263 ...odulesExportsSpecifierGenerationPattern.ts |  29 ++
264 .../node/nodeModulesForbidenSyntax.ts         |  67 +++
265 .../nodeModulesGeneratedNameCollisions.ts     |  26 +
266 .../node/nodeModulesImportAssertions.ts       |  13 +
267 .../node/nodeModulesImportAssignments.ts      |  31 ++
268 .../nodeModulesImportHelpersCollisions.ts     |  31 ++
269 .../nodeModulesImportHelpersCollisions2.ts    |  27 +
270 .../nodeModulesImportHelpersCollisions3.ts    |  25 +
271 .../conformance/node/nodeModulesImportMeta.ts |  20 +
272 .../nodeModulesImportResolutionIntoExport.ts  |  24 +
273 .../nodeModulesImportResolutionNoCycle.ts     |  24 +
274 .../node/nodeModulesPackageExports.ts         |  90 ++++
275 .../node/nodeModulesPackageImports.ts         |  38 ++
276 .../node/nodeModulesPackagePatternExports.ts  |  67 +++
277 ...odeModulesPackagePatternExportsTrailers.ts |  67 +++
278 .../node/nodeModulesResolveJsonModule.ts      |  29 ++
279 .../node/nodeModulesSynchronousCallErrors.ts  |  34 ++
280 .../node/nodeModulesTopLevelAwait.ts          |  22 +
281 .../nodeModulesTypesVersionPackageExports.ts  |  53 ++
282 .../conformance/node/nodePackageSelfName.ts   |  21 +
283 .../node/nodePackageSelfNameScoped.ts         |  21 +
284 .../cases/conformance/override/override10.ts  |   3 +-
285 .../cases/conformance/override/override12.ts  |   1 +
286 .../cases/conformance/override/override15.ts  |   9 +
287 .../cases/conformance/override/override16.ts  |   1 +
288 .../cases/conformance/override/override17.ts  |   1 +
289 .../cases/conformance/override/override18.ts  |   1 +
290 .../cases/conformance/override/override19.ts  |  20 +
291 .../cases/conformance/override/override20.ts  |  34 ++
292 .../conformance/override/override_js1.ts      |   4 +-
293 .../conformance/override/override_js4.ts      |  14 +
294 .../parserClassDeclaration16.ts               |   3 +-
295 .../parserClassDeclaration17.ts               |   1 +
296 .../parserClassDeclaration19.ts               |   3 +-
297 .../parserClassDeclaration20.ts               |   3 +-
298 .../parserClassDeclaration23.ts               |   3 +-
299 .../parserClassDeclaration26.ts               |   3 +-
300 .../parserClassDeclarationIndexSignature1.ts  |   3 +-
301 .../parserConstructorDeclaration1.ts          |   3 +-
302 .../parserConstructorDeclaration5.ts          |   3 +-
303 .../parserAccessibilityAfterStatic11.ts       |   1 +
304 .../parserAccessibilityAfterStatic14.ts       |   1 +
305 .../parserAccessibilityAfterStatic2.ts        |   1 +
306 .../parserAccessibilityAfterStatic3.ts        |   1 +
307 .../parserAccessibilityAfterStatic4.ts        |   1 +
308 .../parserAccessibilityAfterStatic5.ts        |   1 +
309 .../Generics/parserGenericClass1.ts           |   3 +-
310 .../Generics/parserGenericClass2.ts           |   3 +-
311 .../Generics/parserGenericConstraint1.ts      |   3 +-
312 .../parserIndexMemberDeclaration1.ts          |   3 +-
313 .../parserIndexMemberDeclaration2.ts          |   3 +-
314 .../parserIndexMemberDeclaration3.ts          |   3 +-
315 .../parserIndexMemberDeclaration4.ts          |   3 +-
316 .../parserIndexMemberDeclaration6.ts          |   3 +-
317 .../parserMemberVariableDeclaration5.ts       |   3 +-
318 .../ecmascript5/Protected/Protected3.ts       |   3 +-
319 .../ecmascript5/Protected/Protected5.ts       |   3 +-
320 .../ecmascript5/Protected/Protected9.ts       |   3 +-
321 .../RegressionTests/parser509546.ts           |   1 +
322 .../RegressionTests/parser509546_1.ts         |   1 +
323 .../RegressionTests/parser509546_2.ts         |   1 +
324 .../parser/ecmascript5/parserUnicode3.ts      |   3 +-
325 .../Iterators/parserForOfStatement22.ts       |   4 +
326 .../Iterators/parserForOfStatement23.ts       |   6 +
327 .../Iterators/parserForOfStatement24.ts       |   4 +
328 .../inferringClassMembersFromAssignments3.ts  |   1 +
329 .../conformance/salsa/plainJSBinderErrors.ts  |  44 ++
330 .../conformance/salsa/plainJSRedeclare.ts     |   6 +
331 .../conformance/salsa/plainJSRedeclare2.ts    |   7 +
332 .../conformance/salsa/plainJSRedeclare3.ts    |   7 +
333 .../salsa/plainJSReservedStrict.ts            |   7 +
334 .../conformance/salsa/spellingUncheckedJS.ts  |  51 ++
335 .../salsa/typeFromJSInitializer2.ts           |  18 +
336 .../salsa/typeFromJSInitializer3.ts           |  18 +
337 .../salsa/typeFromJSInitializer4.ts           |  29 ++
338 .../salsa/typeFromPropertyAssignment23.ts     |   3 +
339 .../for-inStatementsAsyncIdentifier.ts        |   4 +
340 .../returnStatements/returnStatements.ts      |   1 +
341 .../throwInEnclosingStatements.ts             |   1 +
342 .../types/any/anyAsGenericFunctionCall.ts     |   4 +-
343 .../types/any/assignAnyToEveryType.ts         |   4 +-
344 .../types/any/assignEveryTypeToAny.ts         |   4 +-
345 .../conformance/types/conditional/variance.ts |   2 +
346 ...tatedFunctionInferenceWithTypeParameter.ts |   3 +
347 .../types/import/importTypeAmbient.ts         |   5 +-
348 .../types/import/importTypeGenericTypes.ts    |   5 +-
349 .../types/import/importTypeLocal.ts           |   5 +
350 .../intersectionOfUnionNarrowing.ts           |  16 +
351 .../types/keyof/keyofAndIndexedAccess.ts      |  20 +
352 .../types/literal/literalTypes2.ts            |   3 +
353 .../types/localTypes/localTypes2.ts           |   3 +
354 .../types/localTypes/localTypes3.ts           |   3 +
355 .../mapped/mappedTypeAsClauseRelationships.ts |  27 +
356 .../types/mapped/mappedTypeProperties.ts      |  42 ++
357 .../conformance/types/mapped/mappedTypes3.ts  |   4 +-
358 .../types/mapped/mappedTypesAndObjects.ts     |   2 +
359 .../members/classWithProtectedProperty.ts     |   4 +-
360 .../types/members/indexSignatures1.ts         | 325 ++++++++++++
361 .../objectTypeHidingMembersOfObject.ts        |   4 +-
362 .../types/members/objectTypePropertyAccess.ts |   2 +
363 .../members/objectTypeWithNumericProperty.ts  |   4 +-
364 ...hStringNamedPropertyOfIllegalCharacters.ts |   2 +
365 .../typesWithSpecializedCallSignatures.ts     |   5 +-
366 ...typesWithSpecializedConstructSignatures.ts |   5 +-
367 .../namedTypes/classWithOptionalParameter.ts  |   5 +-
368 .../types/namedTypes/optionalMethods.ts       |   3 +
369 .../conformance/types/never/neverType.ts      |   2 +
370 ...ureWithoutReturnTypeAnnotationInference.ts |   6 +-
371 .../callSignaturesWithDuplicateParameters.ts  |   4 +-
372 .../callSignaturesWithOptionalParameters.ts   |   2 +
373 .../callSignaturesWithOptionalParameters2.ts  |   4 +-
374 .../parametersWithNoAnnotationAreAny.ts       |   4 +-
375 ...reIsNotSubtypeOfNonSpecializedSignature.ts |   3 +
376 ...atureIsSubtypeOfNonSpecializedSignature.ts |   3 +
377 ...gLiteralTypesInImplementationSignatures.ts |   2 +
378 .../typeParameterAsTypeArgument.ts            |   4 +-
379 ...WithOverloadsThatDifferOnlyByReturnType.ts |   5 +-
380 .../indexSignatures/numericIndexingResults.ts |   4 +-
381 .../indexSignatures/stringIndexingResults.ts  |   2 +
382 .../propertyNameWithoutTypeAnnotation.ts      |   4 +-
383 .../propertyNamesOfReservedWords.ts           |   4 +-
384 .../stringNamedPropertyAccess.ts              |   4 +-
385 .../number/extendNumberInterface.ts           |   2 +-
386 .../undefined/invalidUndefinedValues.ts       |   4 +-
387 .../undefined/validUndefinedAssignments.ts    |   4 +-
388 .../types/rest/objectRestParameter.ts         |   1 +
389 .../typeLiterals/arrayOfFunctionTypes3.ts     |   4 +-
390 .../functionLiteralForOverloads2.ts           |   5 +-
391 .../typeQueries/typeQueryOnClass.ts           |   5 +-
392 .../typeQueries/typeQueryWithReservedWords.ts |   1 +
393 .../typeQueries/typeofClass2.ts               |   5 +-
394 .../typeQueries/typeofModuleWithoutExports.ts |   3 +-
395 .../specifyingTypes/typeQueries/typeofThis.ts | 146 ++++++
396 .../typeQueries/typeofThisWithImplicitThis.ts |   5 +
397 .../types/spread/spreadDuplicate.ts           |  21 +
398 .../types/spread/spreadDuplicateExact.ts      |  22 +
399 .../conformance/types/spread/spreadUnion4.ts  |   4 +
400 .../types/thisType/fluentClasses.ts           |   2 +
401 .../types/thisType/thisTypeAndConstraints.ts  |   3 +
402 .../types/thisType/thisTypeInClasses.ts       |   6 +
403 .../types/thisType/thisTypeInFunctions3.ts    |   3 +
404 .../thisType/thisTypeInTaggedTemplateCall.ts  |  10 +
405 .../types/tuple/readonlyArraysAndTuples2.ts   |   2 +
406 .../circularTypeAliasForUnionWithClass.ts     |   4 +
407 .../classDoesNotDependOnBaseTypes.ts          |   4 +-
408 .../types/typeAliases/typeAliases.ts          |   4 +-
409 ...allGenericFunctionWithZeroTypeArguments.ts |   5 +-
410 .../functionConstraintSatisfaction.ts         |   5 +-
411 .../functionConstraintSatisfaction3.ts        |   5 +-
412 .../innerTypeParameterShadowingOuterOne2.ts   |   4 +-
413 ...rtyAccessOnTypeParameterWithConstraints.ts |   3 +-
414 ...tyAccessOnTypeParameterWithConstraints2.ts |   7 +-
415 ...tyAccessOnTypeParameterWithConstraints3.ts |   4 +-
416 ...AccessOnTypeParameterWithoutConstraints.ts |   4 +-
417 .../typeParameterUsedAsConstraint.ts          |   7 +
418 .../anyAssignabilityInInheritance.ts          |   6 +-
419 .../anyAssignableToEveryType.ts               |   1 +
420 .../anyAssignableToEveryType2.ts              |   3 +
421 .../assignmentCompatWithObjectMembers.ts      |   5 +-
422 .../assignmentCompatWithObjectMembers2.ts     |   2 +
423 .../assignmentCompatWithObjectMembers3.ts     |   2 +
424 ...mentCompatWithObjectMembersNumericNames.ts |   2 +
425 ...allSignatureAssignabilityInInheritance2.ts |   6 +-
426 ...allSignatureAssignabilityInInheritance4.ts |   6 +-
427 ...allSignatureAssignabilityInInheritance5.ts |   5 +-
428 ...uctSignatureAssignabilityInInheritance2.ts |   6 +-
429 ...uctSignatureAssignabilityInInheritance4.ts |   5 +-
430 ...uctSignatureAssignabilityInInheritance5.ts |   5 +-
431 .../everyTypeAssignableToAny.ts               |   2 +
432 .../nullAssignableToEveryType.ts              |   2 +-
433 .../undefinedAssignableToEveryType.ts         |   1 +
434 .../bestCommonTypeOfConditionalExpressions.ts |   5 +-
435 ...bestCommonTypeOfConditionalExpressions2.ts |   4 +-
436 .../heterogeneousArrayLiterals.ts             |   2 +
437 .../narrowingConstrainedTypeVariable.ts       |   3 +
438 .../arrayLiteralsWithRecursiveGenerics.ts     |   6 +-
439 .../recursiveTypeInGenericConstraint.ts       |   5 +-
440 .../recursiveTypesUsedAsFunctionParameters.ts |   5 +-
441 .../nullIsSubtypeOfEverythingButUndefined.ts  |   4 +
442 .../stringLiteralTypeIsSubtypeOfString.ts     |   4 +-
443 .../subtypesAndSuperTypes/subtypesOfAny.ts    |   5 +-
444 ...subtypesOfTypeParameterWithConstraints2.ts |   5 +-
445 .../subtypingWithCallSignatures2.ts           |   6 +
446 .../subtypingWithCallSignatures3.ts           |   4 +
447 .../subtypingWithCallSignatures4.ts           |   6 +-
448 .../subtypingWithConstructSignatures2.ts      |   5 +
449 .../subtypingWithConstructSignatures3.ts      |   4 +
450 .../subtypingWithConstructSignatures4.ts      |   6 +-
451 .../subtypingWithConstructSignatures5.ts      |   6 +-
452 .../subtypingWithObjectMembers4.ts            |   6 +-
453 .../undefinedIsSubtypeOfEverything.ts         |  25 +
454 .../objectTypesIdentity.ts                    |   6 +-
455 .../objectTypesIdentity2.ts                   |   5 +-
456 .../objectTypesIdentityWithCallSignatures.ts  |   5 +-
457 .../objectTypesIdentityWithCallSignatures2.ts |   5 +-
458 ...yWithCallSignaturesDifferingParamCounts.ts |   5 +-
459 ...IdentityWithCallSignaturesWithOverloads.ts |   6 +-
460 ...ectTypesIdentityWithConstructSignatures.ts |   6 +-
461 ...ctTypesIdentityWithConstructSignatures2.ts |   4 +-
462 ...ConstructSignaturesDifferingParamCounts.ts |   4 +-
463 ...tTypesIdentityWithGenericCallSignatures.ts |   6 +-
464 ...TypesIdentityWithGenericCallSignatures2.ts |   6 +-
465 ...ricCallSignaturesDifferingByConstraints.ts |   6 +-
466 ...icCallSignaturesDifferingByConstraints2.ts |   6 +-
467 ...icCallSignaturesDifferingByConstraints3.ts |   9 +-
468 ...ericCallSignaturesDifferingByReturnType.ts |   5 +-
469 ...ricCallSignaturesDifferingByReturnType2.ts |   6 +-
470 ...lSignaturesDifferingTypeParameterCounts.ts |   6 +-
471 ...llSignaturesDifferingTypeParameterNames.ts |   5 +-
472 ...WithGenericCallSignaturesOptionalParams.ts |   5 +-
473 ...ithGenericCallSignaturesOptionalParams2.ts |   5 +-
474 ...ithGenericCallSignaturesOptionalParams3.ts |   6 +-
475 ...nstructSignaturesDifferingByConstraints.ts |   2 +
476 ...structSignaturesDifferingByConstraints2.ts |   7 +-
477 ...structSignaturesDifferingByConstraints3.ts |   7 +-
478 ...onstructSignaturesDifferingByReturnType.ts |   4 +-
479 ...nstructSignaturesDifferingByReturnType2.ts |   6 +-
480 ...tSignaturesDifferingTypeParameterCounts.ts |   4 +-
481 ...ctSignaturesDifferingTypeParameterNames.ts |   6 +-
482 ...enericConstructSignaturesOptionalParams.ts |   5 +-
483 ...nericConstructSignaturesOptionalParams2.ts |   5 +-
484 ...nericConstructSignaturesOptionalParams3.ts |   4 +-
485 ...objectTypesIdentityWithNumericIndexers1.ts |   3 +
486 ...objectTypesIdentityWithNumericIndexers2.ts |   5 +
487 ...objectTypesIdentityWithNumericIndexers3.ts |   3 +
488 .../objectTypesIdentityWithOptionality.ts     |   6 +-
489 .../objectTypesIdentityWithPrivates.ts        |   4 +-
490 .../objectTypesIdentityWithPrivates2.ts       |   1 +
491 .../objectTypesIdentityWithPublics.ts         |   5 +-
492 .../objectTypesIdentityWithStringIndexers.ts  |   3 +
493 .../objectTypesIdentityWithStringIndexers2.ts |   5 +
494 .../typeParametersAreIdenticalToThemselves.ts |   4 +-
495 ...allWithConstraintsTypeArgumentInference.ts |   3 +
496 .../genericCallWithFunctionTypedArguments4.ts |   4 +-
497 .../genericCallWithObjectTypeArgs2.ts         |   4 +-
498 ...ricCallWithObjectTypeArgsAndConstraints.ts |  10 +-
499 ...icCallWithObjectTypeArgsAndConstraints2.ts |   1 +
500 ...icClassWithObjectTypeArgsAndConstraints.ts |   7 +-
501 .../keyofInferenceLowerPriorityThanReturn.ts  |   4 +
502 .../types/union/discriminatedUnionTypes3.ts   |  19 +
503 497 files changed, 8097 insertions(+), 197 deletions(-)
504 create mode 100644 tests/cases/conformance/ambient/ambientDeclarationsPatterns/ambientDeclarationsPatterns.ts
505 create mode 100644 tests/cases/conformance/ambient/ambientDeclarationsPatterns/declarations.d.ts
506 create mode 100644 tests/cases/conformance/ambient/ambientShorthand_merging/ambientShorthand_merging.ts
507 create mode 100644 tests/cases/conformance/ambient/ambientShorthand_merging/declarations1.d.ts
508 create mode 100644 tests/cases/conformance/ambient/ambientShorthand_merging/declarations2.d.ts
509 create mode 100644 tests/cases/conformance/ambient/ambientShorthand_reExport/ambientShorthand_reExport.ts
510 create mode 100644 tests/cases/conformance/ambient/ambientShorthand_reExport/declarations.d.ts
511 create mode 100644 tests/cases/conformance/ambient/ambientShorthand_reExport/jquery.d.ts
512 create mode 100644 tests/cases/conformance/ambient/ambientShorthand_reExport/reExportAll.ts
513 create mode 100644 tests/cases/conformance/ambient/ambientShorthand_reExport/reExportX.ts
514 create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts
515 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock1.ts
516 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock10.ts
517 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock11.ts
518 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock12.ts
519 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock13.ts
520 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock14.ts
521 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock15.ts
522 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock16.ts
523 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock17.ts
524 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock18.ts
525 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock19.ts
526 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock2.ts
527 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock20.ts
528 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock21.ts
529 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock22.ts
530 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock23.ts
531 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock24.ts
532 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock25.ts
533 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock26.ts
534 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock27.ts
535 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock3.ts
536 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock4.ts
537 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock5.ts
538 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock6.ts
539 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock7.ts
540 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock8.ts
541 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlock9.ts
542 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef1.ts
543 create mode 100644 tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef2.ts
544 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/superInStaticMembers1.ts
545 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers1.ts
546 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers2.ts
547 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers3.ts
548 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers4.ts
549 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers10.ts
550 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers11.ts
551 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers12.ts
552 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers13.ts
553 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers3.ts
554 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers4.ts
555 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers5.ts
556 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers6.ts
557 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers7.ts
558 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers8.ts
559 create mode 100644 tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers9.ts
560 create mode 100644 tests/cases/conformance/classes/members/privateNames/privateNameHashCharName.ts
561 create mode 100644 tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts
562 create mode 100644 tests/cases/conformance/classes/members/privateNames/privateNameInInExpressionTransform.ts
563 create mode 100644 tests/cases/conformance/classes/members/privateNames/privateNameInInExpressionUnused.ts
564 create mode 100644 tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiersJs.ts
565 create mode 100644 tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts
566 create mode 100644 tests/cases/conformance/controlFlow/assertionTypePredicates2.ts
567 create mode 100644 tests/cases/conformance/controlFlow/controlFlowAliasing.ts
568 create mode 100644 tests/cases/conformance/controlFlow/controlFlowAliasingCatchVariables.ts
569 create mode 100644 tests/cases/conformance/controlFlow/controlFlowForInStatement2.ts
570 create mode 100644 tests/cases/conformance/controlFlow/controlFlowInOperator.ts
571 create mode 100644 tests/cases/conformance/controlFlow/controlFlowTypeofObject.ts
572 create mode 100644 tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts
573 create mode 100644 tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/fs.d.ts
574 create mode 100644 tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/main.ts
575 create mode 100644 tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/package.json
576 create mode 100644 tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/typeReferenceRelatedFiles.ts
577 create mode 100644 tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter5.ts
578 create mode 100644 tests/cases/conformance/decorators/class/decoratedBlockScopedClass1.ts
579 create mode 100644 tests/cases/conformance/decorators/class/decoratedBlockScopedClass2.ts
580 create mode 100644 tests/cases/conformance/decorators/class/decoratedBlockScopedClass3.ts
581 create mode 100644 tests/cases/conformance/decorators/class/method/decoratorOnClassMethod14.ts
582 create mode 100644 tests/cases/conformance/decorators/class/method/decoratorOnClassMethod15.ts
583 create mode 100644 tests/cases/conformance/decorators/class/method/decoratorOnClassMethod16.ts
584 create mode 100644 tests/cases/conformance/decorators/class/method/decoratorOnClassMethod17.ts
585 create mode 100644 tests/cases/conformance/decorators/class/method/decoratorOnClassMethod18.ts
586 create mode 100644 tests/cases/conformance/decorators/decoratorMetadataWithTypeOnlyImport2.ts
587 create mode 100644 tests/cases/conformance/es2018/es2018IntlAPIs.ts
588 create mode 100644 tests/cases/conformance/es2020/es2020IntlAPIs.ts
589 create mode 100644 tests/cases/conformance/es6/spread/arraySpreadImportHelpers.ts
590 create mode 100644 tests/cases/conformance/es6/templates/templateStringWithCommentsInArrowFunction.ts
591 create mode 100644 tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIntersectionType.ts
592 create mode 100644 tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts
593 create mode 100644 tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts
594 create mode 100644 tests/cases/conformance/externalModules/moduleResolutionWithoutExtension2.ts
595 create mode 100644 tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts
596 create mode 100644 tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts
597 create mode 100644 tests/cases/conformance/externalModules/moduleResolutionWithoutExtension5.ts
598 create mode 100644 tests/cases/conformance/externalModules/moduleResolutionWithoutExtension6.ts
599 create mode 100644 tests/cases/conformance/externalModules/moduleResolutionWithoutExtension7.ts
600 create mode 100644 tests/cases/conformance/externalModules/moduleResolutionWithoutExtension8.ts
601 create mode 100644 tests/cases/conformance/externalModules/typeOnly/exportSpecifiers.ts
602 create mode 100644 tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType/a.ts
603 create mode 100644 tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.ts
604 create mode 100644 tests/cases/conformance/externalModules/typeOnly/importSpecifiers1.ts
605 create mode 100644 tests/cases/conformance/externalModules/typeOnly/preserveValueImports.ts
606 create mode 100644 tests/cases/conformance/externalModules/typeOnly/preserveValueImports_errors.ts
607 create mode 100644 tests/cases/conformance/externalModules/typeOnly/preserveValueImports_importsNotUsedAsValues.ts
608 create mode 100644 tests/cases/conformance/externalModules/typeOnly/preserveValueImports_mixedImports.ts
609 create mode 100644 tests/cases/conformance/externalModules/typeOnly/preserveValueImports_module.ts
610 create mode 100644 tests/cases/conformance/importAssertion/importAssertion1.ts
611 create mode 100644 tests/cases/conformance/importAssertion/importAssertion2.ts
612 create mode 100644 tests/cases/conformance/importAssertion/importAssertion3.ts
613 create mode 100644 tests/cases/conformance/importAssertion/importAssertion4.ts
614 create mode 100644 tests/cases/conformance/importAssertion/importAssertion5.ts
615 create mode 100644 tests/cases/conformance/jsdoc/enumTagImported/enumTagImported.ts
616 create mode 100644 tests/cases/conformance/jsdoc/jsdocAugments_qualifiedName/jsdocAugments_qualifiedName.ts
617 create mode 100644 tests/cases/conformance/jsdoc/jsdocTemplateTagDefault.ts
618 create mode 100644 tests/cases/conformance/jsdoc/jsdocTemplateTagNameResolution.ts
619 create mode 100644 tests/cases/conformance/jsdoc/jsdocVariadicType.ts
620 create mode 100644 tests/cases/conformance/jsdoc/seeTag3.ts
621 create mode 100644 tests/cases/conformance/jsdoc/thisTag2.ts
622 create mode 100644 tests/cases/conformance/jsx/jsxParsingError4.tsx
623 create mode 100644 tests/cases/conformance/jsx/jsxUnclosedParserRecovery.ts
624 create mode 100644 tests/cases/conformance/jsx/tsxReactEmitSpreadAttribute.ts
625 create mode 100644 tests/cases/conformance/moduleResolution/declarationNotFoundPackageBundlesTypes.ts
626 create mode 100644 tests/cases/conformance/moduleResolution/scopedPackages/index.d.ts
627 create mode 100644 tests/cases/conformance/moduleResolution/scopedPackages/scopedPackages.ts
628 create mode 100644 tests/cases/conformance/moduleResolution/scopedPackages/z.d.ts
629 create mode 100644 tests/cases/conformance/moduleResolution/scopedPackagesClassic/index.d.ts
630 create mode 100644 tests/cases/conformance/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.ts
631 create mode 100644 tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs/untypedModuleImport_allowJs.ts
632 create mode 100644 tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient/declarations.d.ts
633 create mode 100644 tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient/untypedModuleImport_vsAmbient.ts
634 create mode 100644 tests/cases/conformance/node/allowJs/nodeAllowJsPackageSelfName.ts
635 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJs1.ts
636 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsCjsFromJs.ts
637 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsConditionalPackageExports.ts
638 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsDynamicImport.ts
639 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts
640 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsGeneratedNameCollisions.ts
641 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportAssignment.ts
642 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions1.ts
643 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts
644 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions3.ts
645 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportMeta.ts
646 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageExports.ts
647 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageImports.ts
648 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExports.ts
649 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsTrailers.ts
650 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsSynchronousCallErrors.ts
651 create mode 100644 tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts
652 create mode 100644 tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts
653 create mode 100644 tests/cases/conformance/node/nodeModules1.ts
654 create mode 100644 tests/cases/conformance/node/nodeModulesCjsFormatFileAlwaysHasDefault.ts
655 create mode 100644 tests/cases/conformance/node/nodeModulesConditionalPackageExports.ts
656 create mode 100644 tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts
657 create mode 100644 tests/cases/conformance/node/nodeModulesDeclarationEmitWithPackageExports.ts
658 create mode 100644 tests/cases/conformance/node/nodeModulesDynamicImport.ts
659 create mode 100644 tests/cases/conformance/node/nodeModulesExportAssignments.ts
660 create mode 100644 tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts
661 create mode 100644 tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts
662 create mode 100644 tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts
663 create mode 100644 tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts
664 create mode 100644 tests/cases/conformance/node/nodeModulesForbidenSyntax.ts
665 create mode 100644 tests/cases/conformance/node/nodeModulesGeneratedNameCollisions.ts
666 create mode 100644 tests/cases/conformance/node/nodeModulesImportAssertions.ts
667 create mode 100644 tests/cases/conformance/node/nodeModulesImportAssignments.ts
668 create mode 100644 tests/cases/conformance/node/nodeModulesImportHelpersCollisions.ts
669 create mode 100644 tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts
670 create mode 100644 tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts
671 create mode 100644 tests/cases/conformance/node/nodeModulesImportMeta.ts
672 create mode 100644 tests/cases/conformance/node/nodeModulesImportResolutionIntoExport.ts
673 create mode 100644 tests/cases/conformance/node/nodeModulesImportResolutionNoCycle.ts
674 create mode 100644 tests/cases/conformance/node/nodeModulesPackageExports.ts
675 create mode 100644 tests/cases/conformance/node/nodeModulesPackageImports.ts
676 create mode 100644 tests/cases/conformance/node/nodeModulesPackagePatternExports.ts
677 create mode 100644 tests/cases/conformance/node/nodeModulesPackagePatternExportsTrailers.ts
678 create mode 100644 tests/cases/conformance/node/nodeModulesResolveJsonModule.ts
679 create mode 100644 tests/cases/conformance/node/nodeModulesSynchronousCallErrors.ts
680 create mode 100644 tests/cases/conformance/node/nodeModulesTopLevelAwait.ts
681 create mode 100644 tests/cases/conformance/node/nodeModulesTypesVersionPackageExports.ts
682 create mode 100644 tests/cases/conformance/node/nodePackageSelfName.ts
683 create mode 100644 tests/cases/conformance/node/nodePackageSelfNameScoped.ts
684 create mode 100644 tests/cases/conformance/override/override15.ts
685 create mode 100644 tests/cases/conformance/override/override19.ts
686 create mode 100644 tests/cases/conformance/override/override20.ts
687 create mode 100644 tests/cases/conformance/override/override_js4.ts
688 create mode 100644 tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement22.ts
689 create mode 100644 tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement23.ts
690 create mode 100644 tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement24.ts
691 create mode 100644 tests/cases/conformance/salsa/plainJSBinderErrors.ts
692 create mode 100644 tests/cases/conformance/salsa/plainJSRedeclare.ts
693 create mode 100644 tests/cases/conformance/salsa/plainJSRedeclare2.ts
694 create mode 100644 tests/cases/conformance/salsa/plainJSRedeclare3.ts
695 create mode 100644 tests/cases/conformance/salsa/plainJSReservedStrict.ts
696 create mode 100644 tests/cases/conformance/salsa/spellingUncheckedJS.ts
697 create mode 100644 tests/cases/conformance/salsa/typeFromJSInitializer2.ts
698 create mode 100644 tests/cases/conformance/salsa/typeFromJSInitializer3.ts
699 create mode 100644 tests/cases/conformance/salsa/typeFromJSInitializer4.ts
700 create mode 100644 tests/cases/conformance/statements/for-inStatements/for-inStatementsAsyncIdentifier.ts
701 create mode 100644 tests/cases/conformance/types/intersection/intersectionOfUnionNarrowing.ts
702 create mode 100644 tests/cases/conformance/types/mapped/mappedTypeAsClauseRelationships.ts
703 create mode 100644 tests/cases/conformance/types/mapped/mappedTypeProperties.ts
704 create mode 100644 tests/cases/conformance/types/members/indexSignatures1.ts
705 create mode 100644 tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts
706 create mode 100644 tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThisWithImplicitThis.ts
707 create mode 100644 tests/cases/conformance/types/spread/spreadDuplicate.ts
708 create mode 100644 tests/cases/conformance/types/spread/spreadDuplicateExact.ts
709 create mode 100644 tests/cases/conformance/types/spread/spreadUnion4.ts
710 create mode 100644 tests/cases/conformance/types/thisType/thisTypeInTaggedTemplateCall.ts
711 create mode 100644 tests/cases/conformance/types/union/discriminatedUnionTypes3.ts
712
713diff --git a/tests/cases/conformance/ambient/ambientDeclarations.ts b/tests/cases/conformance/ambient/ambientDeclarations.ts
714index 379f5a5440..156ca565af 100644
715--- a/tests/cases/conformance/ambient/ambientDeclarations.ts
716+++ b/tests/cases/conformance/ambient/ambientDeclarations.ts
717@@ -73,3 +73,4 @@ declare module 'external1' {
718     var q;
719 }
720 
721+let qq2 = new cls();
722\ No newline at end of file
723diff --git a/tests/cases/conformance/ambient/ambientDeclarationsPatterns/ambientDeclarationsPatterns.ts b/tests/cases/conformance/ambient/ambientDeclarationsPatterns/ambientDeclarationsPatterns.ts
724new file mode 100644
725index 0000000000..8b2be7e0b2
726--- /dev/null
727+++ b/tests/cases/conformance/ambient/ambientDeclarationsPatterns/ambientDeclarationsPatterns.ts
728@@ -0,0 +1,11 @@
729+// @Filename: user.ts
730+///<reference path="declarations.d.ts" />
731+import {foo, baz} from "foobarbaz";
732+foo(baz);
733+
734+import {foos} from "foosball";
735+foo(foos);
736+
737+// Works with relative file name
738+import fileText from "./file!text";
739+foo(fileText);
740\ No newline at end of file
741diff --git a/tests/cases/conformance/ambient/ambientDeclarationsPatterns/declarations.d.ts b/tests/cases/conformance/ambient/ambientDeclarationsPatterns/declarations.d.ts
742new file mode 100644
743index 0000000000..725593c54e
744--- /dev/null
745+++ b/tests/cases/conformance/ambient/ambientDeclarationsPatterns/declarations.d.ts
746@@ -0,0 +1,18 @@
747+// @Filename: declarations.d.ts
748+declare module "foo*baz" {
749+    export function foo(s: string): void;
750+}
751+// Augmentations still work
752+declare module "foo*baz" {
753+    export const baz: string;
754+}
755+
756+// Longest prefix wins
757+declare module "foos*" {
758+    export const foos: string;
759+}
760+
761+declare module "*!text" {
762+    const x: string;
763+    export default x;
764+}
765diff --git a/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts b/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts
766index e2f24113c9..d07ac13995 100644
767--- a/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts
768+++ b/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts
769@@ -4,6 +4,7 @@ module M {
770     export declare class C { }
771     export declare enum E { }
772     export declare module M { }
773+    let qq1 = new C();
774 }
775 
776 module M2 {
777@@ -12,4 +13,5 @@ module M2 {
778     declare class C { }
779     declare enum E { }
780     declare module M { }
781+    let qq1 = new C();
782 }
783\ No newline at end of file
784diff --git a/tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts b/tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts
785index dbdc315c74..3e1e4bfa35 100644
786--- a/tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts
787+++ b/tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts
788@@ -3,4 +3,6 @@ export declare var x;
789 export declare function f();
790 export declare class C { }
791 export declare enum E { }
792-export declare module M { }
793\ No newline at end of file
794+export declare module M { }
795+
796+let qq1 = new C();
797diff --git a/tests/cases/conformance/ambient/ambientShorthand_merging/ambientShorthand_merging.ts b/tests/cases/conformance/ambient/ambientShorthand_merging/ambientShorthand_merging.ts
798new file mode 100644
799index 0000000000..a52d4c04bf
800--- /dev/null
801+++ b/tests/cases/conformance/ambient/ambientShorthand_merging/ambientShorthand_merging.ts
802@@ -0,0 +1,6 @@
803+// @Filename: user.ts
804+///<reference path="declarations1.d.ts" />
805+///<reference path="declarations1.d.ts" />
806+import foo, {bar} from "foo";
807+foo;
808+bar;
809diff --git a/tests/cases/conformance/ambient/ambientShorthand_merging/declarations1.d.ts b/tests/cases/conformance/ambient/ambientShorthand_merging/declarations1.d.ts
810new file mode 100644
811index 0000000000..66bdaa0fc8
812--- /dev/null
813+++ b/tests/cases/conformance/ambient/ambientShorthand_merging/declarations1.d.ts
814@@ -0,0 +1,2 @@
815+// @Filename: declarations1.d.ts
816+declare module "foo";
817diff --git a/tests/cases/conformance/ambient/ambientShorthand_merging/declarations2.d.ts b/tests/cases/conformance/ambient/ambientShorthand_merging/declarations2.d.ts
818new file mode 100644
819index 0000000000..ff7233979a
820--- /dev/null
821+++ b/tests/cases/conformance/ambient/ambientShorthand_merging/declarations2.d.ts
822@@ -0,0 +1,4 @@
823+// @Filename: declarations2.d.ts
824+declare module "foo" {
825+    export const bar: number;
826+}
827\ No newline at end of file
828diff --git a/tests/cases/conformance/ambient/ambientShorthand_reExport/ambientShorthand_reExport.ts b/tests/cases/conformance/ambient/ambientShorthand_reExport/ambientShorthand_reExport.ts
829new file mode 100644
830index 0000000000..45ba9cd111
831--- /dev/null
832+++ b/tests/cases/conformance/ambient/ambientShorthand_reExport/ambientShorthand_reExport.ts
833@@ -0,0 +1,5 @@
834+// @Filename: reExportUser.ts
835+import {x} from "./reExportX";
836+import * as $ from "./reExportAll";
837+// '$' is not callable, it is an object.
838+x($);
839diff --git a/tests/cases/conformance/ambient/ambientShorthand_reExport/declarations.d.ts b/tests/cases/conformance/ambient/ambientShorthand_reExport/declarations.d.ts
840new file mode 100644
841index 0000000000..58d1d8215b
842--- /dev/null
843+++ b/tests/cases/conformance/ambient/ambientShorthand_reExport/declarations.d.ts
844@@ -0,0 +1,2 @@
845+// @Filename: declarations.d.ts
846+declare module "jquery";
847\ No newline at end of file
848diff --git a/tests/cases/conformance/ambient/ambientShorthand_reExport/jquery.d.ts b/tests/cases/conformance/ambient/ambientShorthand_reExport/jquery.d.ts
849new file mode 100644
850index 0000000000..58d1d8215b
851--- /dev/null
852+++ b/tests/cases/conformance/ambient/ambientShorthand_reExport/jquery.d.ts
853@@ -0,0 +1,2 @@
854+// @Filename: declarations.d.ts
855+declare module "jquery";
856\ No newline at end of file
857diff --git a/tests/cases/conformance/ambient/ambientShorthand_reExport/reExportAll.ts b/tests/cases/conformance/ambient/ambientShorthand_reExport/reExportAll.ts
858new file mode 100644
859index 0000000000..ae6c5d4864
860--- /dev/null
861+++ b/tests/cases/conformance/ambient/ambientShorthand_reExport/reExportAll.ts
862@@ -0,0 +1,2 @@
863+// @Filename: reExportAll.ts
864+export * from "jquery";
865\ No newline at end of file
866diff --git a/tests/cases/conformance/ambient/ambientShorthand_reExport/reExportX.ts b/tests/cases/conformance/ambient/ambientShorthand_reExport/reExportX.ts
867new file mode 100644
868index 0000000000..07420e1616
869--- /dev/null
870+++ b/tests/cases/conformance/ambient/ambientShorthand_reExport/reExportX.ts
871@@ -0,0 +1,2 @@
872+// @Filename: reExportX.ts
873+export {x} from "jquery";
874\ No newline at end of file
875diff --git a/tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts b/tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts
876index c89369d02b..9f7e496b8a 100644
877--- a/tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts
878+++ b/tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts
879@@ -55,3 +55,4 @@ class B extends A {
880         ({ f: super["x"] } = { f });
881     }
882 }
883+let b1 = new B();
884diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts
885new file mode 100644
886index 0000000000..31c1c4055c
887--- /dev/null
888+++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts
889@@ -0,0 +1,49 @@
890+// @target: esnext
891+
892+function f_let () {
893+    let await = 1
894+}
895+
896+function f1_var () {
897+    var await = 1
898+}
899+
900+function f1_const () {
901+    const await = 1
902+}
903+
904+async function f2_let () {
905+    let await = 1
906+}
907+
908+async function f2_var () {
909+    var await = 1
910+}
911+
912+async function f2_const () {
913+    const await = 1
914+}
915+
916+function f3_let () {
917+    let yield = 2
918+}
919+
920+function f3_var () {
921+    var yield = 2
922+}
923+
924+function f3_const () {
925+    const yield = 2
926+}
927+
928+function * f4_let () {
929+    let yield = 2;
930+}
931+
932+function * f4_var () {
933+    var yield = 2;
934+}
935+
936+function * f4_const () {
937+    const yield = 2;
938+}
939\ No newline at end of file
940diff --git a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.ts b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.ts
941index 4c251a03c3..1a1aeedd41 100644
942--- a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.ts
943+++ b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.ts
944@@ -1,5 +1,5 @@
945 class abstract {
946     foo() { return 1; }
947 }
948-
949+let a = new abstract()
950 new abstract;
951\ No newline at end of file
952diff --git a/tests/cases/conformance/classes/classDeclarations/classBody/classWithEmptyBody.ts b/tests/cases/conformance/classes/classDeclarations/classBody/classWithEmptyBody.ts
953index 1a2e456e0f..5437d3a67d 100644
954--- a/tests/cases/conformance/classes/classDeclarations/classBody/classWithEmptyBody.ts
955+++ b/tests/cases/conformance/classes/classDeclarations/classBody/classWithEmptyBody.ts
956@@ -17,4 +17,6 @@ var d: D;
957 var o: {} = d;
958 d = 1;
959 d = { foo: '' }
960-d = () => { }
961\ No newline at end of file
962+d = () => { }
963+let cc = new C();
964+let dd = new D();
965\ No newline at end of file
966diff --git a/tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts b/tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts
967index efc3ccff9a..3184fc17d5 100644
968--- a/tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts
969+++ b/tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts
970@@ -1,3 +1,4 @@
971 function foo() {
972     class C { }
973+    let a1 = new C()
974 }
975\ No newline at end of file
976diff --git a/tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts b/tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts
977index 93daf743f8..1d496f4eaf 100644
978--- a/tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts
979+++ b/tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts
980@@ -3,4 +3,6 @@
981 class any { }
982 class number { }
983 class boolean { }
984-class string { }
985\ No newline at end of file
986+class string { }
987+
988+let aa = new any();
989\ No newline at end of file
990diff --git a/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement1.ts b/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement1.ts
991index 6571258d9d..5f049c27e3 100644
992--- a/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement1.ts
993+++ b/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement1.ts
994@@ -1,3 +1,4 @@
995 class C {
996     ;
997-}
998\ No newline at end of file
999+}
1000+let c9 = new C()
1001\ No newline at end of file
1002diff --git a/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement2.ts b/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement2.ts
1003index 716c8b58ae..511baa19f9 100644
1004--- a/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement2.ts
1005+++ b/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement2.ts
1006@@ -1,4 +1,5 @@
1007 class C {
1008     ;
1009     ;
1010-}
1011\ No newline at end of file
1012+}
1013+let a15 = new C()
1014\ No newline at end of file
1015diff --git a/tests/cases/conformance/classes/classExpressions/classExpression2.ts b/tests/cases/conformance/classes/classExpressions/classExpression2.ts
1016index 6365cd07eb..d39896a361 100644
1017--- a/tests/cases/conformance/classes/classExpressions/classExpression2.ts
1018+++ b/tests/cases/conformance/classes/classExpressions/classExpression2.ts
1019@@ -1,2 +1,4 @@
1020 class D { }
1021-var v = class C extends D {};
1022\ No newline at end of file
1023+var v = class C extends D {};
1024+let dd = new D()
1025+let vv = new v()
1026\ No newline at end of file
1027diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock1.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock1.ts
1028new file mode 100644
1029index 0000000000..dd9455ad8c
1030--- /dev/null
1031+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock1.ts
1032@@ -0,0 +1,11 @@
1033+// @target: esnext, es2015, es5
1034+const a = 2;
1035+
1036+class C {
1037+    static {
1038+        const a = 1;
1039+
1040+        a;
1041+    }
1042+}
1043+let  a1 = new C()
1044diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock10.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock10.ts
1045new file mode 100644
1046index 0000000000..aa82e1db13
1047--- /dev/null
1048+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock10.ts
1049@@ -0,0 +1,30 @@
1050+// @target: esnext, es2015, es5
1051+var a1 = 1;
1052+var a2 = 1;
1053+const b1 = 2;
1054+const b2 = 2;
1055+
1056+function f () {
1057+    var a1 = 11;
1058+    const b1 = 22;
1059+
1060+    class C1 {
1061+        static {
1062+            var a1 = 111;
1063+            var a2 = 111;
1064+            const b1 = 222;
1065+            const b2 = 222;
1066+        }
1067+    }
1068+    let c1 = new C1();
1069+}
1070+
1071+class C2 {
1072+    static {
1073+        var a1 = 111;
1074+        var a2 = 111;
1075+        const b1 = 222;
1076+        const b2 = 222;
1077+    }
1078+}
1079+let c2 = new C2();
1080\ No newline at end of file
1081diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock11.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock11.ts
1082new file mode 100644
1083index 0000000000..00492ae619
1084--- /dev/null
1085+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock11.ts
1086@@ -0,0 +1,15 @@
1087+// @target: esnext, es2015
1088+
1089+let getX;
1090+class C {
1091+  #x = 1
1092+  constructor(x: number) {
1093+    this.#x = x;
1094+  }
1095+
1096+  static {
1097+    // getX has privileged access to #x
1098+    getX = (obj: C) => obj.#x;
1099+  }
1100+}
1101+let cc = new C(1);
1102diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock12.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock12.ts
1103new file mode 100644
1104index 0000000000..436c690665
1105--- /dev/null
1106+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock12.ts
1107@@ -0,0 +1,10 @@
1108+// @useDefineForClassFields: false
1109+// @target: es2015
1110+
1111+class C {
1112+  static #x = 1;
1113+  
1114+  static {
1115+    C.#x;
1116+  }
1117+}
1118diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock13.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock13.ts
1119new file mode 100644
1120index 0000000000..8120cc3575
1121--- /dev/null
1122+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock13.ts
1123@@ -0,0 +1,14 @@
1124+// @target: esnext, es2015
1125+// @useDefineForClassFields: true
1126+
1127+class C {
1128+  static #x = 123;
1129+  
1130+  static {
1131+    console.log(C.#x)
1132+  }
1133+
1134+  foo () {
1135+    return C.#x;
1136+  }
1137+}
1138diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock14.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock14.ts
1139new file mode 100644
1140index 0000000000..ff510c8436
1141--- /dev/null
1142+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock14.ts
1143@@ -0,0 +1,15 @@
1144+// @useDefineForClassFields: false
1145+// @target: es2015
1146+
1147+class C {
1148+  static #_1 = 1;
1149+  static #_3 = 1;
1150+  static #_5 = 1;
1151+
1152+  static {}
1153+  static {}
1154+  static {}
1155+  static {}
1156+  static {}
1157+  static {}
1158+}
1159diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock15.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock15.ts
1160new file mode 100644
1161index 0000000000..ec2727660f
1162--- /dev/null
1163+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock15.ts
1164@@ -0,0 +1,18 @@
1165+// @target: esnext, es2015
1166+// @useDefineForClassFields: true
1167+var _C__1;
1168+
1169+class C {
1170+  static #_1 = 1;
1171+  static #_3 = 3;
1172+  static #_5 = 5;
1173+
1174+  static {}
1175+  static {}
1176+  static {}
1177+  static {}
1178+  static {}
1179+  static {}
1180+}
1181+
1182+console.log(_C__1)
1183diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock16.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock16.ts
1184new file mode 100644
1185index 0000000000..bc15e5f1ab
1186--- /dev/null
1187+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock16.ts
1188@@ -0,0 +1,26 @@
1189+// @target: es2015
1190+
1191+let getX: (c: C) => number;
1192+class C {
1193+  #x = 1
1194+  constructor(x: number) {
1195+    this.#x = x;
1196+  }
1197+
1198+  static {
1199+    // getX has privileged access to #x
1200+    getX = (obj: C) => obj.#x;
1201+    getY = (obj: D) => obj.#y;
1202+  }
1203+}
1204+
1205+let getY: (c: D) => number;
1206+class D {
1207+  #y = 1
1208+
1209+  static {
1210+    // getY has privileged access to y
1211+    getX = (obj: C) => obj.#x;
1212+    getY = (obj: D) => obj.#y;
1213+  }
1214+}
1215\ No newline at end of file
1216diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock17.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock17.ts
1217new file mode 100644
1218index 0000000000..8d26cb4a08
1219--- /dev/null
1220+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock17.ts
1221@@ -0,0 +1,33 @@
1222+// @target: es2015
1223+
1224+let friendA: { getX(o: A): number, setX(o: A, v: number): void };
1225+
1226+class A {
1227+  #x: number;
1228+
1229+  constructor (v: number) {
1230+    this.#x = v;
1231+  }
1232+
1233+  getX () {
1234+    return this.#x;
1235+  }
1236+
1237+  static {
1238+    friendA = {
1239+      getX(obj) { return obj.#x },
1240+      setX(obj, value) { obj.#x = value }
1241+    };
1242+  }
1243+};
1244+
1245+class B {
1246+  constructor(a: A) {
1247+    const x = friendA.getX(a); // ok
1248+    friendA.setX(a, x + 1); // ok
1249+  }
1250+};
1251+
1252+const a = new A(41);
1253+const b = new B(a);
1254+a.getX();
1255\ No newline at end of file
1256diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock18.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock18.ts
1257new file mode 100644
1258index 0000000000..a36bd50917
1259--- /dev/null
1260+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock18.ts
1261@@ -0,0 +1,15 @@
1262+// @target: esnext, es2015, es5
1263+
1264+function foo () {
1265+  return class {
1266+    static foo = 1;
1267+    static {
1268+      const c = class {
1269+        static bar = 2;
1270+        static {
1271+          // do
1272+        }
1273+      }
1274+    }
1275+  }
1276+}
1277diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock19.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock19.ts
1278new file mode 100644
1279index 0000000000..33bb993be6
1280--- /dev/null
1281+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock19.ts
1282@@ -0,0 +1,6 @@
1283+class C {
1284+    @decorator
1285+    static {
1286+        // something
1287+    }
1288+}
1289diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock2.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock2.ts
1290new file mode 100644
1291index 0000000000..292d7181bb
1292--- /dev/null
1293+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock2.ts
1294@@ -0,0 +1,20 @@
1295+// @target: esnext, es2015, es5
1296+
1297+const a = 1;
1298+const b = 2;
1299+
1300+class C {
1301+    static {
1302+        const a = 11;
1303+
1304+        a;
1305+        b;
1306+    }
1307+
1308+    static {
1309+        const a = 11;
1310+
1311+        a;
1312+        b;
1313+    }
1314+}
1315diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock20.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock20.ts
1316new file mode 100644
1317index 0000000000..72a9d09161
1318--- /dev/null
1319+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock20.ts
1320@@ -0,0 +1,13 @@
1321+class C {
1322+    async static {
1323+        // something
1324+    }
1325+
1326+    public static {
1327+        // something
1328+    }
1329+
1330+    readonly private static {
1331+        // something
1332+    }
1333+}
1334diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock21.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock21.ts
1335new file mode 100644
1336index 0000000000..65422df9cd
1337--- /dev/null
1338+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock21.ts
1339@@ -0,0 +1,7 @@
1340+class C {
1341+    /* jsdocs */
1342+    static {
1343+        // something
1344+    }
1345+}
1346+let cc = new C();
1347\ No newline at end of file
1348diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock22.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock22.ts
1349new file mode 100644
1350index 0000000000..8d3be9861a
1351--- /dev/null
1352+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock22.ts
1353@@ -0,0 +1,72 @@
1354+// @target: esnext
1355+
1356+let await: "any";
1357+class C {
1358+  static {
1359+    let await: any; // illegal, cannot declare a new binding for await
1360+  }
1361+  static {
1362+    let { await } = {} as any; // illegal, cannot declare a new binding for await
1363+  }
1364+  static {
1365+    let { await: other } = {} as any; // legal
1366+  }
1367+  static {
1368+    let await; // illegal, cannot declare a new binding for await
1369+  }
1370+  static {
1371+    function await() { }; // illegal
1372+  }
1373+  static {
1374+    class await { }; // illegal
1375+  }
1376+
1377+  static {
1378+    class D {
1379+      await = 1; // legal
1380+      x = await; // legal (initializers have an implicit function boundary)
1381+    };
1382+  }
1383+  static {
1384+    (function await() { }); // legal, 'await' in function expression name not bound inside of static block
1385+  }
1386+  static {
1387+    (class await { }); // legal, 'await' in class expression name not bound inside of static block
1388+  }
1389+  static {
1390+    (function () { return await; }); // legal, 'await' is inside of a new function boundary
1391+  }
1392+  static {
1393+    (() => await); // legal, 'await' is inside of a new function boundary
1394+  }
1395+
1396+  static {
1397+    class E {
1398+      constructor() { await; }
1399+      method() { await; }
1400+      get accessor() {
1401+        await;
1402+        return 1;
1403+      }
1404+      set accessor(v: any) {
1405+        await;
1406+      }
1407+      propLambda = () => { await; }
1408+      propFunc = function () { await; }
1409+    }
1410+  }
1411+  static {
1412+    class S {
1413+      static method() { await; }
1414+      static get accessor() {
1415+        await;
1416+        return 1;
1417+      }
1418+      static set accessor(v: any) {
1419+        await;
1420+      }
1421+      static propLambda = () => { await; }
1422+      static propFunc = function () { await; }
1423+    }
1424+  }
1425+}
1426\ No newline at end of file
1427diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock23.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock23.ts
1428new file mode 100644
1429index 0000000000..bb83b27dca
1430--- /dev/null
1431+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock23.ts
1432@@ -0,0 +1,21 @@
1433+// @target: esnext
1434+
1435+const nums = [1, 2, 3].map(n => Promise.resolve(n))
1436+
1437+class C {
1438+  static {
1439+    for await (const nn of nums) {
1440+        console.log(nn)
1441+    }
1442+  }
1443+}
1444+
1445+async function foo () {
1446+  class C {
1447+    static {
1448+      for await (const nn of nums) {
1449+          console.log(nn)
1450+      }
1451+    }
1452+  }
1453+}
1454\ No newline at end of file
1455diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock24.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock24.ts
1456new file mode 100644
1457index 0000000000..8132238772
1458--- /dev/null
1459+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock24.ts
1460@@ -0,0 +1,8 @@
1461+// @module: commonjs, es2015, es2020, UMD, AMD, System, esnext
1462+
1463+export class C {
1464+  static x: number;
1465+  static {
1466+    C.x = 1;
1467+  }
1468+}
1469diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock25.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock25.ts
1470new file mode 100644
1471index 0000000000..56f99a6122
1472--- /dev/null
1473+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock25.ts
1474@@ -0,0 +1,23 @@
1475+// @target: esnext
1476+// @declaration: true
1477+// @declarationMap: true
1478+// @sourceMap: true
1479+
1480+const a = 1;
1481+const b = 2;
1482+
1483+class C {
1484+    static {
1485+        const a = 11;
1486+
1487+        a;
1488+        b;
1489+    }
1490+
1491+    static {
1492+        const a = 11;
1493+
1494+        a;
1495+        b;
1496+    }
1497+}
1498diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock26.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock26.ts
1499new file mode 100644
1500index 0000000000..1081729acd
1501--- /dev/null
1502+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock26.ts
1503@@ -0,0 +1,30 @@
1504+// @target: esnext
1505+
1506+class C {
1507+    static {
1508+        await; // illegal
1509+    }
1510+    static {
1511+        await (1); // illegal
1512+    }
1513+    static {
1514+        ({ [await]: 1 }); // illegal
1515+    }
1516+    static {
1517+        class D {
1518+            [await] = 1; // illegal (computed property names are evaluated outside of a class body
1519+        };
1520+    }
1521+    static {
1522+        ({ await }); // illegal short-hand property reference
1523+    }
1524+    static {
1525+        await: // illegal, 'await' cannot be used as a label
1526+        break await; // illegal, 'await' cannot be used as a label
1527+    }
1528+    static {
1529+        function f(await) { }
1530+        const ff = (await) => { }
1531+        const fff = await => { }
1532+    }
1533+}
1534diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock27.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock27.ts
1535new file mode 100644
1536index 0000000000..a0429bbb54
1537--- /dev/null
1538+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock27.ts
1539@@ -0,0 +1,17 @@
1540+// https://github.com/microsoft/TypeScript/issues/44872
1541+
1542+void class Foo {
1543+    static prop = 1
1544+    static {
1545+        console.log(Foo.prop);
1546+        Foo.prop++;
1547+    }
1548+    static {
1549+        console.log(Foo.prop);
1550+        Foo.prop++;
1551+    }
1552+    static {
1553+        console.log(Foo.prop);
1554+        Foo.prop++;
1555+    }
1556+}
1557diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock3.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock3.ts
1558new file mode 100644
1559index 0000000000..84125fdbed
1560--- /dev/null
1561+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock3.ts
1562@@ -0,0 +1,19 @@
1563+// @target: esnext
1564+
1565+const a = 1;
1566+
1567+class C {
1568+    static f1 = 1;
1569+
1570+    static {
1571+        console.log(C.f1, C.f2, C.f3)
1572+    }
1573+
1574+    static f2 = 2;
1575+
1576+    static {
1577+        console.log(C.f1, C.f2, C.f3)
1578+    }
1579+
1580+    static f3 = 3;
1581+}
1582diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock4.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock4.ts
1583new file mode 100644
1584index 0000000000..7a944a4969
1585--- /dev/null
1586+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock4.ts
1587@@ -0,0 +1,16 @@
1588+// @target: esnext
1589+
1590+class C {
1591+    static s1 = 1;
1592+
1593+    static {
1594+        this.s1;
1595+        C.s1;
1596+
1597+        this.s2;
1598+        C.s2;
1599+    }
1600+
1601+    static s2 = 2;
1602+    static ss2 = this.s1;
1603+}
1604diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock5.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock5.ts
1605new file mode 100644
1606index 0000000000..2410b532ab
1607--- /dev/null
1608+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock5.ts
1609@@ -0,0 +1,19 @@
1610+// @target: esnext, es2015, es5
1611+
1612+class B {
1613+    static a = 1;
1614+    static b = 2;
1615+}
1616+
1617+class C extends B {
1618+    static b = 3;
1619+    static c = super.a
1620+
1621+    static {
1622+        this.b;
1623+        super.b;
1624+        super.a;
1625+    }
1626+}
1627+
1628+let cc = new C();
1629diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock6.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock6.ts
1630new file mode 100644
1631index 0000000000..cdd0cda2fe
1632--- /dev/null
1633+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock6.ts
1634@@ -0,0 +1,62 @@
1635+class B {
1636+    static a = 1;
1637+}
1638+
1639+class C extends B {
1640+    static {
1641+        let await = 1;
1642+        let arguments = 1;
1643+        let eval = 1;
1644+    }
1645+
1646+    static {
1647+        await: if (true) {
1648+
1649+        }
1650+
1651+        arguments;
1652+        await;
1653+        super();
1654+    }
1655+}
1656+
1657+class CC {
1658+    constructor () {
1659+        class C extends B {
1660+            static {
1661+                class CC extends B {
1662+                    constructor () {
1663+                        super();
1664+                    }
1665+                }
1666+                super();
1667+            }
1668+        }
1669+    }
1670+}
1671+
1672+async function foo () {
1673+    class C extends B {
1674+        static {
1675+            arguments;
1676+            await;
1677+
1678+            async function ff () {
1679+                arguments;
1680+                await;
1681+            }
1682+        }
1683+    }
1684+}
1685+
1686+function foo1 () {
1687+    class C extends B {
1688+        static {
1689+            arguments;
1690+
1691+            function ff () {
1692+                arguments;
1693+            }
1694+        }
1695+    }
1696+}
1697diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock7.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock7.ts
1698new file mode 100644
1699index 0000000000..727ada0342
1700--- /dev/null
1701+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock7.ts
1702@@ -0,0 +1,43 @@
1703+class C {
1704+    static {
1705+        await 1;
1706+        yield 1;
1707+        return 1;
1708+    }
1709+}
1710+
1711+async function f1 () {
1712+    class C {
1713+        static {
1714+            await 1;
1715+
1716+            async function ff () {
1717+                await 1;
1718+            }
1719+        }
1720+    }
1721+}
1722+
1723+function * f2 () {
1724+    class C {
1725+        static {
1726+            yield 1;
1727+
1728+            function * ff () {
1729+                yield 1;
1730+            }
1731+        }
1732+    }
1733+}
1734+
1735+function f3 () {
1736+    class C {
1737+        static {
1738+            return 1;
1739+
1740+            function ff () {
1741+                return 1
1742+            }
1743+        }
1744+    }
1745+}
1746diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock8.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock8.ts
1747new file mode 100644
1748index 0000000000..d2e5220b83
1749--- /dev/null
1750+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock8.ts
1751@@ -0,0 +1,48 @@
1752+function foo (v: number) {
1753+    label: while (v) {
1754+        class C {
1755+            static {
1756+                if (v === 1) {
1757+                    break label;
1758+                }
1759+                if (v === 2) {
1760+                    continue label;
1761+                }
1762+                if (v === 3) {
1763+                    break
1764+                }
1765+                if (v === 4) {
1766+                    continue
1767+                }
1768+            }
1769+        }
1770+
1771+        if (v === 5) {
1772+            break label;
1773+        }
1774+        if (v === 6) {
1775+            continue label;
1776+        }
1777+        if (v === 7) {
1778+            break;
1779+        }
1780+        if (v === 8) {
1781+            continue;
1782+        }
1783+    }
1784+
1785+    class C {
1786+        static {
1787+            outer: break outer; // valid
1788+            loop: while (v) {
1789+                if (v === 1) break loop; // valid
1790+                if (v === 2) continue loop; // valid
1791+                if (v === 3) break; // valid
1792+                if (v === 4) continue; // valid
1793+            }
1794+            switch (v) {
1795+                default: break; // valid
1796+            }
1797+        }
1798+    }
1799+}
1800diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlock9.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock9.ts
1801new file mode 100644
1802index 0000000000..d99157b190
1803--- /dev/null
1804+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlock9.ts
1805@@ -0,0 +1,8 @@
1806+// @target: esnext, es2015, es5
1807+class A {
1808+    static bar = A.foo + 1
1809+    static {
1810+        A.foo + 2;
1811+    }
1812+    static foo = 1;
1813+}
1814diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef1.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef1.ts
1815new file mode 100644
1816index 0000000000..11f8b7f554
1817--- /dev/null
1818+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef1.ts
1819@@ -0,0 +1,15 @@
1820+// @target: esnext
1821+// @noEmit: true
1822+// @strict: true
1823+
1824+class C {
1825+    static x;
1826+    static {
1827+        this.x = 1;
1828+    }
1829+    static y = this.x;
1830+    static z;
1831+    static {
1832+        this.z = this.y;
1833+    }
1834+}
1835\ No newline at end of file
1836diff --git a/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef2.ts b/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef2.ts
1837new file mode 100644
1838index 0000000000..89658a6ebe
1839--- /dev/null
1840+++ b/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef2.ts
1841@@ -0,0 +1,10 @@
1842+// @target: esnext
1843+// @noEmit: true
1844+// @strict: true
1845+
1846+class C {
1847+    static {
1848+        this.x = 1;
1849+    }
1850+    static x;
1851+}
1852\ No newline at end of file
1853diff --git a/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility4.ts b/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility4.ts
1854index 3760f2176a..83c7d721b0 100644
1855--- a/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility4.ts
1856+++ b/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility4.ts
1857@@ -14,6 +14,7 @@ class A {
1858         }
1859     }
1860 }
1861+let aa = new A();
1862 
1863 class D {
1864     protected constructor() { }
1865@@ -28,4 +29,5 @@ class D {
1866         class F extends D { // OK
1867         }
1868     }
1869-}
1870\ No newline at end of file
1871+}
1872+let dd = new D();
1873\ No newline at end of file
1874diff --git a/tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues.ts b/tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues.ts
1875index bdbcd7f959..c75a4f196b 100644
1876--- a/tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues.ts
1877+++ b/tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues.ts
1878@@ -17,4 +17,8 @@ class E<T extends Date> {
1879     constructor(x: T = null) {
1880         var y = x;
1881     }
1882-}
1883\ No newline at end of file
1884+}
1885+
1886+let cc = new C(null);
1887+let dd = new D(null);
1888+let ee = new E(null);
1889\ No newline at end of file
1890diff --git a/tests/cases/conformance/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.ts b/tests/cases/conformance/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.ts
1891index 76b41eabba..ffd568ede1 100644
1892--- a/tests/cases/conformance/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.ts
1893+++ b/tests/cases/conformance/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.ts
1894@@ -2,4 +2,5 @@
1895 
1896 class C {
1897     constructor(readonly x: number) {}
1898-}
1899\ No newline at end of file
1900+}
1901+let c7 = new C(1)
1902\ No newline at end of file
1903diff --git a/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts b/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts
1904index c03ce26cc2..e22bf5d126 100644
1905--- a/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts
1906+++ b/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts
1907@@ -29,3 +29,7 @@ class F {
1908         console.log(this);
1909     }
1910 }
1911+let c3 =new C()
1912+let c4 =new D()
1913+let c5 =new E()
1914+let c6 =new F()
1915\ No newline at end of file
1916diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.ts
1917index 20243d55be..7806d4f33e 100644
1918--- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.ts
1919+++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.ts
1920@@ -14,4 +14,6 @@ class Base2 {
1921 // ok, use assignment compatibility
1922 class Derived2 extends Base2 {
1923     [x: number]: any;
1924-}
1925\ No newline at end of file
1926+}
1927+let c1 = new Derived()
1928+let c2 = new Derived2()
1929\ No newline at end of file
1930diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/superInStaticMembers1.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/superInStaticMembers1.ts
1931new file mode 100644
1932index 0000000000..fd281b1606
1933--- /dev/null
1934+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/superInStaticMembers1.ts
1935@@ -0,0 +1,492 @@
1936+// @target: es5, es2015, es2021, esnext
1937+// @noTypesAndSymbols: true
1938+
1939+// @filename: external.ts
1940+export class Reflect {}
1941+export interface Foo {}
1942+export declare namespace Bar { type _ = unknown; }
1943+export const enum Baz {}
1944+export default class {};
1945+
1946+// @filename: locals.ts
1947+export {};
1948+declare class B { static w(): number; }
1949+class C extends B {
1950+    static _ = [
1951+        (() => {
1952+            var Reflect; // collision (es2015-es2021 only)
1953+            super.w();
1954+        })(),
1955+        (() => {
1956+            var { Reflect } = { Reflect: null }; // collision (es2015-es2021 only)
1957+            super.w();
1958+        })(),
1959+        (() => {
1960+            var [Reflect] = [null]; // collision (es2015-es2021 only)
1961+            super.w();
1962+        })(),
1963+        (() => {
1964+            class Reflect {} // collision (es2015-es2021 only)
1965+            super.w();
1966+        })(),
1967+        (() => {
1968+            function Reflect() {} // collision (es2015-es2021 only)
1969+            super.w();
1970+        })(),
1971+        (() => {
1972+            enum Reflect {} // collision (es2015-es2021 only)
1973+            super.w();
1974+        })(),
1975+        (() => {
1976+            const enum Reflect {} // collision (es2015-es2021 only)
1977+            super.w();
1978+        })(),
1979+        (() => {
1980+            type Reflect = unknown; // no collision
1981+            super.w();
1982+        })(),
1983+        (() => {
1984+            interface Reflect {}; // no collision
1985+            super.w();
1986+        })(),
1987+        (() => {
1988+            (class Reflect {}); // no collision
1989+            super.w();
1990+        })(),
1991+        (() => {
1992+            (function Reflect() {}); // no collision
1993+            super.w();
1994+        })(),
1995+    ];
1996+
1997+    static {
1998+        var { Reflect } = { Reflect: null }; // collision (es2015-es2021 only)
1999+        super.w();
2000+    }
2001+
2002+    static {
2003+        var [Reflect] = [null]; // collision (es2015-es2021 only)
2004+        super.w();
2005+    }
2006+
2007+    static {
2008+        var Reflect; // collision (es2015-es2021 only)
2009+        super.w();
2010+    }
2011+
2012+    static {
2013+        class Reflect {} // collision (es2015-es2021 only)
2014+        super.w();
2015+    }
2016+
2017+    static {
2018+        function Reflect() {} // collision (es2015-es2021 only)
2019+        super.w();
2020+    }
2021+
2022+    static {
2023+        enum Reflect {} // collision (es2015-es2021 only)
2024+        super.w();
2025+    }
2026+
2027+    static {
2028+        const enum Reflect {} // collision (es2015-es2021 only)
2029+        super.w();
2030+    }
2031+
2032+    static {
2033+        type Reflect = unknown; // no collision
2034+        super.w();
2035+    }
2036+
2037+    static {
2038+        interface Reflect {} // no collision
2039+        super.w();
2040+    }
2041+
2042+    static {
2043+        (class Reflect {}) // no collision
2044+        super.w();
2045+    }
2046+
2047+    static {
2048+        (function Reflect() {}) // no collision
2049+        super.w();
2050+    }
2051+}
2052+
2053+// @filename: varInContainingScopeStaticField1.ts
2054+export {};
2055+declare class B { static w(): number; }
2056+var Reflect = null; // collision (es2015-es2021 only)
2057+class C extends B {
2058+    static _ = super.w();
2059+}
2060+
2061+// @filename: varInContainingScopeStaticField2.ts
2062+export {};
2063+declare class B { static w(): number; }
2064+var { Reflect } = { Reflect: null }; // collision (es2015-es2021 only)
2065+class C extends B {
2066+    static _ = super.w();
2067+}
2068+
2069+// @filename: varInContainingScopeStaticField3.ts
2070+export {};
2071+declare class B { static w(): number; }
2072+var [Reflect] = [null]; // collision (es2015-es2021 only)
2073+class C extends B {
2074+    static _ = super.w();
2075+}
2076+
2077+// @filename: varInContainingScopeStaticBlock1.ts
2078+export {};
2079+declare class B { static w(): number; }
2080+var Reflect = null; // collision (es2015-es2021 only)
2081+class C extends B {
2082+    static { super.w(); }
2083+}
2084+
2085+// @filename: varInContainingScopeStaticBlock2.ts
2086+export {};
2087+declare class B { static w(): number; }
2088+var { Reflect } = { Reflect: null }; // collision (es2015-es2021 only)
2089+class C extends B {
2090+    static { super.w(); }
2091+}
2092+
2093+// @filename: varInContainingScopeStaticBlock3.ts
2094+export {};
2095+declare class B { static w(): number; }
2096+var [Reflect] = [null]; // collision (es2015-es2021 only)
2097+class C extends B {
2098+    static { super.w(); }
2099+}
2100+
2101+// @filename: classDeclInContainingScopeStaticField.ts
2102+export {};
2103+declare class B { static w(): number; }
2104+class Reflect {} // collision (es2015-es2021 only)
2105+class C extends B {
2106+    static _ = super.w();
2107+}
2108+
2109+// @filename: classDeclInContainingScopeStaticBlock.ts
2110+export {};
2111+declare class B { static w(): number; }
2112+class Reflect {} // collision (es2015-es2021 only)
2113+class C extends B {
2114+    static { super.w(); }
2115+}
2116+
2117+// @filename: funcDeclInContainingScopeStaticField.ts
2118+export {};
2119+declare class B { static w(): number; }
2120+function Reflect() {} // collision (es2015-es2021 only)
2121+class C extends B {
2122+    static _ = super.w();
2123+}
2124+
2125+// @filename: funcDeclInContainingScopeStaticBlock.ts
2126+export {};
2127+declare class B { static w(): number; }
2128+function Reflect() {} // collision (es2015-es2021 only)
2129+class C extends B {
2130+    static { super.w(); }
2131+}
2132+
2133+// @filename: valueNamespaceInContainingScopeStaticField.ts
2134+export {};
2135+declare class B { static w(): number; }
2136+namespace Reflect {} // collision (es2015-es2021 only)
2137+class C extends B {
2138+    static _ = super.w();
2139+}
2140+
2141+// @filename: valueNamespaceInContainingScopeStaticBlock.ts
2142+export {};
2143+declare class B { static w(): number; }
2144+namespace Reflect {} // collision (es2015-es2021 only)
2145+class C extends B {
2146+    static { super.w(); }
2147+}
2148+
2149+// @filename: enumInContainingScopeStaticField.ts
2150+export {};
2151+declare class B { static w(): number; }
2152+enum Reflect {} // collision (es2015-es2021 only)
2153+class C extends B {
2154+    static _ = super.w();
2155+}
2156+
2157+// @filename: enumInContainingScopeStaticBlock.ts
2158+export {};
2159+declare class B { static w(): number; }
2160+enum Reflect {} // collision (es2015-es2021 only)
2161+class C extends B {
2162+    static { super.w(); }
2163+}
2164+
2165+// @filename: constEnumInContainingScopeStaticField.ts
2166+export {};
2167+declare class B { static w(): number; }
2168+const enum Reflect {} // collision (es2015-es2021 only)
2169+class C extends B {
2170+    static _ = super.w();
2171+}
2172+
2173+// @filename: constEnumInContainingScopeStaticBlock.ts
2174+export {};
2175+declare class B { static w(): number; }
2176+const enum Reflect {} // collision (es2015-es2021 only)
2177+class C extends B {
2178+    static { super.w(); }
2179+}
2180+
2181+// @filename: namespaceImportInContainingScopeStaticField.ts
2182+export {};
2183+declare class B { static w(): number; }
2184+import * as Reflect from "./external"; // collision (es2015-es2021 only)
2185+class C extends B {
2186+    static _ = super.w();
2187+}
2188+
2189+// @filename: namespaceImportInContainingScopeStaticBlock.ts
2190+export {};
2191+declare class B { static w(): number; }
2192+import * as Reflect from "./external"; // collision (es2015-es2021 only)
2193+class C extends B {
2194+    static { super.w(); }
2195+}
2196+
2197+// @filename: namedImportInContainingScopeStaticField.ts
2198+export {};
2199+declare class B { static w(): number; }
2200+import { Reflect } from "./external"; // collision (es2015-es2021 only)
2201+class C extends B {
2202+    static _ = super.w();
2203+}
2204+
2205+// @filename: namedImportInContainingScopeStaticBlock.ts
2206+export {};
2207+declare class B { static w(): number; }
2208+import { Reflect } from "./external"; // collision (es2015-es2021 only)
2209+class C extends B {
2210+    static { super.w(); }
2211+}
2212+
2213+// @filename: namedImportOfInterfaceInContainingScopeStaticField.ts
2214+export {};
2215+declare class B { static w(): number; }
2216+import { Foo as Reflect } from "./external"; // collision (es2015-es2021 only, not a type-only import)
2217+class C extends B {
2218+    static _ = super.w();
2219+}
2220+
2221+// @filename: namedImportOfInterfaceInContainingScopeStaticBlock.ts
2222+export {};
2223+declare class B { static w(): number; }
2224+import { Foo as Reflect } from "./external"; // collision (es2015-es2021 only, not a type-only import)
2225+class C extends B {
2226+    static { super.w(); }
2227+}
2228+
2229+// @filename: namedImportOfUninstantiatedNamespaceInContainingScopeStaticField.ts
2230+export {};
2231+declare class B { static w(): number; }
2232+import { Bar as Reflect } from "./external"; // collision (es2015-es2021 only, not a type-only import)
2233+class C extends B {
2234+    static _ = super.w();
2235+}
2236+
2237+// @filename: namedImportOfUninstantiatedNamespaceInContainingScopeStaticBlock.ts
2238+export {};
2239+declare class B { static w(): number; }
2240+import { Bar as Reflect } from "./external"; // collision (es2015-es2021 only, not a type-only import)
2241+class C extends B {
2242+    static { super.w(); }
2243+}
2244+
2245+// @filename: namedImportOfConstEnumInContainingScopeStaticField.ts
2246+export {};
2247+declare class B { static w(): number; }
2248+import { Baz as Reflect } from "./external"; // collision (es2015-es2021 only)
2249+class C extends B {
2250+    static _ = super.w();
2251+}
2252+
2253+// @filename: namedImportOfConstEnumInContainingScopeStaticBlock.ts
2254+export {};
2255+declare class B { static w(): number; }
2256+import { Baz as Reflect } from "./external"; // collision (es2015-es2021 only)
2257+class C extends B {
2258+    static { super.w(); }
2259+}
2260+
2261+// @filename: typeOnlyNamedImportInContainingScopeStaticField.ts
2262+export {};
2263+declare class B { static w(): number; }
2264+import type { Reflect } from "./external"; // no collision
2265+class C extends B {
2266+    static _ = super.w();
2267+}
2268+
2269+// @filename: typeOnlyNamedImportInContainingScopeStaticBlock.ts
2270+export {};
2271+declare class B { static w(): number; }
2272+import type { Reflect } from "./external"; // no collision
2273+class C extends B {
2274+    static { super.w(); }
2275+}
2276+
2277+// @filename: defaultImportInContainingScopeStaticField.ts
2278+export {};
2279+declare class B { static w(): number; }
2280+import Reflect from "./external"; // collision (es2015-es2021 only)
2281+class C extends B {
2282+    static _ = super.w();
2283+}
2284+
2285+// @filename: defaultImportInContainingScopeStaticBlock.ts
2286+export {};
2287+declare class B { static w(): number; }
2288+import Reflect from "./external"; // collision (es2015-es2021 only)
2289+class C extends B {
2290+    static { super.w(); }
2291+}
2292+
2293+// @filename: typeOnlyDefaultImportInContainingScopeStaticField.ts
2294+export {};
2295+declare class B { static w(): number; }
2296+import type Reflect from "./external"; // no collision
2297+class C extends B {
2298+    static _ = super.w();
2299+}
2300+
2301+// @filename: typeOnlyDefaultImportInContainingScopeStaticBlock.ts
2302+export {};
2303+declare class B { static w(): number; }
2304+import type Reflect from "./external"; // no collision
2305+class C extends B {
2306+    static { super.w(); }
2307+}
2308+
2309+// @filename: typeInContainingScopeStaticField.ts
2310+export {};
2311+declare class B { static w(): number; }
2312+type Reflect = unknown; // no collision
2313+class C extends B {
2314+    static _ = super.w();
2315+}
2316+
2317+// @filename: typeInContainingScopeStaticBlock.ts
2318+export {};
2319+declare class B { static w(): number; }
2320+type Reflect = unknown; // no collision
2321+class C extends B {
2322+    static { super.w(); }
2323+}
2324+
2325+// @filename: interfaceInContainingScopeStaticField.ts
2326+export {};
2327+declare class B { static w(): number; }
2328+interface Reflect {}; // no collision
2329+class C extends B {
2330+    static _ = super.w();
2331+}
2332+
2333+// @filename: interfaceInContainingScopeStaticBlock.ts
2334+export {};
2335+declare class B { static w(): number; }
2336+interface Reflect {}; // no collision
2337+class C extends B {
2338+    static { super.w(); }
2339+}
2340+
2341+// @filename: uninstantiatedNamespaceInContainingScopeStaticField.ts
2342+export {};
2343+declare class B { static w(): number; }
2344+declare namespace Reflect { type _ = unknown; }; // no collision
2345+class C extends B {
2346+    static _ = super.w();
2347+}
2348+
2349+// @filename: uninstantiatedNamespaceInContainingScopeStaticBlock.ts
2350+export {};
2351+declare class B { static w(): number; }
2352+declare namespace Reflect { type _ = unknown; }; // no collision
2353+class C extends B {
2354+    static { super.w(); }
2355+}
2356+
2357+// @filename: classExprInContainingScopeStaticField.ts
2358+export {};
2359+declare class B { static w(): number; }
2360+(class Reflect {}); // no collision
2361+class C extends B {
2362+    static _ = super.w();
2363+}
2364+
2365+// @filename: classExprInContainingScopeStaticBlock.ts
2366+export {};
2367+declare class B { static w(): number; }
2368+(class Reflect {}); // no collision
2369+class C extends B {
2370+    static { super.w(); }
2371+}
2372+
2373+// @filename: inContainingClassExprStaticField.ts
2374+export {};
2375+declare class B { static w(): number; }
2376+(class Reflect { // collision (es2015-es2021 only)
2377+    static {
2378+        class C extends B {
2379+            static _ = super.w();
2380+        }
2381+    }
2382+});
2383+
2384+// @filename: inContainingClassExprStaticBlock.ts
2385+export {};
2386+declare class B { static w(): number; }
2387+(class Reflect { // collision (es2015-es2021 only)
2388+    static {
2389+        class C extends B {
2390+            static { super.w(); }
2391+        }
2392+    }
2393+});
2394+
2395+// @filename: funcExprInContainingScopeStaticField.ts
2396+export {};
2397+declare class B { static w(): number; }
2398+(function Reflect() {}); // no collision
2399+class C extends B {
2400+    static _ = super.w();
2401+}
2402+
2403+// @filename: funcExprInContainingScopeStaticBlock.ts
2404+export {};
2405+declare class B { static w(): number; }
2406+(function Reflect() {}); // no collision
2407+class C extends B {
2408+    static { super.w(); }
2409+}
2410+
2411+// @filename: inContainingFuncExprStaticField.ts
2412+export {};
2413+declare class B { static w(): number; }
2414+(function Reflect() { // collision (es2015-es2021 only)
2415+    class C extends B {
2416+        static _ = super.w();
2417+    }
2418+});
2419+
2420+// @filename: inContainingFuncExprStaticBlock.ts
2421+export {};
2422+declare class B { static w(): number; }
2423+(function Reflect() { // collision (es2015-es2021 only)
2424+    class C extends B {
2425+        static { super.w(); }
2426+    }
2427+});
2428diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers1.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers1.ts
2429new file mode 100644
2430index 0000000000..e3bfff9aed
2431--- /dev/null
2432+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers1.ts
2433@@ -0,0 +1,42 @@
2434+// @target: esnext, es2015
2435+// @useDefineForClassFields: true
2436+// @noTypesAndSymbols: true
2437+
2438+declare class B {
2439+    static a: any;
2440+    static f(): number;
2441+    a: number;
2442+    f(): number;
2443+}
2444+
2445+class C extends B {
2446+    static x: any = undefined!;
2447+    static y1 = this.x;
2448+    static y2 = this.x();
2449+    static y3 = this?.x();
2450+    static y4 = this[("x")]();
2451+    static y5 = this?.[("x")]();
2452+    static z1 = super.a;
2453+    static z2 = super["a"];
2454+    static z3 = super.f();
2455+    static z4 = super["f"]();
2456+    static z5 = super.a = 0;
2457+    static z6 = super.a += 1;
2458+    static z7 = (() => { super.a = 0; })();
2459+    static z8 = [super.a] = [0];
2460+    static z9 = [super.a = 0] = [0];
2461+    static z10 = [...super.a] = [0];
2462+    static z11 = { x: super.a } = { x: 0 };
2463+    static z12 = { x: super.a = 0 } = { x: 0 };
2464+    static z13 = { ...super.a } = { x: 0 };
2465+    static z14 = ++super.a;
2466+    static z15 = --super.a;
2467+    static z16 = ++super[("a")];
2468+    static z17 = super.a++;
2469+    static z18 = super.a``;
2470+
2471+    // these should be unaffected
2472+    x = 1;
2473+    y = this.x;
2474+    z = super.f();
2475+}
2476\ No newline at end of file
2477diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers2.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers2.ts
2478new file mode 100644
2479index 0000000000..7e751c3d67
2480--- /dev/null
2481+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers2.ts
2482@@ -0,0 +1,42 @@
2483+// @target: esnext, es2015
2484+// @useDefineForClassFields: false
2485+// @noTypesAndSymbols: true
2486+
2487+declare class B {
2488+    static a: any;
2489+    static f(): number;
2490+    a: number;
2491+    f(): number;
2492+}
2493+
2494+class C extends B {
2495+    static x: any = undefined!;
2496+    static y1 = this.x;
2497+    static y2 = this.x();
2498+    static y3 = this?.x();
2499+    static y4 = this[("x")]();
2500+    static y5 = this?.[("x")]();
2501+    static z1 = super.a;
2502+    static z2 = super["a"];
2503+    static z3 = super.f();
2504+    static z4 = super["f"]();
2505+    static z5 = super.a = 0;
2506+    static z6 = super.a += 1;
2507+    static z7 = (() => { super.a = 0; })();
2508+    static z8 = [super.a] = [0];
2509+    static z9 = [super.a = 0] = [0];
2510+    static z10 = [...super.a] = [0];
2511+    static z11 = { x: super.a } = { x: 0 };
2512+    static z12 = { x: super.a = 0 } = { x: 0 };
2513+    static z13 = { ...super.a } = { x: 0 };
2514+    static z14 = ++super.a;
2515+    static z15 = --super.a;
2516+    static z16 = ++super[("a")];
2517+    static z17 = super.a++;
2518+    static z18 = super.a``;
2519+
2520+    // these should be unaffected
2521+    x = 1;
2522+    y = this.x;
2523+    z = super.f();
2524+}
2525\ No newline at end of file
2526diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers3.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers3.ts
2527new file mode 100644
2528index 0000000000..413c7c54bc
2529--- /dev/null
2530+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers3.ts
2531@@ -0,0 +1,26 @@
2532+// @target: es5
2533+// @useDefineForClassFields: true
2534+// @noTypesAndSymbols: true
2535+
2536+declare class B {
2537+    static a: any;
2538+    static f(): number;
2539+    a: number;
2540+    f(): number;
2541+}
2542+
2543+class C extends B {
2544+    static x: any = undefined!;
2545+    static y1 = this.x;
2546+    static y2 = this.x();
2547+    static y3 = this?.x();
2548+    static y4 = this[("x")]();
2549+    static y5 = this?.[("x")]();
2550+    static z3 = super.f();
2551+    static z4 = super["f"]();
2552+    
2553+    // these should be unaffected
2554+    x = 1;
2555+    y = this.x;
2556+    z = super.f();
2557+}
2558\ No newline at end of file
2559diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers4.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers4.ts
2560new file mode 100644
2561index 0000000000..aad82e41dc
2562--- /dev/null
2563+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers4.ts
2564@@ -0,0 +1,26 @@
2565+// @target: es5
2566+// @useDefineForClassFields: false
2567+// @noTypesAndSymbols: true
2568+
2569+declare class B {
2570+    static a: any;
2571+    static f(): number;
2572+    a: number;
2573+    f(): number;
2574+}
2575+
2576+class C extends B {
2577+    static x: any = undefined!;
2578+    static y1 = this.x;
2579+    static y2 = this.x();
2580+    static y3 = this?.x();
2581+    static y4 = this[("x")]();
2582+    static y5 = this?.[("x")]();
2583+    static z3 = super.f();
2584+    static z4 = super["f"]();
2585+    
2586+    // these should be unaffected
2587+    x = 1;
2588+    y = this.x;
2589+    z = super.f();
2590+}
2591\ No newline at end of file
2592diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.ts
2593index dcba533725..f05e58dcb5 100644
2594--- a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.ts
2595+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.ts
2596@@ -30,4 +30,5 @@ var t2 = C2.bar();
2597 var r5 = t2.foo + 1;
2598 var r6 = t2.bar();
2599 var r7 = new t2('');
2600-
2601+let b2 = new C(1)
2602+let b3 = new C2('null')
2603diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers10.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers10.ts
2604new file mode 100644
2605index 0000000000..bb458c87d2
2606--- /dev/null
2607+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers10.ts
2608@@ -0,0 +1,51 @@
2609+// @target: esnext, es6, es5
2610+// @experimentalDecorators: true
2611+// @useDefineForClassFields: false
2612+
2613+declare const foo: any;
2614+
2615+@foo
2616+class C {
2617+    static a = 1;
2618+    static b = this.a + 1;
2619+}
2620+
2621+@foo
2622+class D extends C {
2623+    static c = 2;
2624+    static d = this.c + 1;
2625+    static e = super.a + this.c + 1;
2626+    static f = () => this.c + 1;
2627+    static ff = function () { this.c + 1 }
2628+    static foo () {
2629+        return this.c + 1;
2630+    }
2631+    static get fa () {
2632+        return this.c + 1;
2633+    }
2634+    static set fa (v: number) {
2635+        this.c = v + 1;
2636+    }
2637+}
2638+
2639+class CC {
2640+    static a = 1;
2641+    static b = this.a + 1;
2642+}
2643+
2644+class DD extends CC {
2645+    static c = 2;
2646+    static d = this.c + 1;
2647+    static e = super.a + this.c + 1;
2648+    static f = () => this.c + 1;
2649+    static ff = function () { this.c + 1 }
2650+    static foo () {
2651+        return this.c + 1;
2652+    }
2653+    static get fa () {
2654+        return this.c + 1;
2655+    }
2656+    static set fa (v: number) {
2657+        this.c = v + 1;
2658+    }
2659+}
2660diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers11.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers11.ts
2661new file mode 100644
2662index 0000000000..6c4025bc47
2663--- /dev/null
2664+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers11.ts
2665@@ -0,0 +1,51 @@
2666+// @target: esnext, es6, es5
2667+// @experimentalDecorators: true
2668+// @useDefineForClassFields: true
2669+
2670+declare const foo: any;
2671+
2672+@foo
2673+class C {
2674+    static a = 1;
2675+    static b = this.a + 1;
2676+}
2677+
2678+@foo
2679+class D extends C {
2680+    static c = 2;
2681+    static d = this.c + 1;
2682+    static e = super.a + this.c + 1;
2683+    static f = () => this.c + 1;
2684+    static ff = function () { this.c + 1 }
2685+    static foo () {
2686+        return this.c + 1;
2687+    }
2688+    static get fa () {
2689+        return this.c + 1;
2690+    }
2691+    static set fa (v: number) {
2692+        this.c = v + 1;
2693+    }
2694+}
2695+
2696+class CC {
2697+    static a = 1;
2698+    static b = this.a + 1;
2699+}
2700+
2701+class DD extends CC {
2702+    static c = 2;
2703+    static d = this.c + 1;
2704+    static e = super.a + this.c + 1;
2705+    static f = () => this.c + 1;
2706+    static ff = function () { this.c + 1 }
2707+    static foo () {
2708+        return this.c + 1;
2709+    }
2710+    static get fa () {
2711+        return this.c + 1;
2712+    }
2713+    static set fa (v: number) {
2714+        this.c = v + 1;
2715+    }
2716+}
2717diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers12.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers12.ts
2718new file mode 100644
2719index 0000000000..041089512b
2720--- /dev/null
2721+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers12.ts
2722@@ -0,0 +1,10 @@
2723+// @target: esnext, es6, es5
2724+// @useDefineForClassFields: false
2725+
2726+class C {
2727+    static readonly c: "foo" = "foo"
2728+    static bar =  class Inner {
2729+        static [this.c] = 123;
2730+        [this.c] = 123;
2731+    }
2732+}
2733diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers13.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers13.ts
2734new file mode 100644
2735index 0000000000..6c965e0e2d
2736--- /dev/null
2737+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers13.ts
2738@@ -0,0 +1,10 @@
2739+// @target: esnext, es6, es5
2740+// @useDefineForClassFields: true
2741+
2742+class C {
2743+    static readonly c: "foo" = "foo"
2744+    static bar =  class Inner {
2745+        static [this.c] = 123;
2746+        [this.c] = 123;
2747+    }
2748+}
2749diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers3.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers3.ts
2750new file mode 100644
2751index 0000000000..27541ce361
2752--- /dev/null
2753+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers3.ts
2754@@ -0,0 +1,12 @@
2755+// @target: esnext, es6, es5
2756+// @useDefineForClassFields: false
2757+class C {
2758+    static a = 1;
2759+    static b = this.a + 1;
2760+}
2761+
2762+class D extends C {
2763+    static c = 2;
2764+    static d = this.c + 1;
2765+    static e = super.a + this.c + 1;
2766+}
2767diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers4.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers4.ts
2768new file mode 100644
2769index 0000000000..0d08423bb9
2770--- /dev/null
2771+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers4.ts
2772@@ -0,0 +1,12 @@
2773+// @target: esnext, es6, es5
2774+// @useDefineForClassFields: true
2775+class C {
2776+    static a = 1;
2777+    static b = this.a + 1;
2778+}
2779+
2780+class D extends C {
2781+    static c = 2;
2782+    static d = this.c + 1;
2783+    static e = super.a + this.c + 1;
2784+}
2785diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers5.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers5.ts
2786new file mode 100644
2787index 0000000000..db6e8a76c6
2788--- /dev/null
2789+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers5.ts
2790@@ -0,0 +1,9 @@
2791+// @target: esnext, es6, es5
2792+
2793+class C {
2794+    static create = () => new this("yep")
2795+
2796+    constructor (private foo: string) {
2797+
2798+    }
2799+}
2800diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers6.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers6.ts
2801new file mode 100644
2802index 0000000000..b27d0855a2
2803--- /dev/null
2804+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers6.ts
2805@@ -0,0 +1,7 @@
2806+class C {
2807+    static f = 1
2808+}
2809+
2810+class D extends C {
2811+    static c = super();
2812+}
2813diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers7.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers7.ts
2814new file mode 100644
2815index 0000000000..1a2d9cd2e2
2816--- /dev/null
2817+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers7.ts
2818@@ -0,0 +1,12 @@
2819+// @target: esnext, es6, es5
2820+
2821+class C {
2822+    static a = 1;
2823+    static b = this.a + 1;
2824+}
2825+
2826+class D extends C {
2827+    static c = 2;
2828+    static d = this.c + 1;
2829+    static e = 1 + (super.a) + (this.c + 1) + 1;
2830+}
2831diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers8.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers8.ts
2832new file mode 100644
2833index 0000000000..8b26476f14
2834--- /dev/null
2835+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers8.ts
2836@@ -0,0 +1,19 @@
2837+// @target: esnext, es6, es5
2838+
2839+class C {
2840+    static f = 1;
2841+    static arrowFunctionBoundary = () => this.f + 1;
2842+    static functionExprBoundary = function () { return this.f + 2 };
2843+    static classExprBoundary = class { a = this.f + 3 };
2844+    static functionAndClassDeclBoundary = (() => {
2845+        function foo () {
2846+            return this.f + 4
2847+        }
2848+        class CC {
2849+            a = this.f + 5
2850+            method () {
2851+                return this.f + 6
2852+            }
2853+        }
2854+    })();
2855+}
2856diff --git a/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers9.ts b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers9.ts
2857new file mode 100644
2858index 0000000000..0a648d2fa0
2859--- /dev/null
2860+++ b/tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers9.ts
2861@@ -0,0 +1,22 @@
2862+// @target: esnext, es6, es5
2863+
2864+class C {
2865+    static f = 1
2866+}
2867+
2868+class D extends C {
2869+    static arrowFunctionBoundary = () => super.f + 1;
2870+    static functionExprBoundary = function () { return super.f + 2 };
2871+    static classExprBoundary = class { a = super.f + 3 };
2872+    static functionAndClassDeclBoundary = (() => {
2873+        function foo () {
2874+            return super.f + 4
2875+        }
2876+        class C {
2877+            a = super.f + 5
2878+            method () {
2879+                return super.f +6
2880+            }
2881+        }
2882+    })();
2883+}
2884diff --git a/tests/cases/conformance/classes/members/privateNames/privateNameComputedPropertyName3.ts b/tests/cases/conformance/classes/members/privateNames/privateNameComputedPropertyName3.ts
2885index 09573f98c9..f57d3afc8b 100644
2886--- a/tests/cases/conformance/classes/members/privateNames/privateNameComputedPropertyName3.ts
2887+++ b/tests/cases/conformance/classes/members/privateNames/privateNameComputedPropertyName3.ts
2888@@ -23,3 +23,5 @@ class Foo {
2889 }
2890 
2891 console.log(new Foo("NAME").getValue(100));
2892+
2893+let ff = new Foo(null)
2894\ No newline at end of file
2895diff --git a/tests/cases/conformance/classes/members/privateNames/privateNameFieldAccess.ts b/tests/cases/conformance/classes/members/privateNames/privateNameFieldAccess.ts
2896index 4c02159bfa..af502334e7 100644
2897--- a/tests/cases/conformance/classes/members/privateNames/privateNameFieldAccess.ts
2898+++ b/tests/cases/conformance/classes/members/privateNames/privateNameFieldAccess.ts
2899@@ -6,3 +6,4 @@ class A {
2900         console.log(this.#myField);
2901     }
2902 }
2903+let aa = new A();
2904diff --git a/tests/cases/conformance/classes/members/privateNames/privateNameHashCharName.ts b/tests/cases/conformance/classes/members/privateNames/privateNameHashCharName.ts
2905new file mode 100644
2906index 0000000000..4a076565bf
2907--- /dev/null
2908+++ b/tests/cases/conformance/classes/members/privateNames/privateNameHashCharName.ts
2909@@ -0,0 +1,11 @@
2910+// @target: es6
2911+
2912+#
2913+
2914+class C {
2915+    #
2916+
2917+    m() {
2918+        this.#
2919+    }
2920+}
2921diff --git a/tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts b/tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts
2922new file mode 100644
2923index 0000000000..e274378150
2924--- /dev/null
2925+++ b/tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts
2926@@ -0,0 +1,119 @@
2927+// @strict: true
2928+// @target: esnext
2929+// @useDefineForClassFields: true
2930+
2931+class Foo {
2932+    #field = 1;
2933+    static #staticField = 2;
2934+    #method() {}
2935+    static #staticMethod() {}
2936+
2937+    goodRhs(v: any) {
2938+        const a = #field in v;
2939+
2940+        const b = #field in v.p1.p2;
2941+
2942+        const c = #field in (v as {});
2943+
2944+        const d = #field in (v as Foo);
2945+
2946+        const e = #field in (v as never);
2947+
2948+        for (let f in #field in v as any) { /**/ } // unlikely but valid
2949+    }
2950+    badRhs(v: any) {
2951+        const a = #field in (v as unknown); // Bad - RHS of in must be object type or any
2952+
2953+        const b = #fiel in v; // Bad - typo in privateID
2954+
2955+        const c = (#field) in v; // Bad - privateID is not an expression on its own
2956+
2957+        for (#field in v) { /**/ } // Bad - 'in' not allowed
2958+
2959+        for (let d in #field in v) { /**/ } // Bad - rhs of in should be a object/any
2960+    }
2961+    whitespace(v: any) {
2962+        const a = v && /*0*/#field/*1*/
2963+            /*2*/in/*3*/
2964+                /*4*/v/*5*/
2965+    }
2966+    flow(u: unknown, n: never, fb: Foo | Bar, fs: FooSub, b: Bar, fsb: FooSub | Bar, fsfb: Foo | FooSub | Bar) {
2967+
2968+        if (typeof u === 'object') {
2969+            if (#field in n) {
2970+                n; // good n is never
2971+            }
2972+
2973+            if (#field in u) {
2974+                u; // good u is Foo
2975+            } else {
2976+                u; // good u is object | null
2977+            }
2978+
2979+            if (u !== null) {
2980+                if (#field in u) {
2981+                    u; // good u is Foo
2982+                } else {
2983+                    u; // good u is object
2984+                }
2985+
2986+                if (#method in u) {
2987+                    u; // good u is Foo
2988+                }
2989+
2990+                if (#staticField in u) {
2991+                    u; // good u is typeof Foo
2992+                }
2993+
2994+                if (#staticMethod in u) {
2995+                    u; // good u is typeof Foo
2996+                }
2997+            }
2998+        }
2999+
3000+        if (#field in fb) {
3001+            fb; // good fb is Foo
3002+        } else {
3003+            fb; // good fb is Bar
3004+        }
3005+
3006+        if (#field in fs) {
3007+            fs; // good fs is FooSub
3008+        } else {
3009+            fs; // good fs is never
3010+        }
3011+
3012+        if (#field in b) {
3013+            b; // good b is 'Bar & Foo'
3014+        } else {
3015+            b; // good b is Bar
3016+        }
3017+
3018+        if (#field in fsb) {
3019+            fsb; // good fsb is FooSub
3020+        } else {
3021+            fsb; // good fsb is Bar
3022+        }
3023+
3024+        if (#field in fsfb) {
3025+            fsfb; // good fsfb is 'Foo | FooSub'
3026+        } else {
3027+            fsfb; // good fsfb is Bar
3028+        }
3029+
3030+        class Nested {
3031+            m(v: any) {
3032+                if (#field in v) {
3033+                    v; // good v is Foo
3034+                }
3035+            }
3036+        }
3037+    }
3038+}
3039+
3040+class FooSub extends Foo { subTypeOfFoo = true }
3041+class Bar { notFoo = true }
3042+
3043+function badSyntax(v: Foo) {
3044+    return #field in v; // Bad - outside of class
3045+}
3046diff --git a/tests/cases/conformance/classes/members/privateNames/privateNameInInExpressionTransform.ts b/tests/cases/conformance/classes/members/privateNames/privateNameInInExpressionTransform.ts
3047new file mode 100644
3048index 0000000000..f7be176373
3049--- /dev/null
3050+++ b/tests/cases/conformance/classes/members/privateNames/privateNameInInExpressionTransform.ts
3051@@ -0,0 +1,47 @@
3052+// @target: esnext, es2020
3053+
3054+class Foo {
3055+    #field = 1;
3056+    #method() {}
3057+    static #staticField= 2;
3058+    static #staticMethod() {}
3059+
3060+    check(v: any) {
3061+        #field in v; // expect Foo's 'field' WeakMap
3062+        #method in v; // expect Foo's 'instances' WeakSet
3063+        #staticField in v; // expect Foo's constructor
3064+        #staticMethod in v; // expect Foo's constructor
3065+    }
3066+    precedence(v: any) {
3067+        // '==' and '||' have lower precedence than 'in'
3068+        // 'in'  naturally has same precedence as 'in'
3069+        // '<<' has higher precedence than 'in'
3070+
3071+        v == #field in v || v; // Good precedence: (v == (#field in v)) || v
3072+
3073+        v << #field in v << v; // Good precedence (SyntaxError): (v << #field) in (v << v)
3074+
3075+        v << #field in v == v; // Good precedence (SyntaxError): ((v << #field) in v) == v
3076+
3077+        v == #field in v in v; // Good precedence: v == ((#field in v) in v)
3078+
3079+        #field in v && #field in v; // Good precedence: (#field in v) && (#field in v)
3080+    }
3081+    invalidLHS(v: any) {
3082+        'prop' in v = 10;
3083+        #field in v = 10;
3084+    }
3085+}
3086+
3087+class Bar {
3088+    #field = 1;
3089+    check(v: any) {
3090+        #field in v; // expect Bar's 'field' WeakMap
3091+    }
3092+}
3093+
3094+function syntaxError(v: Foo) {
3095+    return #field in v; // expect `return in v` so runtime will have a syntax error
3096+}
3097+
3098+export { }
3099diff --git a/tests/cases/conformance/classes/members/privateNames/privateNameInInExpressionUnused.ts b/tests/cases/conformance/classes/members/privateNames/privateNameInInExpressionUnused.ts
3100new file mode 100644
3101index 0000000000..4b214a2b9e
3102--- /dev/null
3103+++ b/tests/cases/conformance/classes/members/privateNames/privateNameInInExpressionUnused.ts
3104@@ -0,0 +1,13 @@
3105+// @strict: true
3106+// @noUnusedLocals: true
3107+// @target: esnext
3108+
3109+class Foo {
3110+    #unused: undefined; // expect unused error
3111+    #brand: undefined; // expect no error
3112+
3113+    isFoo(v: any): v is Foo {
3114+        // This should count as using/reading '#brand'
3115+        return #brand in v;
3116+    }
3117+}
3118diff --git a/tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiersJs.ts b/tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiersJs.ts
3119new file mode 100644
3120index 0000000000..5154b5e439
3121--- /dev/null
3122+++ b/tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiersJs.ts
3123@@ -0,0 +1,65 @@
3124+// @allowJs: true
3125+// @checkJs: true
3126+// @strict: true
3127+// @target: es6
3128+// @outDir: ./out
3129+// @filename: privateNamesIncompatibleModifiersJs.js
3130+
3131+class A {
3132+    /**
3133+     * @public
3134+     */
3135+    #a = 1;
3136+
3137+    /**
3138+     * @private
3139+     */
3140+    #b = 1;
3141+
3142+    /**
3143+     * @protected
3144+     */
3145+    #c = 1;
3146+
3147+    /**
3148+     * @public
3149+     */
3150+    #aMethod() { return 1; }
3151+
3152+    /**
3153+     * @private
3154+     */
3155+    #bMethod() { return 1; }
3156+
3157+    /**
3158+     * @protected
3159+     */
3160+    #cMethod() { return 1; }
3161+
3162+    /**
3163+     * @public
3164+     */
3165+    get #aProp() { return 1; }
3166+    /**
3167+     * @public
3168+     */
3169+    set #aProp(value) { }
3170+
3171+    /**
3172+     * @private
3173+     */
3174+    get #bProp() { return 1; }
3175+    /**
3176+     * @private
3177+     */
3178+    set #bProp(value) { }
3179+
3180+    /**
3181+    * @protected
3182+    */
3183+    get #cProp() { return 1; }
3184+    /**
3185+     * @protected
3186+     */
3187+    set #cProp(value) { }
3188+}
3189diff --git a/tests/cases/conformance/classes/mixinClassesAnnotated.ts b/tests/cases/conformance/classes/mixinClassesAnnotated.ts
3190index 62f5e30c9a..8bca7d06d1 100644
3191--- a/tests/cases/conformance/classes/mixinClassesAnnotated.ts
3192+++ b/tests/cases/conformance/classes/mixinClassesAnnotated.ts
3193@@ -36,6 +36,7 @@ function Tagged<T extends Constructor<{}>>(superClass: T): Constructor<Tagged> &
3194             this._tag = "hello";
3195         }
3196     }
3197+    let c = new C();
3198     return C;
3199 }
3200 
3201@@ -65,3 +66,5 @@ class Thing3 extends Thing2 {
3202         this.print();
3203     }
3204 }
3205+let der = new Derived(1,1,1);
3206+let th3 = new Thing3('');
3207\ No newline at end of file
3208diff --git a/tests/cases/conformance/classes/mixinClassesAnonymous.ts b/tests/cases/conformance/classes/mixinClassesAnonymous.ts
3209index 0e42288808..aa639e71e3 100644
3210--- a/tests/cases/conformance/classes/mixinClassesAnonymous.ts
3211+++ b/tests/cases/conformance/classes/mixinClassesAnonymous.ts
3212@@ -62,3 +62,5 @@ const Timestamped = <CT extends Constructor<object>>(Base: CT) => {
3213         timestamp = new Date();
3214     };
3215 }
3216+let aa = new Derived(1,1,1);
3217+let bb = new Thing3('');
3218\ No newline at end of file
3219diff --git a/tests/cases/conformance/classes/mixinClassesMembers.ts b/tests/cases/conformance/classes/mixinClassesMembers.ts
3220index 905518c88f..7deb2ac30b 100644
3221--- a/tests/cases/conformance/classes/mixinClassesMembers.ts
3222+++ b/tests/cases/conformance/classes/mixinClassesMembers.ts
3223@@ -97,3 +97,8 @@ class C3 extends Mixed3 {
3224     }
3225     f() { return super.f(); }
3226 }
3227+let aa = new C1('');
3228+let bb = new M1();
3229+let cc = new M2();
3230+let dd = new C2();
3231+let ee = new C3();
3232\ No newline at end of file
3233diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts
3234index 5f7266c0ea..7870b163db 100644
3235--- a/tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts
3236+++ b/tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts
3237@@ -14,3 +14,6 @@ class B extends A {
3238 class C extends A {
3239     protected get x() { return 'C.x' };
3240 }
3241+
3242+let b = new B();
3243+let c = new C();
3244diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts
3245new file mode 100644
3246index 0000000000..42a0999748
3247--- /dev/null
3248+++ b/tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts
3249@@ -0,0 +1,5 @@
3250+// @strict: true
3251+// @declaration: true
3252+abstract class C {
3253+    abstract prop = 1
3254+}
3255diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberInitialization.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberInitialization.ts
3256index 04b44a6835..d7c518964d 100644
3257--- a/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberInitialization.ts
3258+++ b/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberInitialization.ts
3259@@ -4,8 +4,8 @@ class C {
3260 
3261 var c = new C();
3262 c.x = 3;
3263-var c2 = new C();
3264-var r = c.x === c2.x;
3265+// var c2 = new C();
3266+// var r = c.x === c2.x;
3267 
3268 // #31792
3269 
3270@@ -14,4 +14,5 @@ var r = c.x === c2.x;
3271 class MyMap<K, V> {
3272     constructor(private readonly Map_: { new<K, V>(): any }) {}
3273     private readonly store = new this.Map_<K, V>();
3274-}
3275\ No newline at end of file
3276+}
3277+let mm = new MyMap(null)
3278\ No newline at end of file
3279diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberWithComputedPropertyName2.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberWithComputedPropertyName2.ts
3280index e597b6b9d9..ed03d54763 100644
3281--- a/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberWithComputedPropertyName2.ts
3282+++ b/tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberWithComputedPropertyName2.ts
3283@@ -6,3 +6,4 @@ const x = 1;
3284 class C {
3285     [x]: string;
3286 }
3287+let cc = new C();
3288\ No newline at end of file
3289diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.ts
3290index 5d786cd4cf..0277ffa658 100644
3291--- a/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.ts
3292+++ b/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.ts
3293@@ -10,4 +10,5 @@ class Derived extends Base {
3294 }
3295 var d = Derived.create(); 
3296 
3297-d.foo();  
3298\ No newline at end of file
3299+d.foo();  
3300+let b1 =new Derived()
3301\ No newline at end of file
3302diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.ts
3303index 06a784c782..d3b03f9716 100644
3304--- a/tests/cases/conformance/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.ts
3305+++ b/tests/cases/conformance/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.ts
3306@@ -4,4 +4,5 @@ class C {
3307 
3308     f() { }
3309     static f() { }
3310-}
3311\ No newline at end of file
3312+}
3313+let a4 = new C()
3314\ No newline at end of file
3315diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.ts
3316index 4566ce26f0..4a275f4eef 100644
3317--- a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.ts
3318+++ b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.ts
3319@@ -6,4 +6,6 @@ class C {
3320 class D {
3321     static f: number;
3322     f() { }
3323-}
3324\ No newline at end of file
3325+}
3326+let a2 =new C()
3327+let a3 = new D()
3328\ No newline at end of file
3329diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.ts
3330index 198c923b0d..d937176b83 100644
3331--- a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.ts
3332+++ b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.ts
3333@@ -54,3 +54,13 @@ declare class StaticArgumentsFn {
3334     static arguments(): any; // ok
3335     arguments(): any; // ok
3336 }
3337+let a5 =new StaticName()
3338+let a6 =new StaticNameFn()
3339+let a7 =new StaticLength()
3340+let a8 =new StaticLengthFn()
3341+let a9 =new StaticPrototype()
3342+let a10 =new StaticPrototypeFn()
3343+let a11 =new StaticCaller()
3344+let a12 =new StaticCallerFn()
3345+let a13 =new StaticArguments()
3346+let a14 =new StaticArgumentsFn()
3347\ No newline at end of file
3348diff --git a/tests/cases/conformance/controlFlow/assertionTypePredicates2.ts b/tests/cases/conformance/controlFlow/assertionTypePredicates2.ts
3349new file mode 100644
3350index 0000000000..915c9ae94f
3351--- /dev/null
3352+++ b/tests/cases/conformance/controlFlow/assertionTypePredicates2.ts
3353@@ -0,0 +1,27 @@
3354+// @allowJs: true
3355+// @checkJs: true
3356+// @outDir: ./out
3357+// @filename: assertionTypePredicates2.js
3358+
3359+/**
3360+ * @typedef {{ x: number }} A
3361+ */
3362+
3363+/**
3364+ * @typedef { A & { y: number } } B
3365+ */
3366+
3367+/**
3368+ * @param {A} a
3369+ * @returns { asserts a is B }
3370+ */
3371+const foo = (a) => {
3372+    if (/** @type { B } */ (a).y !== 0) throw TypeError();
3373+    return undefined;
3374+};
3375+
3376+export const main = () => {
3377+    /** @type { A } */
3378+    const a = { x: 1 };
3379+    foo(a);
3380+};
3381diff --git a/tests/cases/conformance/controlFlow/controlFlowAliasing.ts b/tests/cases/conformance/controlFlow/controlFlowAliasing.ts
3382new file mode 100644
3383index 0000000000..03b7530921
3384--- /dev/null
3385+++ b/tests/cases/conformance/controlFlow/controlFlowAliasing.ts
3386@@ -0,0 +1,285 @@
3387+// @strict: true
3388+// @declaration: true
3389+
3390+// Narrowing by aliased conditional expressions
3391+
3392+function f10(x: string | number) {
3393+    const isString = typeof x === "string";
3394+    if (isString) {
3395+        let t: string = x;
3396+    }
3397+    else {
3398+        let t: number = x;
3399+    }
3400+}
3401+
3402+function f11(x: unknown) {
3403+    const isString = typeof x === "string";
3404+    if (isString) {
3405+        let t: string = x;
3406+    }
3407+}
3408+
3409+function f12(x: string | number | boolean) {
3410+    const isString = typeof x === "string";
3411+    const isNumber = typeof x === "number";
3412+    if (isString || isNumber) {
3413+        let t: string | number = x;
3414+    }
3415+    else {
3416+        let t: boolean = x;
3417+    }
3418+}
3419+
3420+function f13(x: string | number | boolean) {
3421+    const isString = typeof x === "string";
3422+    const isNumber = typeof x === "number";
3423+    const isStringOrNumber = isString || isNumber;
3424+    if (isStringOrNumber) {
3425+        let t: string | number = x;
3426+    }
3427+    else {
3428+        let t: boolean = x;
3429+    }
3430+}
3431+
3432+function f14(x: number | null | undefined): number | null {
3433+    const notUndefined = x !== undefined;
3434+    return notUndefined ? x : 0;
3435+}
3436+
3437+function f15(obj: { readonly x: string | number }) {
3438+    const isString = typeof obj.x === 'string';
3439+    if (isString) {
3440+        let s: string = obj.x;
3441+    }
3442+}
3443+
3444+function f16(obj: { readonly x: string | number }) {
3445+    const isString = typeof obj.x === 'string';
3446+    obj = { x: 42 };
3447+    if (isString) {
3448+        let s: string = obj.x;  // Not narrowed because of is assigned in function body
3449+    }
3450+}
3451+
3452+function f17(obj: readonly [string | number]) {
3453+    const isString = typeof obj[0] === 'string';
3454+    if (isString) {
3455+        let s: string = obj[0];
3456+    }
3457+}
3458+
3459+function f18(obj: readonly [string | number]) {
3460+    const isString = typeof obj[0] === 'string';
3461+    obj = [42];
3462+    if (isString) {
3463+        let s: string = obj[0];  // Not narrowed because of is assigned in function body
3464+    }
3465+}
3466+
3467+function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3468+    const isFoo = obj.kind === 'foo';
3469+    if (isFoo) {
3470+        obj.foo;
3471+    }
3472+    else {
3473+        obj.bar;
3474+    }
3475+}
3476+
3477+function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3478+    const isFoo: boolean = obj.kind === 'foo';
3479+    if (isFoo) {
3480+        obj.foo;  // Not narrowed because isFoo has type annotation
3481+    }
3482+    else {
3483+        obj.bar;  // Not narrowed because isFoo has type annotation
3484+    }
3485+}
3486+
3487+function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3488+    let isFoo = obj.kind === 'foo';
3489+    if (isFoo) {
3490+        obj.foo;  // Not narrowed because isFoo is mutable
3491+    }
3492+    else {
3493+        obj.bar;  // Not narrowed because isFoo is mutable
3494+    }
3495+}
3496+
3497+function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3498+    const isFoo = obj.kind === 'foo';
3499+    obj = obj;
3500+    if (isFoo) {
3501+        obj.foo;  // Not narrowed because obj is assigned in function body
3502+    }
3503+    else {
3504+        obj.bar;  // Not narrowed because obj is assigned in function body
3505+    }
3506+}
3507+
3508+function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3509+    const obj = arg;
3510+    const isFoo = obj.kind === 'foo';
3511+    if (isFoo) {
3512+        obj.foo;
3513+    }
3514+    else {
3515+        obj.bar;
3516+    }
3517+}
3518+
3519+function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3520+    let obj = arg;
3521+    const isFoo = obj.kind === 'foo';
3522+    if (isFoo) {
3523+        obj.foo;  // Not narrowed because obj is mutable
3524+    }
3525+    else {
3526+        obj.bar;  // Not narrowed because obj is mutable
3527+    }
3528+}
3529+
3530+function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) {
3531+    const isFoo = outer.obj.kind === 'foo';
3532+    if (isFoo) {
3533+        outer.obj.foo;
3534+    }
3535+    else {
3536+        outer.obj.bar;
3537+    }
3538+}
3539+
3540+function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) {
3541+    const isFoo = outer.obj.kind === 'foo';
3542+    if (isFoo) {
3543+        outer.obj.foo;  // Not narrowed because obj is mutable
3544+    }
3545+    else {
3546+        outer.obj.bar;  // Not narrowed because obj is mutable
3547+    }
3548+}
3549+
3550+function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3551+    const isFoo = obj && obj.kind === 'foo';
3552+    const isBar = obj && obj.kind === 'bar';
3553+    if (isFoo) {
3554+        obj.foo;
3555+    }
3556+    if (isBar) {
3557+        obj.bar;
3558+    }
3559+}
3560+
3561+// Narrowing by aliased discriminant property access
3562+
3563+function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3564+    const kind = obj.kind;
3565+    if (kind === 'foo') {
3566+        obj.foo;
3567+    }
3568+    else {
3569+        obj.bar;
3570+    }
3571+}
3572+
3573+function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3574+    const { kind } = obj;
3575+    if (kind === 'foo') {
3576+        obj.foo;
3577+    }
3578+    else {
3579+        obj.bar;
3580+    }
3581+}
3582+
3583+function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3584+    const { kind: k } = obj;
3585+    if (k === 'foo') {
3586+        obj.foo;
3587+    }
3588+    else {
3589+        obj.bar;
3590+    }
3591+}
3592+
3593+function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
3594+    const { kind } = obj;
3595+    switch (kind) {
3596+        case 'foo': obj.foo; break;
3597+        case 'bar': obj.bar; break;
3598+    }
3599+}
3600+
3601+
3602+class C10 {
3603+    constructor(readonly x: string | number) {
3604+        const thisX_isString = typeof this.x === 'string';
3605+        const xIsString = typeof x === 'string';
3606+        if (thisX_isString && xIsString) {
3607+            let s: string;
3608+            s = this.x;
3609+            s = x;
3610+        }
3611+    }
3612+}
3613+
3614+class C11 {
3615+    constructor(readonly x: string | number) {
3616+        const thisX_isString = typeof this.x === 'string';
3617+        const xIsString = typeof x === 'string';
3618+        if (thisX_isString && xIsString) {
3619+            // Some narrowings may be invalidated due to later assignments.
3620+            let s: string;
3621+            s = this.x;
3622+            s = x;
3623+        }
3624+        else {
3625+            this.x = 10;
3626+            x = 10;
3627+        }
3628+    }
3629+}
3630+
3631+// Mixing of aliased discriminants and conditionals
3632+
3633+function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) {
3634+    const { kind } = obj;
3635+    const isFoo = kind == 'foo';
3636+    if (isFoo && obj.foo) {
3637+        let t: string = obj.foo;
3638+    }
3639+}
3640+
3641+// Unsupported narrowing of destructured payload by destructured discriminant
3642+
3643+type Data = { kind: 'str', payload: string } | { kind: 'num', payload: number };
3644+
3645+function gg2(obj: Data) {
3646+    if (obj.kind === 'str') {
3647+        let t: string = obj.payload;
3648+    }
3649+    else {
3650+        let t: number = obj.payload;
3651+    }
3652+}
3653+
3654+function foo({ kind, payload }: Data) {
3655+    if (kind === 'str') {
3656+        let t: string = payload;
3657+    }
3658+    else {
3659+        let t: number = payload;
3660+    }
3661+}
3662+
3663+// Repro from #45830
3664+
3665+const obj = {
3666+    fn: () => true
3667+};
3668+
3669+if (a) { }
3670+
3671+const a = obj.fn();
3672diff --git a/tests/cases/conformance/controlFlow/controlFlowAliasingCatchVariables.ts b/tests/cases/conformance/controlFlow/controlFlowAliasingCatchVariables.ts
3673new file mode 100644
3674index 0000000000..a746fa1cd0
3675--- /dev/null
3676+++ b/tests/cases/conformance/controlFlow/controlFlowAliasingCatchVariables.ts
3677@@ -0,0 +1,28 @@
3678+// @useUnknownInCatchVariables: true,false
3679+
3680+try {}
3681+catch (e) {
3682+    const isString = typeof e === 'string';
3683+    if (isString) {
3684+        e.toUpperCase(); // e string
3685+    }
3686+
3687+    if (typeof e === 'string') {
3688+        e.toUpperCase(); // e string
3689+    }
3690+}
3691+
3692+try {}
3693+catch (e) {
3694+    const isString = typeof e === 'string';
3695+
3696+    e = 1;
3697+
3698+    if (isString) {
3699+        e.toUpperCase(); // e any/unknown
3700+    }
3701+
3702+    if (typeof e === 'string') {
3703+        e.toUpperCase(); // e string
3704+    }
3705+}
3706diff --git a/tests/cases/conformance/controlFlow/controlFlowElementAccess2.ts b/tests/cases/conformance/controlFlow/controlFlowElementAccess2.ts
3707index fa0592c973..17a2af7895 100644
3708--- a/tests/cases/conformance/controlFlow/controlFlowElementAccess2.ts
3709+++ b/tests/cases/conformance/controlFlow/controlFlowElementAccess2.ts
3710@@ -10,4 +10,4 @@ if (typeof config['works'] !== 'boolean') {
3711 if (typeof config.works !== 'boolean') {
3712     config['works'].prop = 'test'; // error, config['works']: boolean | { 'prop': string }
3713     config.works.prop = 'test'; // ok
3714-}
3715+}
3716\ No newline at end of file
3717diff --git a/tests/cases/conformance/controlFlow/controlFlowForInStatement2.ts b/tests/cases/conformance/controlFlow/controlFlowForInStatement2.ts
3718new file mode 100644
3719index 0000000000..450e50cadc
3720--- /dev/null
3721+++ b/tests/cases/conformance/controlFlow/controlFlowForInStatement2.ts
3722@@ -0,0 +1,25 @@
3723+const keywordA = 'a';
3724+const keywordB = 'b';
3725+
3726+type A = { [keywordA]: number };
3727+type B = { [keywordB]: string };
3728+
3729+declare const c: A | B;
3730+
3731+if ('a' in c) {
3732+    c; // narrowed to `A`
3733+}
3734+
3735+if (keywordA in c) {
3736+    c; // also narrowed to `A`
3737+}
3738+
3739+let stringB: string = 'b';
3740+
3741+if ((stringB as 'b') in c) {
3742+    c; // narrowed to `B`
3743+}
3744+
3745+if ((stringB as ('a' | 'b')) in c) {
3746+    c; // not narrowed
3747+}
3748\ No newline at end of file
3749diff --git a/tests/cases/conformance/controlFlow/controlFlowInOperator.ts b/tests/cases/conformance/controlFlow/controlFlowInOperator.ts
3750new file mode 100644
3751index 0000000000..5dc27c45e8
3752--- /dev/null
3753+++ b/tests/cases/conformance/controlFlow/controlFlowInOperator.ts
3754@@ -0,0 +1,26 @@
3755+const a = 'a';
3756+const b = 'b';
3757+const d = 'd';
3758+
3759+type A = { [a]: number; };
3760+type B = { [b]: string; };
3761+
3762+declare const c: A | B;
3763+
3764+if ('a' in c) {
3765+    c;      // A
3766+    c['a']; // number;
3767+}
3768+
3769+if ('d' in c) {
3770+    c; // never
3771+}
3772+
3773+if (a in c) {
3774+    c;    // A
3775+    c[a]; // number;
3776+}
3777+
3778+if (d in c) {
3779+    c; // never
3780+}
3781diff --git a/tests/cases/conformance/controlFlow/controlFlowInstanceofExtendsFunction.ts b/tests/cases/conformance/controlFlow/controlFlowInstanceofExtendsFunction.ts
3782index 4a1ff7ff86..8780db0c12 100644
3783--- a/tests/cases/conformance/controlFlow/controlFlowInstanceofExtendsFunction.ts
3784+++ b/tests/cases/conformance/controlFlow/controlFlowInstanceofExtendsFunction.ts
3785@@ -29,4 +29,6 @@ export const x: X | number = Math.random() > 0.5 ? new X() : 1
3786 
3787 if (x instanceof X) {
3788     x.why() // should compile
3789-}
3790\ No newline at end of file
3791+}
3792+let xx = new X();
3793+let yy = new Y();
3794\ No newline at end of file
3795diff --git a/tests/cases/conformance/controlFlow/controlFlowSuperPropertyAccess.ts b/tests/cases/conformance/controlFlow/controlFlowSuperPropertyAccess.ts
3796index b42af687c0..b3710bae0d 100644
3797--- a/tests/cases/conformance/controlFlow/controlFlowSuperPropertyAccess.ts
3798+++ b/tests/cases/conformance/controlFlow/controlFlowSuperPropertyAccess.ts
3799@@ -7,3 +7,4 @@ class C extends B {
3800         super.m && super.m();
3801     }
3802 }
3803+let qq3 = new C();
3804\ No newline at end of file
3805diff --git a/tests/cases/conformance/controlFlow/controlFlowTypeofObject.ts b/tests/cases/conformance/controlFlow/controlFlowTypeofObject.ts
3806new file mode 100644
3807index 0000000000..db134447ed
3808--- /dev/null
3809+++ b/tests/cases/conformance/controlFlow/controlFlowTypeofObject.ts
3810@@ -0,0 +1,71 @@
3811+// @strict: true
3812+// @declaration: true
3813+
3814+declare function obj(x: object): void;
3815+
3816+function f1(x: unknown) {
3817+    if (!x) {
3818+        return;
3819+    }
3820+    if (typeof x === 'object') {
3821+        obj(x);
3822+    }
3823+}
3824+
3825+function f2(x: unknown) {
3826+    if (x === null) {
3827+        return;
3828+    }
3829+    if (typeof x === 'object') {
3830+        obj(x);
3831+    }
3832+}
3833+
3834+function f3(x: unknown) {
3835+    if (x == null) {
3836+        return;
3837+    }
3838+    if (typeof x === 'object') {
3839+        obj(x);
3840+    }
3841+}
3842+
3843+function f4(x: unknown) {
3844+    if (x == undefined) {
3845+        return;
3846+    }
3847+    if (typeof x === 'object') {
3848+        obj(x);
3849+    }
3850+}
3851+
3852+function f5(x: unknown) {
3853+    if (!!true) {
3854+        if (!x) {
3855+            return;
3856+        }
3857+    }
3858+    else {
3859+        if (x === null) {
3860+            return;
3861+        }
3862+    }
3863+    if (typeof x === 'object') {
3864+        obj(x);
3865+    }
3866+}
3867+
3868+function f6(x: unknown) {
3869+    if (x === null) {
3870+        x;
3871+    }
3872+    else {
3873+        x;
3874+        if (typeof x === 'object') {
3875+            obj(x);
3876+        }
3877+    }
3878+    if (typeof x === 'object') {
3879+        obj(x);  // Error
3880+    }
3881+}
3882diff --git a/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts b/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts
3883new file mode 100644
3884index 0000000000..55e95ddf09
3885--- /dev/null
3886+++ b/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts
3887@@ -0,0 +1,161 @@
3888+// @strict: true
3889+// @declaration: true
3890+// @target: es2015
3891+
3892+type Action =
3893+    | { kind: 'A', payload: number }
3894+    | { kind: 'B', payload: string };
3895+
3896+function f10({ kind, payload }: Action) {
3897+    if (kind === 'A') {
3898+        payload.toFixed();
3899+    }
3900+    if (kind === 'B') {
3901+        payload.toUpperCase();
3902+    }
3903+}
3904+
3905+function f11(action: Action) {
3906+    const { kind, payload } = action;
3907+    if (kind === 'A') {
3908+        payload.toFixed();
3909+    }
3910+    if (kind === 'B') {
3911+        payload.toUpperCase();
3912+    }
3913+}
3914+
3915+function f12({ kind, payload }: Action) {
3916+    switch (kind) {
3917+        case 'A':
3918+            payload.toFixed();
3919+            break;
3920+        case 'B':
3921+            payload.toUpperCase();
3922+            break;
3923+        default:
3924+            payload;  // never
3925+    }
3926+}
3927+
3928+type Action2 =
3929+    | { kind: 'A', payload: number | undefined }
3930+    | { kind: 'B', payload: string | undefined };
3931+
3932+function f20({ kind, payload }: Action2) {
3933+    if (payload) {
3934+        if (kind === 'A') {
3935+            payload.toFixed();
3936+        }
3937+        if (kind === 'B') {
3938+            payload.toUpperCase();
3939+        }
3940+    }
3941+}
3942+
3943+function f21(action: Action2) {
3944+    const { kind, payload } = action;
3945+    if (payload) {
3946+        if (kind === 'A') {
3947+            payload.toFixed();
3948+        }
3949+        if (kind === 'B') {
3950+            payload.toUpperCase();
3951+        }
3952+    }
3953+}
3954+
3955+function f22(action: Action2) {
3956+    if (action.payload) {
3957+        const { kind, payload } = action;
3958+        if (kind === 'A') {
3959+            payload.toFixed();
3960+        }
3961+        if (kind === 'B') {
3962+            payload.toUpperCase();
3963+        }
3964+    }
3965+}
3966+
3967+function f23({ kind, payload }: Action2) {
3968+    if (payload) {
3969+        switch (kind) {
3970+            case 'A':
3971+                payload.toFixed();
3972+                break;
3973+            case 'B':
3974+                payload.toUpperCase();
3975+                break;
3976+            default:
3977+                payload;  // never
3978+        }
3979+    }
3980+}
3981+
3982+type Foo =
3983+    | { kind: 'A', isA: true }
3984+    | { kind: 'B', isA: false }
3985+    | { kind: 'C', isA: false };
3986+
3987+function f30({ kind, isA }: Foo) {
3988+    if (kind === 'A') {
3989+        isA;   // true
3990+    }
3991+    if (kind === 'B') {
3992+        isA;   // false
3993+    }
3994+    if (kind === 'C') {
3995+        isA;   // false
3996+    }
3997+    if (isA) {
3998+        kind;  // 'A'
3999+    }
4000+    else {
4001+        kind;  // 'B' | 'C'
4002+    }
4003+}
4004+
4005+// Repro from #35283
4006+
4007+interface A<T> { variant: 'a', value: T }
4008+
4009+interface B<T> { variant: 'b', value: Array<T> }
4010+
4011+type AB<T> = A<T> | B<T>;
4012+
4013+declare function printValue<T>(t: T): void;
4014+
4015+declare function printValueList<T>(t: Array<T>): void;
4016+
4017+function unrefined1<T>(ab: AB<T>): void {
4018+    const { variant, value } = ab;
4019+    if (variant === 'a') {
4020+        printValue<T>(value);
4021+    }
4022+    else {
4023+        printValueList<T>(value);
4024+    }
4025+}
4026+
4027+// Repro from #38020
4028+
4029+type Action3 =
4030+    | {type: 'add', payload: { toAdd: number } }
4031+    | {type: 'remove', payload: { toRemove: number } };
4032+
4033+const reducerBroken = (state: number, { type, payload }: Action3) => {
4034+    switch (type) {
4035+        case 'add':
4036+            return state + payload.toAdd;
4037+        case 'remove':
4038+            return state - payload.toRemove;
4039+    }
4040+}
4041+
4042+// Repro from #46143
4043+
4044+declare var it: Iterator<number>;
4045+const { value, done } = it.next();
4046+if (!done) {
4047+    value;  // number
4048+}
4049diff --git a/tests/cases/conformance/controlFlow/typeGuardsNestedAssignments.ts b/tests/cases/conformance/controlFlow/typeGuardsNestedAssignments.ts
4050index 41e3ffe572..1a42e77ae0 100644
4051--- a/tests/cases/conformance/controlFlow/typeGuardsNestedAssignments.ts
4052+++ b/tests/cases/conformance/controlFlow/typeGuardsNestedAssignments.ts
4053@@ -44,4 +44,5 @@ let match: RegExpExecArray | null
4054 
4055 while ((match = re.exec("xxx")) != null) {
4056     const length = match[1].length + match[2].length
4057-}
4058\ No newline at end of file
4059+}
4060+let qq4 = new Foo();
4061\ No newline at end of file
4062diff --git a/tests/cases/conformance/controlFlow/typeGuardsTypeParameters.ts b/tests/cases/conformance/controlFlow/typeGuardsTypeParameters.ts
4063index 169dbc7a7c..708fcceab8 100644
4064--- a/tests/cases/conformance/controlFlow/typeGuardsTypeParameters.ts
4065+++ b/tests/cases/conformance/controlFlow/typeGuardsTypeParameters.ts
4066@@ -33,3 +33,4 @@ function fun<T>(item: { [P in keyof T]: T[P] }) {
4067         }
4068     }
4069 }
4070+let qq6 = new C();
4071\ No newline at end of file
4072diff --git a/tests/cases/conformance/declarationEmit/declarationEmitWorkWithInlineComments.ts b/tests/cases/conformance/declarationEmit/declarationEmitWorkWithInlineComments.ts
4073index a5b3074a5c..20e4ef968e 100644
4074--- a/tests/cases/conformance/declarationEmit/declarationEmitWorkWithInlineComments.ts
4075+++ b/tests/cases/conformance/declarationEmit/declarationEmitWorkWithInlineComments.ts
4076@@ -34,4 +34,7 @@ export class Baz {
4077   constructor(/* @internal */
4078     public isInternal: string
4079   ) {}
4080-}
4081\ No newline at end of file
4082+}
4083+// let ff = new Foo('','','','','','','','','','')
4084+// let bar = new Bar('');
4085+// let baz = new Baz('');
4086\ No newline at end of file
4087diff --git a/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates01.ts b/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates01.ts
4088index 69af9c5b07..1b88b5d2bb 100644
4089--- a/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates01.ts
4090+++ b/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates01.ts
4091@@ -8,4 +8,5 @@ export class C {
4092 }
4093 
4094 export class D extends C {
4095-}
4096\ No newline at end of file
4097+}
4098+let qq6 = new D();
4099\ No newline at end of file
4100diff --git a/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName01.ts b/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName01.ts
4101index 461c7d1757..d22941e2f2 100644
4102--- a/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName01.ts
4103+++ b/tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName01.ts
4104@@ -8,4 +8,5 @@ export class C {
4105 }
4106 
4107 class D extends C {
4108-}
4109\ No newline at end of file
4110+}
4111+let qq7 = new D();
4112\ No newline at end of file
4113diff --git a/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/fs.d.ts b/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/fs.d.ts
4114new file mode 100644
4115index 0000000000..fe6e6774e2
4116--- /dev/null
4117+++ b/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/fs.d.ts
4118@@ -0,0 +1,5 @@
4119+// @filename: node_modules/@types/node/fs.d.ts
4120+declare module "fs" {
4121+    function FSWatcher() 
4122+    // interface FSWatcher {}
4123+}
4124\ No newline at end of file
4125diff --git a/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/main.ts b/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/main.ts
4126new file mode 100644
4127index 0000000000..38de3dcf37
4128--- /dev/null
4129+++ b/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/main.ts
4130@@ -0,0 +1,2 @@
4131+// @filename: main.ts
4132+/// <reference types="node" />
4133\ No newline at end of file
4134diff --git a/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/package.json b/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/package.json
4135new file mode 100644
4136index 0000000000..f93a231130
4137--- /dev/null
4138+++ b/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/package.json
4139@@ -0,0 +1,4 @@
4140+{
4141+    "name": "@types/node",
4142+    "version": "1.0.0"
4143+}
4144\ No newline at end of file
4145diff --git a/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/typeReferenceRelatedFiles.ts b/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/typeReferenceRelatedFiles.ts
4146new file mode 100644
4147index 0000000000..957e4b37af
4148--- /dev/null
4149+++ b/tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles/typeReferenceRelatedFiles.ts
4150@@ -0,0 +1,18 @@
4151+// @declaration: true
4152+// @filename: node_modules/@types/node/index.d.ts
4153+/// <reference path="fs.d.ts" />
4154+
4155+// @filename: node_modules/@types/node/package.json
4156+// {
4157+//     "name": "@types/node",
4158+//     "version": "1.0.0"
4159+// }
4160+// @filename: main.ts
4161+// / <reference types="node" />
4162+import { FSWatcher } from "fs";
4163+
4164+FSWatcher();
4165+
4166+export function f() {
4167+    // return {} as FSWatcher;
4168+}
4169diff --git a/tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter5.ts b/tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter5.ts
4170new file mode 100644
4171index 0000000000..3679047895
4172--- /dev/null
4173+++ b/tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter5.ts
4174@@ -0,0 +1,15 @@
4175+// @target: es2018
4176+// @experimentalDecorators: true
4177+// @noEmitHelpers: true
4178+// @noTypesAndSymbols: true
4179+
4180+// https://github.com/microsoft/TypeScript/issues/44931
4181+interface IFoo { }
4182+declare const IFoo: any;
4183+class BulkEditPreviewProvider {
4184+    static readonly Schema = 'vscode-bulkeditpreview';
4185+    static emptyPreview = { scheme: BulkEditPreviewProvider.Schema };
4186+    constructor(
4187+        @IFoo private readonly _modeService: IFoo,
4188+    ) { }
4189+}
4190\ No newline at end of file
4191diff --git a/tests/cases/conformance/decorators/class/decoratedBlockScopedClass1.ts b/tests/cases/conformance/decorators/class/decoratedBlockScopedClass1.ts
4192new file mode 100644
4193index 0000000000..521dd6a31c
4194--- /dev/null
4195+++ b/tests/cases/conformance/decorators/class/decoratedBlockScopedClass1.ts
4196@@ -0,0 +1,16 @@
4197+// @target: es5
4198+// @experimentaldecorators: true
4199+// @emitDecoratorMetadata: true
4200+// @filename: a.ts
4201+
4202+function decorator() {
4203+    return (target: new (...args: any[]) => any) => {}
4204+}
4205+
4206+@decorator()
4207+class Foo {
4208+    public static func(): Foo {
4209+        return new Foo();
4210+    }
4211+}
4212+Foo.func();
4213diff --git a/tests/cases/conformance/decorators/class/decoratedBlockScopedClass2.ts b/tests/cases/conformance/decorators/class/decoratedBlockScopedClass2.ts
4214new file mode 100644
4215index 0000000000..7d8de6894f
4216--- /dev/null
4217+++ b/tests/cases/conformance/decorators/class/decoratedBlockScopedClass2.ts
4218@@ -0,0 +1,19 @@
4219+// @target: es5
4220+// @experimentaldecorators: true
4221+// @emitDecoratorMetadata: true
4222+// @filename: a.ts
4223+
4224+function decorator() {
4225+    return (target: new (...args: any[]) => any) => {}
4226+}
4227+
4228+try {
4229+    @decorator()
4230+    class Foo {
4231+        public static func(): Foo {
4232+            return new Foo();
4233+        }
4234+    }
4235+    Foo.func();
4236+}
4237+catch (e) {}
4238diff --git a/tests/cases/conformance/decorators/class/decoratedBlockScopedClass3.ts b/tests/cases/conformance/decorators/class/decoratedBlockScopedClass3.ts
4239new file mode 100644
4240index 0000000000..48eebc559f
4241--- /dev/null
4242+++ b/tests/cases/conformance/decorators/class/decoratedBlockScopedClass3.ts
4243@@ -0,0 +1,27 @@
4244+// @target: es5
4245+// @experimentaldecorators: true
4246+// @emitDecoratorMetadata: true
4247+// @filename: a.ts
4248+
4249+function decorator() {
4250+    return (target: new (...args: any[]) => any) => {}
4251+}
4252+
4253+@decorator()
4254+class Foo {
4255+    public static func(): Foo {
4256+        return new Foo();
4257+    }
4258+}
4259+Foo.func();
4260+
4261+try {
4262+    @decorator()
4263+    class Foo {
4264+        public static func(): Foo {
4265+            return new Foo();
4266+        }
4267+    }
4268+    Foo.func();
4269+}
4270+catch (e) {}
4271diff --git a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod14.ts b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod14.ts
4272new file mode 100644
4273index 0000000000..18f3df79bc
4274--- /dev/null
4275+++ b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod14.ts
4276@@ -0,0 +1,14 @@
4277+// @target: esnext
4278+// @experimentaldecorators: true
4279+// @emitdecoratormetadata: true
4280+declare var decorator: any;
4281+
4282+class Foo {
4283+    private prop = () => {
4284+        return 0;
4285+    }
4286+    @decorator
4287+    foo() {
4288+        return 0;
4289+    }
4290+}
4291diff --git a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod15.ts b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod15.ts
4292new file mode 100644
4293index 0000000000..70f86b1bbe
4294--- /dev/null
4295+++ b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod15.ts
4296@@ -0,0 +1,12 @@
4297+// @target: esnext
4298+// @experimentaldecorators: true
4299+// @emitdecoratormetadata: true
4300+declare var decorator: any;
4301+
4302+class Foo {
4303+    private prop = 1
4304+    @decorator
4305+    foo() {
4306+        return 0;
4307+    }
4308+}
4309diff --git a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod16.ts b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod16.ts
4310new file mode 100644
4311index 0000000000..400d4fbe5a
4312--- /dev/null
4313+++ b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod16.ts
4314@@ -0,0 +1,12 @@
4315+// @target: esnext
4316+// @experimentaldecorators: true
4317+// @emitdecoratormetadata: true
4318+declare var decorator: any;
4319+
4320+class Foo {
4321+    private prop
4322+    @decorator
4323+    foo() {
4324+        return 0;
4325+    }
4326+}
4327diff --git a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod17.ts b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod17.ts
4328new file mode 100644
4329index 0000000000..1aa25d7f32
4330--- /dev/null
4331+++ b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod17.ts
4332@@ -0,0 +1,11 @@
4333+// @target: esnext
4334+// @experimentaldecorators: true
4335+// @emitdecoratormetadata: true
4336+declare var decorator: any;
4337+
4338+class Foo {
4339+    private prop @decorator
4340+    foo() {
4341+        return 0;
4342+    }
4343+}
4344diff --git a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod18.ts b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod18.ts
4345new file mode 100644
4346index 0000000000..9417c44c5b
4347--- /dev/null
4348+++ b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod18.ts
4349@@ -0,0 +1,11 @@
4350+// @target: esnext
4351+// @experimentaldecorators: true
4352+// @emitdecoratormetadata: true
4353+declare var decorator: any;
4354+
4355+class Foo {
4356+    p1
4357+
4358+    @decorator()
4359+    p2;
4360+}
4361diff --git a/tests/cases/conformance/decorators/decoratorMetadataWithTypeOnlyImport2.ts b/tests/cases/conformance/decorators/decoratorMetadataWithTypeOnlyImport2.ts
4362new file mode 100644
4363index 0000000000..c63fcf1a16
4364--- /dev/null
4365+++ b/tests/cases/conformance/decorators/decoratorMetadataWithTypeOnlyImport2.ts
4366@@ -0,0 +1,17 @@
4367+// @experimentalDecorators: true
4368+// @emitDecoratorMetadata: true
4369+
4370+
4371+// @filename: services.ts
4372+export namespace Services {
4373+  export class Service {}
4374+}
4375+
4376+// @filename: index.ts
4377+import type { Services } from './services';
4378+
4379+declare const decorator: any;
4380+export class Main {
4381+  @decorator()
4382+  field: Services.Service;
4383+}
4384diff --git a/tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.classMethods.es2015.ts b/tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.classMethods.es2015.ts
4385index fe1bc56dd1..20e20e00dc 100644
4386--- a/tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.classMethods.es2015.ts
4387+++ b/tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.classMethods.es2015.ts
4388@@ -58,3 +58,14 @@ class C9 extends B9 {
4389         super.g();
4390     }
4391 }
4392+
4393+let c1 = new C1();
4394+let c2 = new C2();
4395+let c3 = new C3();
4396+let c4 = new C4();
4397+let c5 = new C5();
4398+let c6 = new C6();
4399+let c7 = new C7();
4400+let c8 = new C8();
4401+let c9 = new C9();
4402+
4403diff --git a/tests/cases/conformance/es2018/es2018IntlAPIs.ts b/tests/cases/conformance/es2018/es2018IntlAPIs.ts
4404new file mode 100644
4405index 0000000000..c1f6739202
4406--- /dev/null
4407+++ b/tests/cases/conformance/es2018/es2018IntlAPIs.ts
4408@@ -0,0 +1,7 @@
4409+// @target: es2018
4410+
4411+// Sample from
4412+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules/supportedLocalesOf
4413+const locales = ['ban', 'id-u-co-pinyin', 'de-ID'];
4414+const options = { localeMatcher: 'lookup' } as const;
4415+console.log(Intl.PluralRules.supportedLocalesOf(locales, options).join(', '));
4416\ No newline at end of file
4417diff --git a/tests/cases/conformance/es2020/es2020IntlAPIs.ts b/tests/cases/conformance/es2020/es2020IntlAPIs.ts
4418new file mode 100644
4419index 0000000000..464ecc01ec
4420--- /dev/null
4421+++ b/tests/cases/conformance/es2020/es2020IntlAPIs.ts
4422@@ -0,0 +1,45 @@
4423+// @target: es2020
4424+
4425+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation
4426+const count = 26254.39;
4427+const date = new Date("2012-05-24");
4428+
4429+function log(locale: string) {
4430+  console.log(
4431+    `${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).format(count)}`
4432+  );
4433+}
4434+
4435+log("en-US");
4436+// expected output: 5/24/2012 26,254.39
4437+
4438+log("de-DE");
4439+// expected output: 24.5.2012 26.254,39
4440+
4441+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat
4442+const rtf1 = new Intl.RelativeTimeFormat('en', { style: 'narrow' });
4443+
4444+console.log(rtf1.format(3, 'quarter'));
4445+//expected output: "in 3 qtrs."
4446+
4447+console.log(rtf1.format(-1, 'day'));
4448+//expected output: "1 day ago"
4449+
4450+const rtf2 = new Intl.RelativeTimeFormat('es', { numeric: 'auto' });
4451+
4452+console.log(rtf2.format(2, 'day'));
4453+//expected output: "pasado mañana"
4454+
4455+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames
4456+const regionNamesInEnglish = new Intl.DisplayNames(['en'], { type: 'region' });
4457+const regionNamesInTraditionalChinese = new Intl.DisplayNames(['zh-Hant'], { type: 'region' });
4458+
4459+console.log(regionNamesInEnglish.of('US'));
4460+// expected output: "United States"
4461+
4462+console.log(regionNamesInTraditionalChinese.of('US'));
4463+// expected output: "美國"
4464+
4465+const locales1 = ['ban', 'id-u-co-pinyin', 'de-ID'];
4466+const options1 = { localeMatcher: 'lookup' } as const;
4467+console.log(Intl.DisplayNames.supportedLocalesOf(locales1, options1).join(', '));
4468\ No newline at end of file
4469diff --git a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAccessInHeritageClause1.ts b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAccessInHeritageClause1.ts
4470index 5d18229ea0..de26b4fc10 100644
4471--- a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAccessInHeritageClause1.ts
4472+++ b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAccessInHeritageClause1.ts
4473@@ -2,4 +2,6 @@ class B {}
4474 function foo() {
4475     return {B: B};
4476 }
4477-class C extends (foo()).B {}
4478\ No newline at end of file
4479+class C extends (foo()).B {}
4480+let qt6 = new B();
4481+let qt7 = new C();
4482\ No newline at end of file
4483diff --git a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts
4484index e5d63f2e93..a872204ec7 100644
4485--- a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts
4486+++ b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts
4487@@ -13,3 +13,4 @@ class D extends Base {
4488         var i = Factory.create(s);
4489     }
4490 }
4491+let qt2 = new D();
4492\ No newline at end of file
4493diff --git a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts
4494index 1b0a0d541e..826baf9d02 100644
4495--- a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts
4496+++ b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts
4497@@ -7,3 +7,4 @@ class D extends Base {
4498         super(() => { this._t }); // no error. only check when this is directly accessing in constructor
4499     }
4500 }
4501+let qt5 = new D();
4502\ No newline at end of file
4503diff --git a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts
4504index 1782027758..10e7ca31aa 100644
4505--- a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts
4506+++ b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts
4507@@ -4,3 +4,4 @@
4508         this._t;  // No error
4509     }
4510 }
4511+let qt4 = new D();
4512\ No newline at end of file
4513diff --git a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts
4514index 5742cdab84..3b55dbc70f 100644
4515--- a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts
4516+++ b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts
4517@@ -10,3 +10,4 @@ class D extends Base {
4518         }
4519     }
4520 }
4521+let qt3 = new D();
4522\ No newline at end of file
4523diff --git a/tests/cases/conformance/es6/spread/arraySpreadImportHelpers.ts b/tests/cases/conformance/es6/spread/arraySpreadImportHelpers.ts
4524new file mode 100644
4525index 0000000000..ebeb117ed0
4526--- /dev/null
4527+++ b/tests/cases/conformance/es6/spread/arraySpreadImportHelpers.ts
4528@@ -0,0 +1,16 @@
4529+// @target: es5
4530+// @importHelpers: true
4531+// @isolatedModules: true
4532+// @noTypesAndSymbols: true
4533+// @noEmit: true
4534+// @filename: main.ts
4535+
4536+export {};
4537+const k = [1, , 2];
4538+const o = [3, ...k, 4];
4539+
4540+// @filename: tslib.d.ts
4541+// this is a pre-TS4.4 versions of emit helper, which always forced array packing
4542+declare module "tslib" {
4543+    function __spreadArray(to: any[], from: any[]): any[];
4544+}
4545diff --git a/tests/cases/conformance/es6/templates/templateStringWithCommentsInArrowFunction.ts b/tests/cases/conformance/es6/templates/templateStringWithCommentsInArrowFunction.ts
4546new file mode 100644
4547index 0000000000..c344bea1fb
4548--- /dev/null
4549+++ b/tests/cases/conformance/es6/templates/templateStringWithCommentsInArrowFunction.ts
4550@@ -0,0 +1,14 @@
4551+// @removeComments: false
4552+
4553+const a = 1;
4554+const f1 = () =>
4555+    `${
4556+      // a
4557+      a
4558+    }a`;
4559+
4560+const f2 = () =>
4561+    `${
4562+      // a
4563+      a
4564+    }`;
4565diff --git a/tests/cases/conformance/expressions/asOperator/asOperatorASI.ts b/tests/cases/conformance/expressions/asOperator/asOperatorASI.ts
4566index a4dd44a15a..ea325aefaf 100644
4567--- a/tests/cases/conformance/expressions/asOperator/asOperatorASI.ts
4568+++ b/tests/cases/conformance/expressions/asOperator/asOperatorASI.ts
4569@@ -8,3 +8,4 @@ as `Hello world`; // should not error
4570 // Example 2
4571 var y = 20
4572 as(Foo); // should emit
4573+let qw11 = new Foo();
4574\ No newline at end of file
4575diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts
4576index 05b8e135cb..285f41f742 100644
4577--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts
4578+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts
4579@@ -191,4 +191,8 @@ var r8b3 = b2 !== a2;
4580 var r8b4 = b3 !== a3;
4581 var r8b5 = b4 !== a4;
4582 var r8b6 = b5 !== a5;
4583-var r8b7 = b6 !== a6;
4584\ No newline at end of file
4585+var r8b7 = b6 !== a6;
4586+let qr1 = new A1();
4587+let qr2 = new B1();
4588+let qr3 = new A2();
4589+let qr4 = new B2();
4590\ No newline at end of file
4591diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIntersectionType.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIntersectionType.ts
4592new file mode 100644
4593index 0000000000..68900e5f91
4594--- /dev/null
4595+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIntersectionType.ts
4596@@ -0,0 +1,5 @@
4597+declare let a: { a: 1 }
4598+a > 1;
4599+
4600+declare let b: { a: 1 } & { b: number }
4601+b > 1;
4602diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts
4603index 5670cf8ef1..441748fb1a 100644
4604--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts
4605+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts
4606@@ -146,4 +146,6 @@ var r8b2 = b2 !== a2;
4607 var r8b3 = b3 !== a3;
4608 var r8b4 = b4 !== a4;
4609 var r8b5 = b5 !== a5;
4610-var r8b6 = b6 !== a6;
4611\ No newline at end of file
4612+var r8b6 = b6 !== a6;
4613+let qe5 = new Derived();
4614+let qe6 = new C();
4615\ No newline at end of file
4616diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts
4617index 8f3d914934..3f0d1adb65 100644
4618--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts
4619+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts
4620@@ -146,4 +146,6 @@ var r8b2 = b2 !== a2;
4621 var r8b3 = b3 !== a3;
4622 var r8b4 = b4 !== a4;
4623 var r8b5 = b5 !== a5;
4624-var r8b6 = b6 !== a6;
4625\ No newline at end of file
4626+var r8b6 = b6 !== a6;
4627+let qe7 = new Derived();
4628+let qe8 = new C();
4629\ No newline at end of file
4630diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts
4631index 6b6ae79015..e60a012739 100644
4632--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts
4633+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts
4634@@ -256,4 +256,5 @@ var r8b8 = b8 !== a8;
4635 var r8b9 = b9 !== a9;
4636 var r8b10 = b10 !== a10;
4637 var r8b11 = b11 !== a11;
4638-//var r8b12 = b12 !== a12;
4639\ No newline at end of file
4640+//var r8b12 = b12 !== a12;
4641+let qw12 = new Derived();
4642\ No newline at end of file
4643diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts
4644index 363192f49f..e42a1cc1c1 100644
4645--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts
4646+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts
4647@@ -218,4 +218,5 @@ var r8b6 = b6 !== a6;
4648 var r8b7 = b7 !== a7;
4649 var r8b8 = b8 !== a8;
4650 var r8b9 = b9 !== a9;
4651-//var r8b10 = b10 !== a10;
4652\ No newline at end of file
4653+//var r8b10 = b10 !== a10;
4654+let qe9 = new Derived();
4655\ No newline at end of file
4656diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts
4657index 8246c6dd18..9154c7f806 100644
4658--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts
4659+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts
4660@@ -104,4 +104,5 @@ var r8a1 = a4 !== b4;
4661 var r8b1 = b1 !== a1;
4662 var r8b1 = b2 !== a2;
4663 var r8b1 = b3 !== a3;
4664-var r8b1 = b4 !== a4;
4665\ No newline at end of file
4666+var r8b1 = b4 !== a4;
4667+let qr5 = new Derived();
4668\ No newline at end of file
4669diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts
4670index da3d4131c6..59f9a78a38 100644
4671--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts
4672+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts
4673@@ -161,4 +161,5 @@ var r8b3 = b3 !== a3;
4674 var r8b4 = b4 !== a4;
4675 var r8b5 = b5 !== a5;
4676 var r8b6 = b6 !== a6;
4677-//var r8b7 = b7 !== a7;
4678\ No newline at end of file
4679+//var r8b7 = b7 !== a7;
4680+let qw14 = new Derived();
4681\ No newline at end of file
4682diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts
4683index 5a2356eadb..05f49336bf 100644
4684--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts
4685+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts
4686@@ -161,4 +161,5 @@ var r8b3 = b3 !== a3;
4687 var r8b4 = b4 !== a4;
4688 var r8b5 = b5 !== a5;
4689 var r8b6 = b6 !== a6;
4690-//var r8b7 = b7 !== a7;
4691\ No newline at end of file
4692+//var r8b7 = b7 !== a7;
4693+let qw13 = new Derived();
4694\ No newline at end of file
4695diff --git a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts
4696index 6401feb11c..fb2cd09f76 100644
4697--- a/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts
4698+++ b/tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts
4699@@ -75,4 +75,8 @@ var rg4 = b2 === a2;
4700 var rh1 = a1 !== b1;
4701 var rh2 = a2 !== b2;
4702 var rh3 = b1 !== a1;
4703-var rh4 = b2 !== a2;
4704\ No newline at end of file
4705+var rh4 = b2 !== a2;
4706+let qe1 = new Derived();
4707+let qe2 = new A1();
4708+let qe3 = new B1();
4709+let qe4 = new B2();
4710\ No newline at end of file
4711diff --git a/tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.ts b/tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.ts
4712index b99f8d7114..1399026e80 100644
4713--- a/tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.ts
4714+++ b/tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.ts
4715@@ -19,3 +19,6 @@ declare class NormalToString {
4716 function baz(normal: NormalToString) {
4717     return normal instanceof NormalToString;
4718 }
4719+let qr7 = new StaticToString();
4720+let qr8 = new StaticToNumber();
4721+let qr9 = new NormalToString();
4722\ No newline at end of file
4723diff --git a/tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsObject.ts b/tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsObject.ts
4724index 6b88cd39f2..47a60b104b 100644
4725--- a/tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsObject.ts
4726+++ b/tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsObject.ts
4727@@ -12,3 +12,4 @@ var r1 = a instanceof x1;
4728 var r2 = b instanceof x2;
4729 var r3 = c instanceof x1;
4730 var r4 = d instanceof x1;
4731+let qr0 = new C();
4732\ No newline at end of file
4733diff --git a/tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandObjectType.ts b/tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandObjectType.ts
4734index 0a6a47dfbb..4e2e1e494d 100644
4735--- a/tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandObjectType.ts
4736+++ b/tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandObjectType.ts
4737@@ -38,3 +38,4 @@ var resultIsObject8 = (true, {});
4738 var resultIsObject9 = (!BOOLEAN, { a: 1, b: "s" });
4739 var resultIsObject10 = ("string", new Date());
4740 var resultIsObject11 = (STRING.toLowerCase(), new CLASS());
4741+let qw10 = new CLASS();
4742\ No newline at end of file
4743diff --git a/tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithIdenticalBCT.ts b/tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithIdenticalBCT.ts
4744index 11652b023d..93bdd906c6 100644
4745--- a/tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithIdenticalBCT.ts
4746+++ b/tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithIdenticalBCT.ts
4747@@ -44,3 +44,6 @@ var result10: (t: X) => any = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
4748 
4749 //Expr1 and Expr2 are literals
4750 var result11: any = true ? 1 : 'string';
4751+
4752+let qq1 = new A();
4753+let qq0 = new B();
4754diff --git a/tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping1.ts b/tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping1.ts
4755index 7bcde9a695..fc8bde2595 100644
4756--- a/tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping1.ts
4757+++ b/tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping1.ts
4758@@ -9,3 +9,5 @@ class B extends A<number, string> {
4759     // Ensure 'value' is of type 'number (and not '{}') by using its 'toExponential()' method.
4760     constructor() { super(value => String(value.toExponential())); }
4761 }
4762+
4763+let  qr17 = new B();
4764diff --git a/tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping3.ts b/tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping3.ts
4765index 760337f3ef..6eac51e440 100644
4766--- a/tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping3.ts
4767+++ b/tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping3.ts
4768@@ -28,4 +28,5 @@ class C extends CBase<string> {
4769             }
4770         });
4771     }
4772-}
4773\ No newline at end of file
4774+}
4775+let qt1 = new C();
4776\ No newline at end of file
4777diff --git a/tests/cases/conformance/expressions/functionCalls/callWithSpread.ts b/tests/cases/conformance/expressions/functionCalls/callWithSpread.ts
4778index b1e2ee7578..3ba8aa488a 100644
4779--- a/tests/cases/conformance/expressions/functionCalls/callWithSpread.ts
4780+++ b/tests/cases/conformance/expressions/functionCalls/callWithSpread.ts
4781@@ -55,3 +55,4 @@ class D extends C {
4782         super.foo(1, 2, ...a);
4783     }
4784 }
4785+let qr13 = new D();
4786\ No newline at end of file
4787diff --git a/tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts b/tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts
4788index 707ef02de8..304d6792dc 100644
4789--- a/tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts
4790+++ b/tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts
4791@@ -96,3 +96,4 @@ function tryCatchFn() {
4792         var m = () => this + '';
4793     }
4794 }
4795+let qr14 = new MyClass();
4796diff --git a/tests/cases/conformance/expressions/newOperator/newOperatorConformance.ts b/tests/cases/conformance/expressions/newOperator/newOperatorConformance.ts
4797index b50751c7ae..051e4e3c3e 100644
4798--- a/tests/cases/conformance/expressions/newOperator/newOperatorConformance.ts
4799+++ b/tests/cases/conformance/expressions/newOperator/newOperatorConformance.ts
4800@@ -60,3 +60,4 @@ var t: any;
4801 var nested = new (new (new nestedCtor())())();
4802 var n = new nested();
4803 var n = new nested();
4804+let aa1 = new C1(null,null);
4805\ No newline at end of file
4806diff --git a/tests/cases/conformance/expressions/superCalls/superCalls.ts b/tests/cases/conformance/expressions/superCalls/superCalls.ts
4807index fdebc85906..da0fe9656b 100644
4808--- a/tests/cases/conformance/expressions/superCalls/superCalls.ts
4809+++ b/tests/cases/conformance/expressions/superCalls/superCalls.ts
4810@@ -27,3 +27,5 @@ class OtherDerived extends OtherBase {
4811         super();
4812     }
4813 }
4814+let qr15 = new Derived(null);
4815+let qr16 = new OtherDerived();
4816\ No newline at end of file
4817diff --git a/tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts b/tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts
4818new file mode 100644
4819index 0000000000..99d6a50b00
4820--- /dev/null
4821+++ b/tests/cases/conformance/expressions/thisKeyword/typeOfThisGeneral.ts
4822@@ -0,0 +1,178 @@
4823+// @target: esnext
4824+// @useDefineForClassFields: false
4825+class MyTestClass {
4826+    private canary: number;
4827+    static staticCanary: number;
4828+
4829+    constructor() {
4830+        //type of 'this' in constructor body is the class instance type
4831+        var p = this.canary;
4832+        var p: number;
4833+        this.canary = 3;
4834+    }
4835+
4836+    //type of 'this' in member function param list is the class instance type
4837+    memberFunc(t = this) {
4838+        var t: MyTestClass;
4839+
4840+        //type of 'this' in member function body is the class instance type
4841+        var p = this;
4842+        var p: MyTestClass;
4843+    }
4844+
4845+    //type of 'this' in member accessor(get and set) body is the class instance type
4846+    get prop() {
4847+        var p = this;
4848+        var p: MyTestClass;
4849+        return this;
4850+    }
4851+    set prop(v) {
4852+        var p = this;
4853+        var p: MyTestClass;
4854+        p = v;
4855+        v = p;
4856+    }
4857+
4858+    someFunc = () => {
4859+        //type of 'this' in member variable initializer is the class instance type
4860+        var t = this;
4861+        var t: MyTestClass;
4862+    };
4863+
4864+    //type of 'this' in static function param list is constructor function type
4865+    static staticFn(t = this) {
4866+        var t: typeof MyTestClass;
4867+        var t = MyTestClass;
4868+        t.staticCanary;
4869+
4870+        //type of 'this' in static function body is constructor function type
4871+        var p = this;
4872+        var p: typeof MyTestClass;
4873+        var p = MyTestClass;
4874+        p.staticCanary;
4875+    }
4876+
4877+    static get staticProp() {
4878+        //type of 'this' in static accessor body is constructor function type
4879+        var p = this;
4880+        var p: typeof MyTestClass;
4881+        var p = MyTestClass;
4882+        p.staticCanary;
4883+        return this;
4884+    }
4885+    static set staticProp(v: typeof MyTestClass) {
4886+        //type of 'this' in static accessor body is constructor function type
4887+        var p = this;
4888+        var p: typeof MyTestClass;
4889+        var p = MyTestClass;
4890+        p.staticCanary;
4891+    }
4892+}
4893+
4894+class MyGenericTestClass<T, U> {
4895+    private canary: number;
4896+    static staticCanary: number;
4897+
4898+    constructor() {
4899+        //type of 'this' in constructor body is the class instance type
4900+        var p = this.canary;
4901+        var p: number;
4902+        this.canary = 3;
4903+    }
4904+
4905+    //type of 'this' in member function param list is the class instance type
4906+    memberFunc(t = this) {
4907+        var t: MyGenericTestClass<T, U>;
4908+
4909+        //type of 'this' in member function body is the class instance type
4910+        var p = this;
4911+        var p: MyGenericTestClass<T, U>;
4912+    }
4913+
4914+    //type of 'this' in member accessor(get and set) body is the class instance type
4915+    get prop() {
4916+        var p = this;
4917+        var p: MyGenericTestClass<T, U>;
4918+        return this;
4919+    }
4920+    set prop(v) {
4921+        var p = this;
4922+        var p: MyGenericTestClass<T, U>;
4923+        p = v;
4924+        v = p;
4925+    }
4926+
4927+    someFunc = () => {
4928+        //type of 'this' in member variable initializer is the class instance type
4929+        var t = this;
4930+        var t: MyGenericTestClass<T, U>;
4931+    };
4932+
4933+    //type of 'this' in static function param list is constructor function type
4934+    static staticFn(t = this) {
4935+        var t: typeof MyGenericTestClass;
4936+        var t = MyGenericTestClass;
4937+        t.staticCanary;
4938+
4939+        //type of 'this' in static function body is constructor function type
4940+        var p = this;
4941+        var p: typeof MyGenericTestClass;
4942+        var p = MyGenericTestClass;
4943+        p.staticCanary;
4944+    }
4945+
4946+    static get staticProp() {
4947+        //type of 'this' in static accessor body is constructor function type
4948+        var p = this;
4949+        var p: typeof MyGenericTestClass;
4950+        var p = MyGenericTestClass;
4951+        p.staticCanary;
4952+        return this;
4953+    }
4954+    static set staticProp(v: typeof MyGenericTestClass) {
4955+        //type of 'this' in static accessor body is constructor function type
4956+        var p = this;
4957+        var p: typeof MyGenericTestClass;
4958+        var p = MyGenericTestClass;
4959+        p.staticCanary;
4960+    }
4961+}
4962+
4963+//type of 'this' in a function declaration param list is Any
4964+function fn(s = this) {
4965+    var s: any;
4966+    s.spaaaaaaace = 4;
4967+
4968+    //type of 'this' in a function declaration body is Any
4969+    var t: any;
4970+    var t = this;
4971+    this.spaaaaace = 4;
4972+}
4973+
4974+//type of 'this' in a function expression param list list is Any
4975+var q1 = function (s = this) {
4976+    var s: any;
4977+    s.spaaaaaaace = 4;
4978+
4979+    //type of 'this' in a function expression body is Any
4980+    var t: any;
4981+    var t = this;
4982+    this.spaaaaace = 4;
4983+}
4984+
4985+//type of 'this' in a fat arrow expression param list is typeof globalThis
4986+var q2 = (s = this) => {
4987+    var s: typeof globalThis;
4988+    s.spaaaaaaace = 4;
4989+
4990+    //type of 'this' in a fat arrow expression body is typeof globalThis
4991+    var t: typeof globalThis;
4992+    var t = this;
4993+    this.spaaaaace = 4;
4994+}
4995+
4996+//type of 'this' in global module is GlobalThis
4997+var t: typeof globalThis;
4998+var t = this;
4999+this.spaaaaace = 4;
5000+
5001diff --git a/tests/cases/conformance/expressions/typeGuards/TypeGuardWithArrayUnion.ts b/tests/cases/conformance/expressions/typeGuards/TypeGuardWithArrayUnion.ts
5002index 8884754b48..c6378e0dc3 100644
5003--- a/tests/cases/conformance/expressions/typeGuards/TypeGuardWithArrayUnion.ts
5004+++ b/tests/cases/conformance/expressions/typeGuards/TypeGuardWithArrayUnion.ts
5005@@ -7,3 +7,4 @@ function saySize(message: Message | Message[]) {
5006         return message.length;  // Should have type Message[] here
5007     }
5008 }
5009+let rr5 = new Message();
5010\ No newline at end of file
5011diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardFunction.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardFunction.ts
5012index 57d56ccc3b..0f531ea811 100644
5013--- a/tests/cases/conformance/expressions/typeGuards/typeGuardFunction.ts
5014+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardFunction.ts
5015@@ -80,4 +80,8 @@ acceptingTypeGuardFunction(isA);
5016 
5017 // Binary expressions
5018 let union2: C | B;
5019-let union3: boolean | B = isA(union2) || union2;
5020\ No newline at end of file
5021+let union3: boolean | B = isA(union2) || union2;
5022+
5023+let ee2 = new B();
5024+let ee3 = new C();
5025+let ee4 = new D();
5026\ No newline at end of file
5027diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardFunctionGenerics.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardFunctionGenerics.ts
5028index d0e108b573..3511cc54b1 100644
5029--- a/tests/cases/conformance/expressions/typeGuards/typeGuardFunctionGenerics.ts
5030+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardFunctionGenerics.ts
5031@@ -30,4 +30,6 @@ let test2: B = funC(isB);
5032 if (funD(isC, a)) {
5033     a.propC;
5034 }
5035-let test3: B = funE(isB, 1);
5036\ No newline at end of file
5037+let test3: B = funE(isB, 1);
5038+let qw7 = new B();
5039+let qw8 = new C();
5040\ No newline at end of file
5041diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts
5042index 1ed8e6ebb0..e14dd79116 100644
5043--- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts
5044+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts
5045@@ -43,4 +43,5 @@ if (typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool) {
5046 }
5047 else {
5048     var r3: string | number | boolean = strOrNumOrBool; // string | number | boolean
5049-}
5050\ No newline at end of file
5051+}
5052+let rr1 = new C();
5053\ No newline at end of file
5054diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts
5055index 1d72f35828..3411e32bcf 100644
5056--- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts
5057+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts
5058@@ -43,4 +43,5 @@ if (typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool) {
5059 }
5060 else {
5061     numOrBool = strOrNumOrBool; // number | boolean
5062-}
5063\ No newline at end of file
5064+}
5065+let qw2 = new C();
5066\ No newline at end of file
5067diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts
5068index 31514fca74..db3d488209 100644
5069--- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts
5070+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts
5071@@ -1,25 +1,25 @@
5072-// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' 
5073-// and C has a property named 'prototype'
5074-//  - when true, narrows the type of x to the type of the 'prototype' property in C provided 
5075-//    it is a subtype of the type of x, or
5076-//  - when false, has no effect on the type of x.
5077-
5078-class C1 {
5079-    p1: string;
5080-}
5081-class C2 {
5082-    p2: number;
5083-}
5084-class D1 extends C1 {
5085-    p3: number;
5086-}
5087+// A type guard of the form x instanceof C, where C is of a subtype of the global type 'Function' 
5088+// and C has a property named 'prototype'
5089+//  - when true, narrows the type of x to the type of the 'prototype' property in C provided 
5090+//    it is a subtype of the type of x, or
5091+//  - when false, has no effect on the type of x.
5092+
5093+class C1 {
5094+    p1: string;
5095+}
5096+class C2 {
5097+    p2: number;
5098+}
5099+class D1 extends C1 {
5100+    p3: number;
5101+}
5102 class C3 {
5103     p4: number;
5104 }
5105-var str: string;
5106-var num: number;
5107-var strOrNum: string | number;
5108-
5109+var str: string;
5110+var num: number;
5111+var strOrNum: string | number;
5112+
5113 var ctor1: C1 | C2;
5114 str = ctor1 instanceof C1 && ctor1.p1; // C1
5115 num = ctor1 instanceof C2 && ctor1.p2; // C2
5116@@ -31,7 +31,7 @@ num = ctor2 instanceof C2 && ctor2.p2; // C2
5117 num = ctor2 instanceof D1 && ctor2.p3; // D1
5118 str = ctor2 instanceof D1 && ctor2.p1; // D1
5119 var r2: D1 | C2 = ctor2 instanceof C1 && ctor2; // C2 | D1
5120-
5121+
5122 var ctor3: C1 | C2;
5123 if (ctor3 instanceof C1) {
5124     ctor3.p1; // C1
5125@@ -64,4 +64,7 @@ if (ctor6 instanceof C1 || ctor6 instanceof C2) {
5126 }
5127 else {
5128     ctor6.p4; // C3
5129-}
5130\ No newline at end of file
5131+}
5132+let qw4 = new C2();
5133+let qw3 = new D1();
5134+let qw5 = new C3();
5135\ No newline at end of file
5136diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormIsType.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormIsType.ts
5137index 9f5ca611ee..e0953773d5 100644
5138--- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormIsType.ts
5139+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormIsType.ts
5140@@ -34,4 +34,7 @@ var c2Ord1: C2 | D1;
5141 num = isC2(c2Ord1) && c2Ord1.p2; // C2
5142 num = isD1(c2Ord1) && c2Ord1.p3; // D1
5143 str = isD1(c2Ord1) && c2Ord1.p1; // D1
5144-var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1
5145\ No newline at end of file
5146+var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1
5147+
5148+let rr2 = new C2();
5149+let rr3 = new D1();
5150\ No newline at end of file
5151diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts
5152index 37651071b7..610f0da2c8 100644
5153--- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts
5154+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts
5155@@ -83,3 +83,4 @@ if (typeof strOrNum !== "boolean") {
5156 else {
5157     let z2: {} = strOrNum; // {}
5158 }
5159+let qw9 = new C();
5160\ No newline at end of file
5161diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts
5162index b4cdf81660..f00736781f 100644
5163--- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts
5164+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts
5165@@ -82,3 +82,4 @@ if (typeof strOrBool !== "number") {
5166 else {
5167     let y2: {} = strOrBool; // {}
5168 }
5169+let ee6 = new C();
5170\ No newline at end of file
5171diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts
5172index f742124708..a20093f868 100644
5173--- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts
5174+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts
5175@@ -82,3 +82,4 @@ if (typeof numOrBool !== "string") {
5176 else {
5177     let x2: {} = numOrBool; // {}
5178 }
5179+let rr4 = new C();
5180\ No newline at end of file
5181diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFromPropNameInUnionType.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFromPropNameInUnionType.ts
5182index e1256e4288..ceee99f7e2 100644
5183--- a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFromPropNameInUnionType.ts
5184+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFromPropNameInUnionType.ts
5185@@ -103,3 +103,12 @@ function f(i: Indexed) {
5186     }
5187     return "c" in i && i.c;
5188 }
5189+let tt1 = new A();
5190+let tt2 = new B();
5191+let tt3 = new C();
5192+let tt4 = new D();
5193+let tt5 = new AWithOptionalProp();
5194+let tt6 = new BWithOptionalProp();
5195+let tt7 = new ClassWithUnionProp();
5196+let tt8 = new InMemberOfClass();
5197+let tt9 = new SelfAssert();
5198\ No newline at end of file
5199diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts
5200index 04b9a6a394..044131068a 100644
5201--- a/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts
5202+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts
5203@@ -101,3 +101,4 @@ class ClassWithAccessors {
5204         num = typeof var2 === "string" && var2.length; // string
5205     }
5206 }
5207+let ee1 = new ClassWithAccessors();
5208\ No newline at end of file
5209diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts
5210index cb1327027c..7bb36dfefe 100644
5211--- a/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts
5212+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts
5213@@ -65,3 +65,4 @@ class C1 {
5214         num = typeof param === "string" && param.length; // string
5215     }
5216 }
5217+let qw1 = new C1(null);
5218\ No newline at end of file
5219diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts
5220index bffe8d3d1b..b7fd3f9c34 100644
5221--- a/tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts
5222+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts
5223@@ -24,4 +24,5 @@ strOrNum = typeof c1.pp3 === "string" && c1.pp3; // string | number
5224 var obj1: {
5225     x: string | number;
5226 };
5227-strOrNum = typeof obj1.x === "string" && obj1.x;  // string | number
5228\ No newline at end of file
5229+strOrNum = typeof obj1.x === "string" && obj1.x;  // string | number
5230+let ee5 = new C1();
5231\ No newline at end of file
5232diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsOnClassProperty.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsOnClassProperty.ts
5233index 2c26b10c6a..574f2af39c 100644
5234--- a/tests/cases/conformance/expressions/typeGuards/typeGuardsOnClassProperty.ts
5235+++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsOnClassProperty.ts
5236@@ -25,4 +25,5 @@ var o: {
5237 
5238 if (typeof o.prop1 === "string" && o.prop1.toLowerCase()) {}
5239 var prop1 = o.prop1;
5240-if (typeof prop1 === "string" && prop1.toLocaleLowerCase()) { }
5241\ No newline at end of file
5242+if (typeof prop1 === "string" && prop1.toLocaleLowerCase()) { }
5243+let qw6 = new D();
5244\ No newline at end of file
5245diff --git a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts
5246index b41a114503..87e1d09bea 100644
5247--- a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts
5248+++ b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts
5249@@ -43,4 +43,5 @@ var ResultIsNumber13 = ~~~(NUMBER + NUMBER);
5250 ~foo();
5251 ~objA.a;
5252 ~M.n;
5253-~objA.a, M.n;
5254\ No newline at end of file
5255+~objA.a, M.n;
5256+let qr11 = new A();
5257\ No newline at end of file
5258diff --git a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts
5259index 0b60c73ef9..4495309b10 100644
5260--- a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts
5261+++ b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts
5262@@ -42,4 +42,5 @@ var ResultIsNumber14 = ~~~(STRING + STRING);
5263 ~STRING;
5264 ~STRING1;
5265 ~foo();
5266-~objA.a,M.n;
5267\ No newline at end of file
5268+~objA.a,M.n;
5269+let qr12 = new A();
5270\ No newline at end of file
5271diff --git a/tests/cases/conformance/externalModules/exportNonVisibleType.ts b/tests/cases/conformance/externalModules/exportNonVisibleType.ts
5272index 4f4722fd86..cc56bd2f0b 100644
5273--- a/tests/cases/conformance/externalModules/exportNonVisibleType.ts
5274+++ b/tests/cases/conformance/externalModules/exportNonVisibleType.ts
5275@@ -31,3 +31,4 @@ class C1 {
5276 }
5277 
5278 export = C1; // Should work, private type I1 of visible class C1 only used in private member m1.
5279+let qt8 = new C1();
5280\ No newline at end of file
5281diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts
5282new file mode 100644
5283index 0000000000..83e86fc6c6
5284--- /dev/null
5285+++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts
5286@@ -0,0 +1,12 @@
5287+// @moduleResolution: node12
5288+// @module: node12
5289+
5290+// @filename: /src/foo.mts
5291+export function foo() {
5292+    return "";
5293+}
5294+
5295+// @filename: /src/bar.mts
5296+// Extensionless relative path ES import in an ES module
5297+import { foo } from "./foo"; // should error, suggest adding ".mjs"
5298+import { baz } from "./baz"; // should error, ask for extension, no extension suggestion
5299diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension2.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension2.ts
5300new file mode 100644
5301index 0000000000..0051e17401
5302--- /dev/null
5303+++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension2.ts
5304@@ -0,0 +1,6 @@
5305+// @moduleResolution: node12
5306+// @module: node12
5307+
5308+// @filename: /src/buzz.mts
5309+// Extensionless relative path cjs import in an ES module
5310+import foo = require("./foo"); // should error, should not ask for extension
5311\ No newline at end of file
5312diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts
5313new file mode 100644
5314index 0000000000..2ec3ff1ad0
5315--- /dev/null
5316+++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts
5317@@ -0,0 +1,12 @@
5318+// @moduleResolution: nodenext
5319+// @module: nodenext
5320+// @jsx: preserve
5321+
5322+// @filename: /src/foo.tsx
5323+export function foo() {
5324+    return "";
5325+}
5326+
5327+// @filename: /src/bar.mts
5328+// Extensionless relative path ES import in an ES module
5329+import { foo } from "./foo"; // should error, suggest adding ".jsx"
5330diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts
5331new file mode 100644
5332index 0000000000..c1eab70f92
5333--- /dev/null
5334+++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts
5335@@ -0,0 +1,12 @@
5336+// @moduleResolution: nodenext
5337+// @module: nodenext
5338+// @jsx: react
5339+
5340+// @filename: /src/foo.tsx
5341+export function foo() {
5342+    return "";
5343+}
5344+
5345+// @filename: /src/bar.mts
5346+// Extensionless relative path ES import in an ES module
5347+import { foo } from "./foo"; // should error, suggest adding ".js"
5348diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension5.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension5.ts
5349new file mode 100644
5350index 0000000000..5053a242cd
5351--- /dev/null
5352+++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension5.ts
5353@@ -0,0 +1,6 @@
5354+// @moduleResolution: node12
5355+// @module: node12
5356+
5357+// @filename: /src/buzz.mts
5358+// Extensionless relative path dynamic import in an ES module
5359+import("./foo").then(x => x); // should error, ask for extension
5360\ No newline at end of file
5361diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension6.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension6.ts
5362new file mode 100644
5363index 0000000000..2a6ef2645d
5364--- /dev/null
5365+++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension6.ts
5366@@ -0,0 +1,8 @@
5367+// @moduleResolution: node12
5368+// @module: node12
5369+
5370+// @filename: /src/bar.cts
5371+// Extensionless relative path import statement in a cjs module
5372+// Import statements are not allowed in cjs files,
5373+// but other errors should not assume that they are allowed
5374+import { foo } from "./foo"; // should error, should not ask for extension
5375\ No newline at end of file
5376diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension7.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension7.ts
5377new file mode 100644
5378index 0000000000..3b10dd6e48
5379--- /dev/null
5380+++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension7.ts
5381@@ -0,0 +1,6 @@
5382+// @moduleResolution: node12
5383+// @module: node12
5384+
5385+// @filename: /src/bar.cts
5386+// Extensionless relative path cjs import in a cjs module
5387+import foo = require("./foo"); // should error, should not ask for extension
5388\ No newline at end of file
5389diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension8.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension8.ts
5390new file mode 100644
5391index 0000000000..fef17b3aa1
5392--- /dev/null
5393+++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension8.ts
5394@@ -0,0 +1,6 @@
5395+// @moduleResolution: node12
5396+// @module: node12
5397+
5398+// @filename: /src/bar.cts
5399+// Extensionless relative path dynamic import in a cjs module
5400+import("./foo").then(x => x); // should error, ask for extension
5401\ No newline at end of file
5402diff --git a/tests/cases/conformance/externalModules/typeOnly/exportSpecifiers.ts b/tests/cases/conformance/externalModules/typeOnly/exportSpecifiers.ts
5403new file mode 100644
5404index 0000000000..c8c584f66d
5405--- /dev/null
5406+++ b/tests/cases/conformance/externalModules/typeOnly/exportSpecifiers.ts
5407@@ -0,0 +1,21 @@
5408+// @module: esnext
5409+// @declaration: true
5410+
5411+// @Filename: /imports.ts
5412+import { type, as, something, foo, bar } from "./exports.js";
5413+type;
5414+as; // Error (used in emitting position)
5415+something; // Error (used in emitting position)
5416+foo; // Error (used in emitting position)
5417+bar; // Error (used in emitting position)
5418+
5419+// @Filename: /exports.ts
5420+const type = 0;
5421+const as = 0;
5422+const something = 0;
5423+export { type };
5424+export { type as };
5425+export { type something };
5426+export { type type as foo };
5427+export { type as as bar };
5428+export type { type something as whatever }; // Error
5429diff --git a/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType/a.ts b/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType/a.ts
5430new file mode 100644
5431index 0000000000..3e949a0611
5432--- /dev/null
5433+++ b/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType/a.ts
5434@@ -0,0 +1,2 @@
5435+// @Filename: /a.ts
5436+export default class A {}
5437\ No newline at end of file
5438diff --git a/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.ts b/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.ts
5439new file mode 100644
5440index 0000000000..3bb8cdfce2
5441--- /dev/null
5442+++ b/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.ts
5443@@ -0,0 +1,5 @@
5444+
5445+
5446+// @Filename: /b.ts
5447+import type from './a';
5448+type;
5449\ No newline at end of file
5450diff --git a/tests/cases/conformance/externalModules/typeOnly/importSpecifiers1.ts b/tests/cases/conformance/externalModules/typeOnly/importSpecifiers1.ts
5451new file mode 100644
5452index 0000000000..348784befd
5453--- /dev/null
5454+++ b/tests/cases/conformance/externalModules/typeOnly/importSpecifiers1.ts
5455@@ -0,0 +1,46 @@
5456+// @module: esnext
5457+// @declaration: true
5458+
5459+// @Filename: /mod.ts
5460+export const as = 0;
5461+export const type = 0;
5462+export const something = 0;
5463+
5464+// @Filename: /a.ts
5465+import { type } from "./mod.js";
5466+import { type as } from "./mod.js";
5467+type;
5468+as; // Error (used in emitting position)
5469+
5470+// @Filename: /b.ts
5471+import { type as as } from "./mod.js";
5472+type; // Error (cannot resolve name)
5473+as;
5474+
5475+// @Filename: /c.ts
5476+import { type as as as } from "./mod.js";
5477+type; // Error (cannot resolve name)
5478+as; // Error (used in emitting position)
5479+
5480+// @Filename: /d.ts
5481+import { type as as as as } from "./mod.js"; // Error
5482+
5483+// @Filename: /e.ts
5484+import { type type as as } from "./mod.js";
5485+import { type as type } from "./mod.js";
5486+type;
5487+as; // Error (used in emitting position)
5488+
5489+// @Filename: /f.ts
5490+import { type import } from "./mod.js"; // Error
5491+import { type as export } from "./mod.js"; // Error
5492+import { type as as export } from "./mod.js"; // Error
5493+import { type something } from "./mod.js";
5494+import { type something as s } from "./mod.js";
5495+type; // Error (cannot resolve name)
5496+as; // Error (cannot resolve name)
5497+something; // Error (used in emitting position)
5498+s; // Error (used in emitting position)
5499+
5500+// @Filename: /g.ts
5501+import type { type something } from "./mod.js"; // Error
5502diff --git a/tests/cases/conformance/externalModules/typeOnly/preserveValueImports.ts b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports.ts
5503new file mode 100644
5504index 0000000000..66326cb98b
5505--- /dev/null
5506+++ b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports.ts
5507@@ -0,0 +1,28 @@
5508+// @preserveValueImports: true
5509+// @isolatedModules: true,false
5510+// @module: esnext
5511+
5512+// @Filename: a.ts
5513+export default {};
5514+export const b = 0;
5515+export const c = 1;
5516+export interface D {}
5517+
5518+// @Filename: b.ts
5519+import a, { b, c, D } from "./a";
5520+
5521+// @Filename: c.ts
5522+import * as a from "./a";
5523+
5524+// @Filename: d.ts
5525+export = {};
5526+
5527+// @Filename: e.ts
5528+import D = require("./d");
5529+import DD = require("./d");
5530+DD;
5531+
5532+// @Filename: f.ts
5533+import type a from "./a";
5534+import { b, c } from "./a";
5535+b;
5536diff --git a/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_errors.ts b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_errors.ts
5537new file mode 100644
5538index 0000000000..fc2a3612e7
5539--- /dev/null
5540+++ b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_errors.ts
5541@@ -0,0 +1,47 @@
5542+// @preserveValueImports: true
5543+// @isolatedModules: true,false
5544+// @module: esnext
5545+
5546+// @Filename: a.ts
5547+export type A = {};
5548+export type { A as default };
5549+
5550+// @Filename: b.ts
5551+class B {};
5552+export type { B, B as default };
5553+
5554+// @Filename: c.ts
5555+import DefaultA from "./a";
5556+import { A } from "./a";
5557+import DefaultB from "./b";
5558+import { B } from "./b";
5559+
5560+// @Filename: c.fixed.ts
5561+import type DefaultA from "./a";
5562+import type { A } from "./a";
5563+import type DefaultB from "./b";
5564+import type { B } from "./b";
5565+
5566+// @Filename: d.ts
5567+export { A as AA } from "./a";
5568+export { B as BB } from "./b";
5569+
5570+// @Filename: d.fixed.ts
5571+export type { A as AA } from "./a";
5572+export type { B as BB } from "./b";
5573+
5574+// @Filename: e.ts
5575+import { AA, BB } from "./d";
5576+
5577+// @Filename: e.fixed.ts
5578+import type { AA, BB } from "./d";
5579+
5580+// @Filename: f.ts
5581+import type { A } from "./a";
5582+import type { B } from "./b";
5583+export { A, B as BB };
5584+
5585+// @Filename: f.fixed.ts
5586+import type { A } from "./a";
5587+import type { B } from "./b";
5588+export type { A, B as BB };
5589diff --git a/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_importsNotUsedAsValues.ts b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_importsNotUsedAsValues.ts
5590new file mode 100644
5591index 0000000000..4797a30727
5592--- /dev/null
5593+++ b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_importsNotUsedAsValues.ts
5594@@ -0,0 +1,14 @@
5595+// @preserveValueImports: true
5596+// @importsNotUsedAsValues: preserve
5597+// @module: esnext
5598+
5599+// @Filename: /mod.ts
5600+export type A = unknown;
5601+export type B = never;
5602+export type C = any;
5603+
5604+// @Filename: /index.ts
5605+import { type A, type B, type C } from "./mod.js";
5606+
5607+// @Filename: /reexport.ts
5608+export { type A, type B, type C } from "./mod.js";
5609diff --git a/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_mixedImports.ts b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_mixedImports.ts
5610new file mode 100644
5611index 0000000000..85cbae30f7
5612--- /dev/null
5613+++ b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_mixedImports.ts
5614@@ -0,0 +1,13 @@
5615+// @preserveValueImports: true
5616+// @isolatedModules: true
5617+// @module: es2015
5618+
5619+// @Filename: /exports.ts
5620+export function Component() {}
5621+export interface ComponentProps {}
5622+
5623+// @Filename: /index.ts
5624+import { Component, ComponentProps } from "./exports.js";
5625+
5626+// @Filename: /index.fixed.ts
5627+import { Component, type ComponentProps } from "./exports.js";
5628diff --git a/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_module.ts b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_module.ts
5629new file mode 100644
5630index 0000000000..27f78f707c
5631--- /dev/null
5632+++ b/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_module.ts
5633@@ -0,0 +1,4 @@
5634+// @preserveValueImports: true
5635+// @module: amd,system,commonjs,es2015
5636+// @noTypesAndSymbols: true
5637+export {};
5638diff --git a/tests/cases/conformance/importAssertion/importAssertion1.ts b/tests/cases/conformance/importAssertion/importAssertion1.ts
5639new file mode 100644
5640index 0000000000..b547158cf1
5641--- /dev/null
5642+++ b/tests/cases/conformance/importAssertion/importAssertion1.ts
5643@@ -0,0 +1,37 @@
5644+// @declaration: true
5645+// @target: es2015
5646+// @module: es2015, commonjs, esnext
5647+
5648+// @filename: 0.ts
5649+export const a = 1;
5650+export const b = 2;
5651+
5652+// @filename: 1.ts
5653+import './0' assert { type: "json" }
5654+import { a, b } from './0' assert { "type": "json" }
5655+import * as foo from './0' assert { type: "json" }
5656+a;
5657+b;
5658+foo.a;
5659+foo.b;
5660+
5661+// @filename: 2.ts
5662+import { a, b } from './0' assert {}
5663+import { a as c, b as d } from './0' assert { a: "a", b: "b", c: "c" }
5664+a;
5665+b;
5666+c;
5667+d;
5668+
5669+// @filename: 3.ts
5670+const a = import('./0')
5671+const b = import('./0', { assert: { type: "json" } })
5672+const c = import('./0', { assert: { type: "json", ttype: "typo" } })
5673+const d = import('./0', { assert: {} })
5674+const dd = import('./0', {})
5675+declare function foo(): any;
5676+const e = import('./0', foo())
5677+const f = import()
5678+const g = import('./0', {}, {})
5679+const h = import('./0', { assert: { type: "json" }},)
5680+
5681diff --git a/tests/cases/conformance/importAssertion/importAssertion2.ts b/tests/cases/conformance/importAssertion/importAssertion2.ts
5682new file mode 100644
5683index 0000000000..42a26af43e
5684--- /dev/null
5685+++ b/tests/cases/conformance/importAssertion/importAssertion2.ts
5686@@ -0,0 +1,17 @@
5687+// @declaration: true
5688+// @target: es2015
5689+// @module: es2015, commonjs, esnext
5690+
5691+// @filename: 0.ts
5692+export const a = 1;
5693+export const b = 2;
5694+
5695+// @filename: 1.ts
5696+export {} from './0' assert { type: "json" }
5697+export { a, b } from './0' assert { type: "json" }
5698+export * from './0' assert { type: "json" }
5699+export * as ns from './0' assert { type: "json" }
5700+
5701+// @filename: 2.ts
5702+export { a, b } from './0' assert {}
5703+export { a as c, b as d } from './0' assert { a: "a", b: "b", c: "c" }
5704diff --git a/tests/cases/conformance/importAssertion/importAssertion3.ts b/tests/cases/conformance/importAssertion/importAssertion3.ts
5705new file mode 100644
5706index 0000000000..28479378b1
5707--- /dev/null
5708+++ b/tests/cases/conformance/importAssertion/importAssertion3.ts
5709@@ -0,0 +1,15 @@
5710+// @declaration: true
5711+// @target: es2015
5712+// @module: es2015, esnext
5713+
5714+// @filename: 0.ts
5715+export interface I { }
5716+
5717+// @filename: 1.ts
5718+export type {} from './0' assert { type: "json" }
5719+export type { I } from './0' assert { type: "json" }
5720+
5721+// @filename: 2.ts
5722+import type { I } from './0'  assert { type: "json" }
5723+import type * as foo from './0' assert { type: "json" }
5724+
5725diff --git a/tests/cases/conformance/importAssertion/importAssertion4.ts b/tests/cases/conformance/importAssertion/importAssertion4.ts
5726new file mode 100644
5727index 0000000000..242d7dd375
5728--- /dev/null
5729+++ b/tests/cases/conformance/importAssertion/importAssertion4.ts
5730@@ -0,0 +1 @@
5731+import * as f from "./first" assert
5732diff --git a/tests/cases/conformance/importAssertion/importAssertion5.ts b/tests/cases/conformance/importAssertion/importAssertion5.ts
5733new file mode 100644
5734index 0000000000..ef09d84e66
5735--- /dev/null
5736+++ b/tests/cases/conformance/importAssertion/importAssertion5.ts
5737@@ -0,0 +1 @@
5738+import * as f from "./first" assert {
5739diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases3.ts b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases3.ts
5740index e3d076707b..8b95f5e240 100644
5741--- a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases3.ts
5742+++ b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases3.ts
5743@@ -32,4 +32,8 @@ class D implements A<boolean> {
5744     d: string;
5745     y: boolean;
5746     z: boolean;
5747-}
5748\ No newline at end of file
5749+}
5750+let ww1 = new C();
5751+let ww2 = new C2();
5752+let ww3 = new C3();
5753+let ww4 = new C4();
5754diff --git a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersection.ts b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersection.ts
5755index 003976a2b2..1ab2942311 100644
5756--- a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersection.ts
5757+++ b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersection.ts
5758@@ -53,3 +53,15 @@ class C20 extends Constructor<Partial<T1>>() { x: string }
5759 class C21 extends Constructor<Readonly<T1>>() { x: string }
5760 class C22 extends Constructor<Identifiable<T1>>() { x: string }
5761 class C23 extends Constructor<Identifiable<T1 & { b: number}>>() { x: string }
5762+let c1 = new C1();
5763+let c2 = new C2();
5764+let c3 = new C3();
5765+let c4 = new C4();
5766+let c5 = new C5();
5767+let c6 = new C6();
5768+let c7 = new C7();
5769+let cx = new CX();
5770+let c20 = new C20();
5771+let c21 = new C21();
5772+let c22 = new C22();
5773+let c23 = new C23();
5774\ No newline at end of file
5775diff --git a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts
5776index 6979b40579..20d877f7a2 100644
5777--- a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts
5778+++ b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts
5779@@ -39,4 +39,5 @@ var a: Foo = {
5780     m: M,
5781     n: {},
5782     o: E.A
5783-}
5784\ No newline at end of file
5785+}
5786+let cc = new C();
5787\ No newline at end of file
5788diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts
5789index 12f51f90a7..e1af2f0ac6 100644
5790--- a/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts
5791+++ b/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts
5792@@ -21,4 +21,3 @@ declare module A {
5793 var p: { x: number; y: number; }
5794 var p = A.Point.Origin;
5795 var p = new A.Point(0, 0); // unexpected error here, bug 840000
5796- 
5797\ No newline at end of file
5798diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts
5799index e923f1f002..b9bb58e89e 100644
5800--- a/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts
5801+++ b/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts
5802@@ -13,6 +13,7 @@ module A {
5803     export class Point {
5804         constructor(public x: number, public y: number) { }
5805     }
5806+    let pp = new Point(1,1);
5807 }
5808 
5809 // @filename: test.ts
5810diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts
5811index d285d9b422..9dca12bc2e 100644
5812--- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts
5813+++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts
5814@@ -19,4 +19,6 @@ module A {
5815     export module Point {
5816         function Origin() { return ""; }// not an error since not exported
5817     }
5818-}
5819\ No newline at end of file
5820+    let pp = new Point(1,1);
5821+}
5822+let pp1 = new Point(1,1);
5823\ No newline at end of file
5824diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts
5825index 7d88bf6292..71433fbef5 100644
5826--- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts
5827+++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts
5828@@ -3,6 +3,7 @@ module A {
5829         x: number;
5830         y: number;
5831     }
5832+    let pp = new Point();
5833 }
5834 
5835 module A {
5836@@ -11,6 +12,7 @@ module A {
5837             return { x: p.x, y: p.y };
5838         }
5839     }
5840+    let pp1 = new Point();
5841 }
5842 
5843 // ensure merges as expected
5844@@ -21,6 +23,7 @@ module X.Y.Z {
5845     export class Line {
5846         length: number;
5847     }
5848+    let ll = new Line();
5849 }
5850 
5851 module X {
5852@@ -29,6 +32,7 @@ module X {
5853             class Line {
5854                 name: string;
5855             }
5856+            let ll1 = new Line()
5857         }
5858     }
5859 }
5860diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts
5861index 449e6e76a2..a0c9072675 100644
5862--- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts
5863+++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts
5864@@ -16,6 +16,7 @@ module X.Y.Z {
5865     export class Line {
5866         length: number;
5867     }
5868+    let ll = new Line();
5869 }
5870 
5871 module X {
5872@@ -24,6 +25,7 @@ module X {
5873             export class Line {
5874                 name: string;
5875             }
5876+            let ll1 = new Line(); 
5877         }
5878     }
5879 }
5880diff --git a/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts b/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts
5881index 02398acbbb..321d84cd56 100644
5882--- a/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts
5883+++ b/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts
5884@@ -39,6 +39,7 @@ module E {
5885     export module M {
5886         export var x = 42;
5887     }
5888+    let c1 = new C();
5889 }
5890 
5891 // validate all exportable statements,
5892@@ -51,4 +52,5 @@ module F {
5893     module M {
5894         var x = 42;
5895     }
5896+    let c2 = new C();
5897 }
5898\ No newline at end of file
5899diff --git a/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts b/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts
5900index aef48103cd..14d12af759 100644
5901--- a/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts
5902+++ b/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts
5903@@ -15,6 +15,7 @@ module B {
5904     class B {
5905         name: string;
5906     }
5907+    let bb = new B();
5908 }
5909 
5910 module X {
5911diff --git a/tests/cases/conformance/jsdoc/constructorTagOnClassConstructor.ts b/tests/cases/conformance/jsdoc/constructorTagOnClassConstructor.ts
5912index 6d2f3780ee..72a97ff055 100644
5913--- a/tests/cases/conformance/jsdoc/constructorTagOnClassConstructor.ts
5914+++ b/tests/cases/conformance/jsdoc/constructorTagOnClassConstructor.ts
5915@@ -11,4 +11,6 @@ export class Beta {
5916   }
5917 }
5918 
5919-const arr = [Alpha, Beta];
5920+// const arr = [Alpha, Beta];
5921+let aa = new Alpha();
5922+let be = new Beta();
5923\ No newline at end of file
5924diff --git a/tests/cases/conformance/jsdoc/declarations/jsDeclarationsSubclassWithExplicitNoArgumentConstructor.ts b/tests/cases/conformance/jsdoc/declarations/jsDeclarationsSubclassWithExplicitNoArgumentConstructor.ts
5925index eb609720d7..b0bf85be74 100644
5926--- a/tests/cases/conformance/jsdoc/declarations/jsDeclarationsSubclassWithExplicitNoArgumentConstructor.ts
5927+++ b/tests/cases/conformance/jsdoc/declarations/jsDeclarationsSubclassWithExplicitNoArgumentConstructor.ts
5928@@ -16,4 +16,5 @@ export class Sub extends Super {
5929     constructor() {
5930         super('first', 'second');
5931     }
5932-}
5933\ No newline at end of file
5934+}
5935+let ss = new Sub();
5936\ No newline at end of file
5937diff --git a/tests/cases/conformance/jsdoc/declarations/jsDeclarationsThisTypes.ts b/tests/cases/conformance/jsdoc/declarations/jsDeclarationsThisTypes.ts
5938index bc2eae7dac..29ba837ef9 100644
5939--- a/tests/cases/conformance/jsdoc/declarations/jsDeclarationsThisTypes.ts
5940+++ b/tests/cases/conformance/jsdoc/declarations/jsDeclarationsThisTypes.ts
5941@@ -14,4 +14,6 @@ export class A {
5942 export default class Base extends A {
5943     // This method is required to reproduce #35932
5944     verify() { }
5945-}
5946\ No newline at end of file
5947+}
5948+
5949+let b = new Base();
5950\ No newline at end of file
5951diff --git a/tests/cases/conformance/jsdoc/enumTagImported/enumTagImported.ts b/tests/cases/conformance/jsdoc/enumTagImported/enumTagImported.ts
5952new file mode 100644
5953index 0000000000..859c60103b
5954--- /dev/null
5955+++ b/tests/cases/conformance/jsdoc/enumTagImported/enumTagImported.ts
5956@@ -0,0 +1,23 @@
5957+// @allowJs: true
5958+// @checkJs: true
5959+// @noEmit: true
5960+// @Filename: type.js
5961+/** @typedef {import("./mod1").TestEnum} TE */
5962+/** @type {TE} */
5963+const test = 'add'
5964+/** @type {import("./mod1").TestEnum} */
5965+const tost = 'remove'
5966+
5967+// @Filename: value.js
5968+import { TestEnum } from "./mod1"
5969+/** @type {TestEnum} */
5970+const tist = TestEnum.ADD
5971+
5972+
5973+// @Filename: mod1.js
5974+
5975+/** @enum {string} */
5976+// export const TestEnum = {
5977+//     ADD: 'add',
5978+//     REMOVE: 'remove'
5979+// }
5980diff --git a/tests/cases/conformance/jsdoc/extendsTag1.ts b/tests/cases/conformance/jsdoc/extendsTag1.ts
5981index 194982760e..79b3bc7079 100644
5982--- a/tests/cases/conformance/jsdoc/extendsTag1.ts
5983+++ b/tests/cases/conformance/jsdoc/extendsTag1.ts
5984@@ -8,3 +8,4 @@
5985  * @extends {Set<T>} Should prefer this Set<T>, not the Set in the heritage clause
5986  */
5987 class My extends Set {}
5988+let q4 = new My();
5989diff --git a/tests/cases/conformance/jsdoc/jsdocAugments_qualifiedName/jsdocAugments_qualifiedName.ts b/tests/cases/conformance/jsdoc/jsdocAugments_qualifiedName/jsdocAugments_qualifiedName.ts
5990new file mode 100644
5991index 0000000000..ce4fb95ff2
5992--- /dev/null
5993+++ b/tests/cases/conformance/jsdoc/jsdocAugments_qualifiedName/jsdocAugments_qualifiedName.ts
5994@@ -0,0 +1,10 @@
5995+// @allowJs: true
5996+// @checkJs: true
5997+// @noEmit: true
5998+
5999+
6000+// @Filename: /b.js
6001+import * as a from "./a";
6002+let b = a.A;
6003+/** @augments a.A */
6004+class B {}
6005diff --git a/tests/cases/conformance/jsdoc/jsdocAugments_withTypeParameter.ts b/tests/cases/conformance/jsdoc/jsdocAugments_withTypeParameter.ts
6006index e94df03fbc..aba2b989e7 100644
6007--- a/tests/cases/conformance/jsdoc/jsdocAugments_withTypeParameter.ts
6008+++ b/tests/cases/conformance/jsdoc/jsdocAugments_withTypeParameter.ts
6009@@ -12,3 +12,4 @@ class B extends A {
6010         return this.x;
6011     }
6012 }
6013+let q7 = new B();
6014\ No newline at end of file
6015diff --git a/tests/cases/conformance/jsdoc/jsdocImplements_namespacedInterface.ts b/tests/cases/conformance/jsdoc/jsdocImplements_namespacedInterface.ts
6016index c298e6685a..9af8207ba4 100644
6017--- a/tests/cases/conformance/jsdoc/jsdocImplements_namespacedInterface.ts
6018+++ b/tests/cases/conformance/jsdoc/jsdocImplements_namespacedInterface.ts
6019@@ -26,3 +26,5 @@ class BAT {
6020         return "";
6021     }
6022 }
6023+let q1 = new B();
6024+let q2 = new BAT();
6025diff --git a/tests/cases/conformance/jsdoc/jsdocTemplateTagDefault.ts b/tests/cases/conformance/jsdoc/jsdocTemplateTagDefault.ts
6026new file mode 100644
6027index 0000000000..c93359a7a6
6028--- /dev/null
6029+++ b/tests/cases/conformance/jsdoc/jsdocTemplateTagDefault.ts
6030@@ -0,0 +1,71 @@
6031+// @allowJs: true
6032+// @checkJs: true
6033+// @declaration: true
6034+// @outDir: out
6035+// @Filename: file.js
6036+
6037+/**
6038+ * @template {string | number} [T=string] - ok: defaults are permitted
6039+ * @typedef {[T]} A
6040+ */
6041+
6042+/** @type {A} */ // ok, default for `T` in `A` is `string`
6043+const aDefault1 = [""];
6044+/** @type {A} */ // error: `number` is not assignable to string`
6045+const aDefault2 = [0];
6046+/** @type {A<string>} */ // ok, `T` is provided for `A`
6047+const aString = [""];
6048+/** @type {A<number>} */ // ok, `T` is provided for `A`
6049+const aNumber = [0];
6050+
6051+/**
6052+ * @template T
6053+ * @template [U=T] - ok: default can reference earlier type parameter
6054+ * @typedef {[T, U]} B
6055+ */
6056+
6057+/**
6058+ * @template {string | number} [T] - error: default requires an `=type`
6059+ * @typedef {[T]} C
6060+ */
6061+
6062+/**
6063+ * @template {string | number} [T=] - error: default requires a `type`
6064+ * @typedef {[T]} D
6065+ */
6066+
6067+/**
6068+ * @template {string | number} [T=string]
6069+ * @template U - error: Required type parameters cannot follow optional type parameters
6070+ * @typedef {[T, U]} E
6071+ */
6072+
6073+/**
6074+ * @template [T=U] - error: Type parameter defaults can only reference previously declared type parameters.
6075+ * @template [U=T]
6076+ * @typedef {[T, U]} G
6077+ */
6078+
6079+/**
6080+ * @template T
6081+ * @template [U=T] - ok: default can reference earlier type parameter
6082+ * @param {T} a
6083+ * @param {U} b
6084+ */
6085+function f1(a, b) {}
6086+
6087+ /**
6088+ * @template {string | number} [T=string]
6089+ * @template U - error: Required type parameters cannot follow optional type parameters
6090+ * @param {T} a
6091+ * @param {U} b
6092+ */
6093+function f2(a, b) {}
6094+
6095+/**
6096+ * @template [T=U] - error: Type parameter defaults can only reference previously declared type parameters.
6097+ * @template [U=T]
6098+ * @param {T} a
6099+ * @param {U} b
6100+ */
6101+function f3(a, b) {}
6102diff --git a/tests/cases/conformance/jsdoc/jsdocTemplateTagNameResolution.ts b/tests/cases/conformance/jsdoc/jsdocTemplateTagNameResolution.ts
6103new file mode 100644
6104index 0000000000..a5b4d052ad
6105--- /dev/null
6106+++ b/tests/cases/conformance/jsdoc/jsdocTemplateTagNameResolution.ts
6107@@ -0,0 +1,16 @@
6108+// @allowJs: true
6109+// @checkJs: true
6110+// @outDir: out
6111+// @declaration: true
6112+// @Filename: file.js
6113+
6114+/**
6115+ * @template T
6116+ * @template {keyof T} K
6117+ * @typedef {T[K]} Foo
6118+ */
6119+
6120+const x = { a: 1 };
6121+
6122+/** @type {Foo<typeof x, "a">} */
6123+const y = "a";
6124\ No newline at end of file
6125diff --git a/tests/cases/conformance/jsdoc/jsdocTypeReferenceUseBeforeDef.ts b/tests/cases/conformance/jsdoc/jsdocTypeReferenceUseBeforeDef.ts
6126index 93e735e1fa..b38836e7e7 100644
6127--- a/tests/cases/conformance/jsdoc/jsdocTypeReferenceUseBeforeDef.ts
6128+++ b/tests/cases/conformance/jsdoc/jsdocTypeReferenceUseBeforeDef.ts
6129@@ -6,3 +6,4 @@
6130 const c = null
6131 class C {
6132 }
6133+let q3 = new C();
6134\ No newline at end of file
6135diff --git a/tests/cases/conformance/jsdoc/jsdocVariadicType.ts b/tests/cases/conformance/jsdoc/jsdocVariadicType.ts
6136new file mode 100644
6137index 0000000000..cd4e75a54a
6138--- /dev/null
6139+++ b/tests/cases/conformance/jsdoc/jsdocVariadicType.ts
6140@@ -0,0 +1,12 @@
6141+// @allowJS: true
6142+// @checkJs: true
6143+// @noEmit: true
6144+
6145+// @filename: a.js
6146+/**
6147+ * @type {function(boolean, string, ...*):void}
6148+ */
6149+const foo = function (a, b, ...r) { };
6150+
6151+// @filename: b.ts
6152+foo(false, '');
6153diff --git a/tests/cases/conformance/jsdoc/seeTag3.ts b/tests/cases/conformance/jsdoc/seeTag3.ts
6154new file mode 100644
6155index 0000000000..abd16226fe
6156--- /dev/null
6157+++ b/tests/cases/conformance/jsdoc/seeTag3.ts
6158@@ -0,0 +1,7 @@
6159+// @outdir: out/
6160+// @checkJs: true
6161+// @filename: seeTag3.js
6162+
6163+/** @see [The typescript web site](https://typescriptlang.org)  */
6164+function theWholeThing() {
6165+}
6166diff --git a/tests/cases/conformance/jsdoc/thisTag2.ts b/tests/cases/conformance/jsdoc/thisTag2.ts
6167new file mode 100644
6168index 0000000000..187ac9b932
6169--- /dev/null
6170+++ b/tests/cases/conformance/jsdoc/thisTag2.ts
6171@@ -0,0 +1,11 @@
6172+// @target: esnext
6173+// @allowJs: true
6174+// @declaration: true
6175+// @emitDeclarationOnly: true
6176+// @filename: a.js
6177+
6178+/** @this {string} */
6179+export function f1() {}
6180+
6181+/** @this */
6182+export function f2() {}
6183diff --git a/tests/cases/conformance/jsx/jsxParsingError4.tsx b/tests/cases/conformance/jsx/jsxParsingError4.tsx
6184new file mode 100644
6185index 0000000000..c4db4fe7ab
6186--- /dev/null
6187+++ b/tests/cases/conformance/jsx/jsxParsingError4.tsx
6188@@ -0,0 +1,18 @@
6189+// @strict: true, false
6190+// @jsx: react
6191+// @filename: a.tsx
6192+
6193+declare const React: any
6194+declare namespace JSX {
6195+    interface IntrinsicElements {
6196+        [k: string]: any
6197+    }
6198+}
6199+
6200+const a = (
6201+  <public-foo></public-foo>
6202+);
6203+
6204+const b = (
6205+  <public></public>
6206+);
6207diff --git a/tests/cases/conformance/jsx/jsxUnclosedParserRecovery.ts b/tests/cases/conformance/jsx/jsxUnclosedParserRecovery.ts
6208new file mode 100644
6209index 0000000000..08b6149d37
6210--- /dev/null
6211+++ b/tests/cases/conformance/jsx/jsxUnclosedParserRecovery.ts
6212@@ -0,0 +1,140 @@
6213+// @Filename: jsxParserRecovery.tsx
6214+// @jsx: preserve
6215+
6216+// should have no errors here; all these functions should parse and resolve
6217+noName(); noClose(); noCloseTypeArg(); noCloseAttrs(); noCloseTypeArgAttrs(); noCloseBracket(); noCloseBracketTypeArgAttrs(); noSelfclose(); noSelfcloseTypeArgAttrs();
6218+noNameTrailingTag(); noCloseTrailingTag(); noCloseTypeArgTrailingTag(); noCloseAttrsTrailingTag(); noCloseTypeArgAttrsTrailingTag(); noCloseBracketTrailingTag(); noCloseBracketTypeArgAttrsTrailingTag(); // noSelfcloseTrailingTag(); noSelfcloseTypeArgAttrsTrailingTag();
6219+noNameTrailingText(); noCloseTrailingText(); noCloseTypeArgTrailingText(); noCloseAttrsTrailingText(); noCloseTypeArgAttrsTrailingText(); noCloseBracketTrailingText(); noCloseBracketTypeArgAttrsTrailingText(); // noSelfcloseTrailingText(); noSelfcloseTypeArgAttrsTrailingText();
6220+
6221+function diddy() {
6222+    return null;
6223+}
6224+
6225+var donkey = <div>
6226+    <
6227+</div>;
6228+function noName() { }
6229+var donkey = <div>
6230+    <diddy
6231+</div>;
6232+function noClose() { }
6233+var donkey = <div>
6234+    <diddy<boolean>
6235+</div>;
6236+function noCloseTypeArg() { }
6237+var donkey = <div>
6238+    <diddy bananas="please"
6239+</div>;
6240+function noCloseAttrs() { }
6241+var donkey = <div>
6242+    <diddy<boolean> bananas="please"
6243+</div>;
6244+function noCloseTypeArgAttrs() { }
6245+var donkey = <div>
6246+    <diddy/
6247+</div>;
6248+function noCloseBracket() { }
6249+var donkey = <div>
6250+    <diddy<boolean> bananas="please"/
6251+</div>;
6252+function noCloseBracketTypeArgAttrs() { }
6253+var donkey = <div>
6254+    <diddy>
6255+</div>;
6256+function noSelfclose() { }
6257+var donkey = <div>
6258+    <diddy<boolean> bananas="please">
6259+</div>;
6260+function noSelfcloseTypeArgAttrs() { }
6261+
6262+var donkey = <div>
6263+    <
6264+    <diddy/>
6265+</div>;
6266+function noNameTrailingTag() { }
6267+var donkey = <div>
6268+    <diddy
6269+    <diddy/>
6270+</div>;
6271+function noCloseTrailingTag() { }
6272+var donkey = <div>
6273+    <diddy<boolean>
6274+    <diddy/>
6275+</div>;
6276+function noCloseTypeArgTrailingTag() { }
6277+var donkey = <div>
6278+    <diddy bananas="please"
6279+    <diddy/>
6280+</div>;
6281+function noCloseAttrsTrailingTag() { }
6282+var donkey = <div>
6283+    <diddy<boolean> bananas="please"
6284+    <diddy/>
6285+</div>;
6286+function noCloseTypeArgAttrsTrailingTag() { }
6287+var donkey = <div>
6288+    <diddy/
6289+    <diddy/>
6290+</div>;
6291+function noCloseBracketTrailingTag() { }
6292+var donkey = <div>
6293+    <diddy<boolean> bananas="please"/
6294+    <diddy/>
6295+</div>;
6296+function noCloseBracketTypeArgAttrsTrailingTag() { }
6297+var donkey = <div>
6298+    <diddy>
6299+    <diddy/>
6300+</div>;
6301+function noSelfcloseTrailingTag() { }
6302+var donkey = <div>
6303+    <diddy<boolean> bananas="please">
6304+    <diddy/>
6305+</div>;
6306+function noSelfcloseTypeArgAttrsTrailingTag() { }
6307+
6308+var donkey = <div>
6309+    <
6310+    Cranky Wrinkly Funky
6311+</div>;
6312+function noNameTrailingText() { }
6313+var donkey = <div>
6314+    <diddy
6315+    Cranky Wrinkly Funky
6316+</div>;
6317+function noCloseTrailingText() { }
6318+var donkey = <div>
6319+    <diddy<boolean>
6320+    Cranky Wrinkly Funky
6321+</div>;
6322+function noCloseTypeArgTrailingText() { }
6323+var donkey = <div>
6324+    <diddy bananas="please"
6325+    Cranky Wrinkly Funky
6326+</div>;
6327+function noCloseAttrsTrailingText() { }
6328+var donkey = <div>
6329+    <diddy<boolean> bananas="please"
6330+    Cranky Wrinkly Funky
6331+</div>;
6332+function noCloseTypeArgAttrsTrailingText() { }
6333+var donkey = <div>
6334+    <diddy/
6335+    Cranky Wrinkly Funky
6336+</div>;
6337+function noCloseBracketTrailingText() { }
6338+var donkey = <div>
6339+    <diddy<boolean> bananas="please"/
6340+    Cranky Wrinkly Funky
6341+</div>;
6342+function noCloseBracketTypeArgAttrsTrailingText() { }
6343+var donkey = <div>
6344+    <diddy>
6345+    Cranky Wrinkly Funky
6346+</div>;
6347+function noSelfcloseTrailingText() { }
6348+var donkey = <div>
6349+    <diddy<boolean> bananas="please">
6350+    Cranky Wrinkly Funky
6351+</div>;
6352+function noSelfcloseTypeArgAttrsTrailingText() { }
6353diff --git a/tests/cases/conformance/jsx/tsxReactEmitSpreadAttribute.ts b/tests/cases/conformance/jsx/tsxReactEmitSpreadAttribute.ts
6354new file mode 100644
6355index 0000000000..2ddc20ae39
6356--- /dev/null
6357+++ b/tests/cases/conformance/jsx/tsxReactEmitSpreadAttribute.ts
6358@@ -0,0 +1,32 @@
6359+// @jsx: react-jsx
6360+// @target: es2015,es2018,esnext
6361+// @filename: test.tsx
6362+/// <reference path="/.lib/react16.d.ts" />
6363+
6364+export function T1(a: any) {
6365+    return <div className={"T1"} { ...a }>T1</div>;
6366+}
6367+
6368+export function T2(a: any, b: any) {
6369+    return <div className={"T2"} { ...a } { ...b }>T2</div>;
6370+}
6371+
6372+export function T3(a: any, b: any) {
6373+    return <div { ...a } className={"T3"} { ...b }>T3</div>;
6374+}
6375+
6376+export function T4(a: any, b: any) {
6377+    return <div className={"T4"} { ...{ ...a, ...b } }>T4</div>;
6378+}
6379+
6380+export function T5(a: any, b: any, c: any, d: any) {
6381+    return <div className={"T5"} { ...{ ...a, ...b, ...{ c, d } } }>T5</div>;
6382+}
6383+
6384+export function T6(a: any, b: any, c: any, d: any) {
6385+    return <div className={"T6"} { ...{ ...a, ...b, ...{ ...c, ...d } } }>T6</div>;
6386+}
6387+
6388+export function T7(a: any, b: any, c: any, d: any) {
6389+    return <div>T7</div>;
6390+}
6391diff --git a/tests/cases/conformance/moduleResolution/declarationNotFoundPackageBundlesTypes.ts b/tests/cases/conformance/moduleResolution/declarationNotFoundPackageBundlesTypes.ts
6392new file mode 100644
6393index 0000000000..75c681daf0
6394--- /dev/null
6395+++ b/tests/cases/conformance/moduleResolution/declarationNotFoundPackageBundlesTypes.ts
6396@@ -0,0 +1,23 @@
6397+// @noImplicitAny: true
6398+// @noImplicitReferences: true
6399+
6400+// @filename: node_modules/foo/package.json
6401+{   
6402+    "name": "foo",
6403+    "version": "1.0.0"
6404+}
6405+
6406+// @filename: node_modules/foo/index.js
6407+var foo = 0;
6408+module.exports = foo;
6409+
6410+// @filename: node_modules/foo/index.d.ts
6411+declare const foo: any;
6412+export = foo;
6413+
6414+// @filename: node_modules/foo/other.js
6415+module.exports = {};
6416+
6417+// @filename: index.ts
6418+import * as Foo from "foo";
6419+import * as Other from "foo/other"/*1*/;
6420\ No newline at end of file
6421diff --git a/tests/cases/conformance/moduleResolution/scopedPackages/index.d.ts b/tests/cases/conformance/moduleResolution/scopedPackages/index.d.ts
6422new file mode 100644
6423index 0000000000..04d4f15421
6424--- /dev/null
6425+++ b/tests/cases/conformance/moduleResolution/scopedPackages/index.d.ts
6426@@ -0,0 +1,3 @@
6427+// @filename: /node_modules/@cow/boy/index.d.ts
6428+export const x: number;
6429+export const y: number;
6430\ No newline at end of file
6431diff --git a/tests/cases/conformance/moduleResolution/scopedPackages/scopedPackages.ts b/tests/cases/conformance/moduleResolution/scopedPackages/scopedPackages.ts
6432new file mode 100644
6433index 0000000000..80db9778d1
6434--- /dev/null
6435+++ b/tests/cases/conformance/moduleResolution/scopedPackages/scopedPackages.ts
6436@@ -0,0 +1,12 @@
6437+// @noImplicitReferences: true
6438+// @traceResolution: true
6439+// @typeRoots: types
6440+
6441+
6442+// @filename: /a.ts
6443+import { x } from "./index";
6444+import { y } from "./index";
6445+import { z } from "./z";
6446+x;
6447+y;
6448+z;
6449\ No newline at end of file
6450diff --git a/tests/cases/conformance/moduleResolution/scopedPackages/z.d.ts b/tests/cases/conformance/moduleResolution/scopedPackages/z.d.ts
6451new file mode 100644
6452index 0000000000..8af8c4b248
6453--- /dev/null
6454+++ b/tests/cases/conformance/moduleResolution/scopedPackages/z.d.ts
6455@@ -0,0 +1,2 @@
6456+// @filename: /node_modules/@types/be__bop/e/z.d.ts
6457+export const z: number;
6458\ No newline at end of file
6459diff --git a/tests/cases/conformance/moduleResolution/scopedPackagesClassic/index.d.ts b/tests/cases/conformance/moduleResolution/scopedPackagesClassic/index.d.ts
6460new file mode 100644
6461index 0000000000..7cfe77597d
6462--- /dev/null
6463+++ b/tests/cases/conformance/moduleResolution/scopedPackagesClassic/index.d.ts
6464@@ -0,0 +1,2 @@
6465+// @filename: /node_modules/@types/see__saw/index.d.ts
6466+export const x = 0;
6467diff --git a/tests/cases/conformance/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.ts b/tests/cases/conformance/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.ts
6468new file mode 100644
6469index 0000000000..4f491b9532
6470--- /dev/null
6471+++ b/tests/cases/conformance/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.ts
6472@@ -0,0 +1,9 @@
6473+// @noImplicitReferences: true
6474+// @traceResolution: true
6475+// @typeRoots: types
6476+// @moduleResolution: classic
6477+
6478+
6479+// @filename: /a.ts
6480+import { x } from "./index";
6481+x;
6482\ No newline at end of file
6483diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs/untypedModuleImport_allowJs.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs/untypedModuleImport_allowJs.ts
6484new file mode 100644
6485index 0000000000..b2c0c1f81c
6486--- /dev/null
6487+++ b/tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs/untypedModuleImport_allowJs.ts
6488@@ -0,0 +1,12 @@
6489+// @noImplicitReferences: true
6490+// @currentDirectory: /
6491+// @allowJs: true
6492+// @maxNodeModuleJsDepth: 1
6493+// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed.
6494+
6495+// @filename: /node_modules/foo/index.js
6496+// exports.default = { bar() { return 0; } }
6497+
6498+// @filename: /a.ts
6499+import foo from "foo";
6500+foo.bar();
6501diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient/declarations.d.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient/declarations.d.ts
6502new file mode 100644
6503index 0000000000..c54d01514d
6504--- /dev/null
6505+++ b/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient/declarations.d.ts
6506@@ -0,0 +1,4 @@
6507+// @filename: /declarations.d.ts
6508+declare module "foo" {
6509+    export const x: number;
6510+}
6511diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient/untypedModuleImport_vsAmbient.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient/untypedModuleImport_vsAmbient.ts
6512new file mode 100644
6513index 0000000000..577d258b72
6514--- /dev/null
6515+++ b/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient/untypedModuleImport_vsAmbient.ts
6516@@ -0,0 +1,12 @@
6517+// @noImplicitReferences: true
6518+// @currentDirectory: /
6519+// This tests that an ambient module declaration overrides an untyped import.
6520+
6521+// @filename: /node_modules/foo/index.js
6522+// This file is not processed.
6523+
6524+
6525+// @filename: /a.ts
6526+/// <reference path="./declarations.d.ts" />
6527+import { x } from "foo";
6528+x;
6529diff --git a/tests/cases/conformance/node/allowJs/nodeAllowJsPackageSelfName.ts b/tests/cases/conformance/node/allowJs/nodeAllowJsPackageSelfName.ts
6530new file mode 100644
6531index 0000000000..a19a7104ae
6532--- /dev/null
6533+++ b/tests/cases/conformance/node/allowJs/nodeAllowJsPackageSelfName.ts
6534@@ -0,0 +1,24 @@
6535+// @module: node12,nodenext
6536+// @declaration: true
6537+// @allowJs: true
6538+// @checkJs: true
6539+// @outDir: out
6540+// @filename: index.js
6541+// esm format file
6542+import * as self from "package";
6543+self;
6544+// @filename: index.mjs
6545+// esm format file
6546+import * as self from "package";
6547+self;
6548+// @filename: index.cjs
6549+// esm format file
6550+import * as self from "package";
6551+self;
6552+// @filename: package.json
6553+{
6554+    "name": "package",
6555+    "private": true,
6556+    "type": "module",
6557+    "exports": "./index.js"
6558+}
6559\ No newline at end of file
6560diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJs1.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJs1.ts
6561new file mode 100644
6562index 0000000000..113c1fdeb8
6563--- /dev/null
6564+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJs1.ts
6565@@ -0,0 +1,324 @@
6566+// @module: node12,nodenext
6567+// @declaration: true
6568+// @allowJs: true
6569+// @checkJs: true
6570+// @outDir: out
6571+// @filename: subfolder/index.js
6572+// cjs format file
6573+const x = 1;
6574+export {x};
6575+// @filename: subfolder/index.cjs
6576+// cjs format file
6577+const x = 1;
6578+export {x};
6579+// @filename: subfolder/index.mjs
6580+// esm format file
6581+const x = 1;
6582+export {x};
6583+// @filename: subfolder2/index.js
6584+// cjs format file
6585+const x = 1;
6586+export {x};
6587+// @filename: subfolder2/index.cjs
6588+// cjs format file
6589+const x = 1;
6590+export {x};
6591+// @filename: subfolder2/index.mjs
6592+// esm format file
6593+const x = 1;
6594+export {x};
6595+// @filename: subfolder2/another/index.js
6596+// esm format file
6597+const x = 1;
6598+export {x};
6599+// @filename: subfolder2/another/index.cjs
6600+// cjs format file
6601+const x = 1;
6602+export {x};
6603+// @filename: subfolder2/another/index.mjs
6604+// esm format file
6605+const x = 1;
6606+export {x};
6607+// @filename: index.js
6608+import * as m1 from "./index.js";
6609+import * as m2 from "./index.mjs";
6610+import * as m3 from "./index.cjs";
6611+import * as m4 from "./subfolder/index.js";
6612+import * as m5 from "./subfolder/index.mjs";
6613+import * as m6 from "./subfolder/index.cjs";
6614+import * as m7 from "./subfolder2/index.js";
6615+import * as m8 from "./subfolder2/index.mjs";
6616+import * as m9 from "./subfolder2/index.cjs";
6617+import * as m10 from "./subfolder2/another/index.js";
6618+import * as m11 from "./subfolder2/another/index.mjs";
6619+import * as m12 from "./subfolder2/another/index.cjs";
6620+// The next ones shouldn't all work - esm format files have no index resolution or extension resolution
6621+import * as m13 from "./";
6622+import * as m14 from "./index";
6623+import * as m15 from "./subfolder";
6624+import * as m16 from "./subfolder/";
6625+import * as m17 from "./subfolder/index";
6626+import * as m18 from "./subfolder2";
6627+import * as m19 from "./subfolder2/";
6628+import * as m20 from "./subfolder2/index";
6629+import * as m21 from "./subfolder2/another";
6630+import * as m22 from "./subfolder2/another/";
6631+import * as m23 from "./subfolder2/another/index";
6632+void m1;
6633+void m2;
6634+void m3;
6635+void m4;
6636+void m5;
6637+void m6;
6638+void m7;
6639+void m8;
6640+void m9;
6641+void m10;
6642+void m11;
6643+void m12;
6644+void m13;
6645+void m14;
6646+void m15;
6647+void m16;
6648+void m17;
6649+void m18;
6650+void m19;
6651+void m20;
6652+void m21;
6653+void m22;
6654+void m23;
6655+
6656+// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
6657+import m24 = require("./");
6658+import m25 = require("./index");
6659+import m26 = require("./subfolder");
6660+import m27 = require("./subfolder/");
6661+import m28 = require("./subfolder/index");
6662+import m29 = require("./subfolder2");
6663+import m30 = require("./subfolder2/");
6664+import m31 = require("./subfolder2/index");
6665+import m32 = require("./subfolder2/another");
6666+import m33 = require("./subfolder2/another/");
6667+import m34 = require("./subfolder2/another/index");
6668+void m24;
6669+void m25;
6670+void m26;
6671+void m27;
6672+void m28;
6673+void m29;
6674+void m30;
6675+void m31;
6676+void m32;
6677+void m33;
6678+void m34;
6679+
6680+// These shouldn't work - dynamic `import()` always uses the esm resolver, which does not have extension resolution
6681+const _m35 = import("./");
6682+const _m36 = import("./index");
6683+const _m37 = import("./subfolder");
6684+const _m38 = import("./subfolder/");
6685+const _m39 = import("./subfolder/index");
6686+const _m40 = import("./subfolder2");
6687+const _m41 = import("./subfolder2/");
6688+const _m42 = import("./subfolder2/index");
6689+const _m43 = import("./subfolder2/another");
6690+const _m44 = import("./subfolder2/another/");
6691+const _m45 = import("./subfolder2/another/index");
6692+// esm format file
6693+const x = 1;
6694+export {x};
6695+// @filename: index.cjs
6696+// ESM-format imports below should issue errors
6697+import * as m1 from "./index.js";
6698+import * as m2 from "./index.mjs";
6699+import * as m3 from "./index.cjs";
6700+import * as m4 from "./subfolder/index.js";
6701+import * as m5 from "./subfolder/index.mjs";
6702+import * as m6 from "./subfolder/index.cjs";
6703+import * as m7 from "./subfolder2/index.js";
6704+import * as m8 from "./subfolder2/index.mjs";
6705+import * as m9 from "./subfolder2/index.cjs";
6706+import * as m10 from "./subfolder2/another/index.js";
6707+import * as m11 from "./subfolder2/another/index.mjs";
6708+import * as m12 from "./subfolder2/another/index.cjs";
6709+// The next ones should _mostly_ work - cjs format files have index resolution and extension resolution (except for those which resolve to an esm format file)
6710+import * as m13 from "./";
6711+import * as m14 from "./index";
6712+import * as m15 from "./subfolder";
6713+import * as m16 from "./subfolder/";
6714+import * as m17 from "./subfolder/index";
6715+import * as m18 from "./subfolder2";
6716+import * as m19 from "./subfolder2/";
6717+import * as m20 from "./subfolder2/index";
6718+import * as m21 from "./subfolder2/another";
6719+import * as m22 from "./subfolder2/another/";
6720+import * as m23 from "./subfolder2/another/index";
6721+void m1;
6722+void m2;
6723+void m3;
6724+void m4;
6725+void m5;
6726+void m6;
6727+void m7;
6728+void m8;
6729+void m9;
6730+void m10;
6731+void m11;
6732+void m12;
6733+void m13;
6734+void m14;
6735+void m15;
6736+void m16;
6737+void m17;
6738+void m18;
6739+void m19;
6740+void m20;
6741+void m21;
6742+void m22;
6743+void m23;
6744+
6745+// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
6746+import m24 = require("./");
6747+import m25 = require("./index");
6748+import m26 = require("./subfolder");
6749+import m27 = require("./subfolder/");
6750+import m28 = require("./subfolder/index");
6751+import m29 = require("./subfolder2");
6752+import m30 = require("./subfolder2/");
6753+import m31 = require("./subfolder2/index");
6754+import m32 = require("./subfolder2/another");
6755+import m33 = require("./subfolder2/another/");
6756+import m34 = require("./subfolder2/another/index");
6757+void m24;
6758+void m25;
6759+void m26;
6760+void m27;
6761+void m28;
6762+void m29;
6763+void m30;
6764+void m31;
6765+void m32;
6766+void m33;
6767+void m34;
6768+
6769+// These shouldn't work - dynamic `import()` always uses the esm resolver, which does not have extension resolution
6770+const _m35 = import("./");
6771+const _m36 = import("./index");
6772+const _m37 = import("./subfolder");
6773+const _m38 = import("./subfolder/");
6774+const _m39 = import("./subfolder/index");
6775+const _m40 = import("./subfolder2");
6776+const _m41 = import("./subfolder2/");
6777+const _m42 = import("./subfolder2/index");
6778+const _m43 = import("./subfolder2/another");
6779+const _m44 = import("./subfolder2/another/");
6780+const _m45 = import("./subfolder2/another/index");
6781+// cjs format file
6782+const x = 1;
6783+export {x};
6784+// @filename: index.mjs
6785+import * as m1 from "./index.js";
6786+import * as m2 from "./index.mjs";
6787+import * as m3 from "./index.cjs";
6788+import * as m4 from "./subfolder/index.js";
6789+import * as m5 from "./subfolder/index.mjs";
6790+import * as m6 from "./subfolder/index.cjs";
6791+import * as m7 from "./subfolder2/index.js";
6792+import * as m8 from "./subfolder2/index.mjs";
6793+import * as m9 from "./subfolder2/index.cjs";
6794+import * as m10 from "./subfolder2/another/index.js";
6795+import * as m11 from "./subfolder2/another/index.mjs";
6796+import * as m12 from "./subfolder2/another/index.cjs";
6797+// The next ones should all fail - esm format files have no index resolution or extension resolution
6798+import * as m13 from "./";
6799+import * as m14 from "./index";
6800+import * as m15 from "./subfolder";
6801+import * as m16 from "./subfolder/";
6802+import * as m17 from "./subfolder/index";
6803+import * as m18 from "./subfolder2";
6804+import * as m19 from "./subfolder2/";
6805+import * as m20 from "./subfolder2/index";
6806+import * as m21 from "./subfolder2/another";
6807+import * as m22 from "./subfolder2/another/";
6808+import * as m23 from "./subfolder2/another/index";
6809+void m1;
6810+void m2;
6811+void m3;
6812+void m4;
6813+void m5;
6814+void m6;
6815+void m7;
6816+void m8;
6817+void m9;
6818+void m10;
6819+void m11;
6820+void m12;
6821+void m13;
6822+void m14;
6823+void m15;
6824+void m16;
6825+void m17;
6826+void m18;
6827+void m19;
6828+void m20;
6829+void m21;
6830+void m22;
6831+void m23;
6832+
6833+// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
6834+import m24 = require("./");
6835+import m25 = require("./index");
6836+import m26 = require("./subfolder");
6837+import m27 = require("./subfolder/");
6838+import m28 = require("./subfolder/index");
6839+import m29 = require("./subfolder2");
6840+import m30 = require("./subfolder2/");
6841+import m31 = require("./subfolder2/index");
6842+import m32 = require("./subfolder2/another");
6843+import m33 = require("./subfolder2/another/");
6844+import m34 = require("./subfolder2/another/index");
6845+void m24;
6846+void m25;
6847+void m26;
6848+void m27;
6849+void m28;
6850+void m29;
6851+void m30;
6852+void m31;
6853+void m32;
6854+void m33;
6855+void m34;
6856+
6857+// These shouldn't work - dynamic `import()` always uses the esm resolver, which does not have extension resolution
6858+const _m35 = import("./");
6859+const _m36 = import("./index");
6860+const _m37 = import("./subfolder");
6861+const _m38 = import("./subfolder/");
6862+const _m39 = import("./subfolder/index");
6863+const _m40 = import("./subfolder2");
6864+const _m41 = import("./subfolder2/");
6865+const _m42 = import("./subfolder2/index");
6866+const _m43 = import("./subfolder2/another");
6867+const _m44 = import("./subfolder2/another/");
6868+const _m45 = import("./subfolder2/another/index");
6869+
6870+// esm format file
6871+const x = 1;
6872+export {x};
6873+// @filename: package.json
6874+{
6875+    "name": "package",
6876+    "private": true,
6877+    "type": "module"
6878+}
6879+// @filename: subfolder/package.json
6880+{
6881+    "type": "commonjs"
6882+}
6883+// @filename: subfolder2/package.json
6884+{
6885+}
6886+// @filename: subfolder2/another/package.json
6887+{
6888+    "type": "module"
6889+}
6890\ No newline at end of file
6891diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsCjsFromJs.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsCjsFromJs.ts
6892new file mode 100644
6893index 0000000000..ea0821742f
6894--- /dev/null
6895+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsCjsFromJs.ts
6896@@ -0,0 +1,8 @@
6897+// @module: node12,nodenext
6898+// @allowJs: true
6899+// @noEmit: true
6900+// @filename: foo.cjs
6901+exports.foo = "foo"
6902+// @filename: bar.ts
6903+import foo from "./foo.cjs"
6904+foo.foo;
6905\ No newline at end of file
6906diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsConditionalPackageExports.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsConditionalPackageExports.ts
6907new file mode 100644
6908index 0000000000..1020812d5a
6909--- /dev/null
6910+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsConditionalPackageExports.ts
6911@@ -0,0 +1,126 @@
6912+// @module: node12,nodenext
6913+// @declaration: true
6914+// @allowJs: true
6915+// @checkJs: true
6916+// @outDir: out
6917+// @filename: index.js
6918+// esm format file
6919+import * as cjs from "package/cjs";
6920+import * as mjs from "package/mjs";
6921+import * as type from "package";
6922+cjs;
6923+mjs;
6924+type;
6925+import * as cjsi from "inner/a";
6926+import * as mjsi from "inner/b";
6927+import * as typei from "inner";
6928+import * as ts from "inner/types";
6929+cjsi.mjsSource;
6930+mjsi.mjsSource;
6931+typei.mjsSource;
6932+ts.mjsSource;
6933+// @filename: index.mjs
6934+// esm format file
6935+import * as cjs from "package/cjs";
6936+import * as mjs from "package/mjs";
6937+import * as type from "package";
6938+cjs;
6939+mjs;
6940+type;
6941+import * as cjsi from "inner/a";
6942+import * as mjsi from "inner/b";
6943+import * as typei from "inner";
6944+import * as ts from "inner/types";
6945+cjsi.mjsSource;
6946+mjsi.mjsSource;
6947+typei.mjsSource;
6948+ts.mjsSource;
6949+// @filename: index.cjs
6950+// cjs format file
6951+import * as cjs from "package/cjs";
6952+import * as mjs from "package/mjs";
6953+import * as type from "package";
6954+cjs;
6955+mjs;
6956+type;
6957+import * as cjsi from "inner/a";
6958+import * as mjsi from "inner/b";
6959+import * as typei from "inner";
6960+import * as ts from "inner/types";
6961+cjsi.cjsSource;
6962+mjsi.cjsSource;
6963+typei.implicitCjsSource;
6964+ts.cjsSource;
6965+// @filename: node_modules/inner/index.d.ts
6966+// cjs format file
6967+import * as cjs from "inner/a";
6968+import * as mjs from "inner/b";
6969+import * as type from "inner";
6970+import * as ts from "inner/types";
6971+export { cjs };
6972+export { mjs };
6973+export { type };
6974+export { ts };
6975+export const implicitCjsSource = true;
6976+// @filename: node_modules/inner/index.d.mts
6977+// esm format file
6978+import * as cjs from "inner/a";
6979+import * as mjs from "inner/b";
6980+import * as type from "inner";
6981+import * as ts from "inner/types";
6982+export { cjs };
6983+export { mjs };
6984+export { type };
6985+export { ts };
6986+export const mjsSource = true;
6987+// @filename: node_modules/inner/index.d.cts
6988+// cjs format file
6989+import * as cjs from "inner/a";
6990+import * as mjs from "inner/b";
6991+import * as type from "inner";
6992+import * as ts from "inner/types";
6993+export { cjs };
6994+export { mjs };
6995+export { type };
6996+export { ts };
6997+export const cjsSource = true;
6998+// @filename: package.json
6999+{
7000+    "name": "package",
7001+    "private": true,
7002+    "type": "module",
7003+    "exports": {
7004+        "./cjs": "./index.cjs",
7005+        "./mjs": "./index.mjs",
7006+        ".": "./index.js"
7007+    }
7008+}
7009+// @filename: node_modules/inner/package.json
7010+{
7011+    "name": "inner",
7012+    "private": true,
7013+    "exports": {
7014+        "./a": {
7015+            "require": "./index.cjs",
7016+            "node": "./index.mjs"
7017+        },
7018+        "./b": {
7019+            "import": "./index.mjs",
7020+            "node": "./index.cjs"
7021+        },
7022+        ".": {
7023+            "import": "./index.mjs",
7024+            "node": "./index.js"
7025+        },
7026+        "./types": {
7027+            "types": {
7028+                "import": "./index.d.mts",
7029+                "require": "./index.d.cts",
7030+            },
7031+            "node": {
7032+                "import": "./index.mjs",
7033+                "require": "./index.cjs"
7034+            }
7035+        }
7036+    }
7037+}
7038\ No newline at end of file
7039diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsDynamicImport.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsDynamicImport.ts
7040new file mode 100644
7041index 0000000000..d7032c648b
7042--- /dev/null
7043+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsDynamicImport.ts
7044@@ -0,0 +1,27 @@
7045+// @module: node12,nodenext
7046+// @declaration: true
7047+// @allowJs: true
7048+// @checkJs: true
7049+// @outDir: out
7050+// @filename: subfolder/index.js
7051+// cjs format file
7052+export async function main() {
7053+    const { readFile } = await import("fs");
7054+}
7055+// @filename: index.js
7056+// esm format file
7057+export async function main() {
7058+    const { readFile } = await import("fs");
7059+}
7060+// @filename: package.json
7061+{
7062+    "name": "package",
7063+    "private": true,
7064+    "type": "module"
7065+}
7066+// @filename: subfolder/package.json
7067+{
7068+    "type": "commonjs"
7069+}
7070+// @filename: types.d.ts
7071+declare module "fs";
7072\ No newline at end of file
7073diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts
7074new file mode 100644
7075index 0000000000..f7d5aaf822
7076--- /dev/null
7077+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts
7078@@ -0,0 +1,32 @@
7079+// @module: node12,nodenext
7080+// @declaration: true
7081+// @allowJs: true
7082+// @checkJs: true
7083+// @outDir: out
7084+// @filename: subfolder/index.js
7085+// cjs format file
7086+const a = {};
7087+export = a;
7088+// @filename: subfolder/file.js
7089+// cjs format file
7090+const a = {};
7091+module.exports = a;
7092+// @filename: index.js
7093+// esm format file
7094+const a = {};
7095+export = a;
7096+// @filename: file.js
7097+// esm format file
7098+import "fs";
7099+const a = {};
7100+module.exports = a;
7101+// @filename: package.json
7102+{
7103+    "name": "package",
7104+    "private": true,
7105+    "type": "module"
7106+}
7107+// @filename: subfolder/package.json
7108+{
7109+    "type": "commonjs"
7110+}
7111\ No newline at end of file
7112diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsGeneratedNameCollisions.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsGeneratedNameCollisions.ts
7113new file mode 100644
7114index 0000000000..14783731bf
7115--- /dev/null
7116+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsGeneratedNameCollisions.ts
7117@@ -0,0 +1,29 @@
7118+// @module: node12,nodenext
7119+// @declaration: true
7120+// @allowJs: true
7121+// @checkJs: true
7122+// @outDir: out
7123+// @filename: subfolder/index.js
7124+// cjs format file
7125+function require() {}
7126+const exports = {};
7127+class Object {}
7128+export const __esModule = false;
7129+export {require, exports, Object};
7130+// @filename: index.js
7131+// esm format file
7132+function require() {}
7133+const exports = {};
7134+class Object {}
7135+export const __esModule = false;
7136+export {require, exports, Object};
7137+// @filename: package.json
7138+{
7139+    "name": "package",
7140+    "private": true,
7141+    "type": "module"
7142+}
7143+// @filename: subfolder/package.json
7144+{
7145+    "type": "commonjs"
7146+}
7147\ No newline at end of file
7148diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportAssignment.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportAssignment.ts
7149new file mode 100644
7150index 0000000000..53e6b94450
7151--- /dev/null
7152+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportAssignment.ts
7153@@ -0,0 +1,34 @@
7154+// @module: node12,nodenext
7155+// @declaration: true
7156+// @allowJs: true
7157+// @checkJs: true
7158+// @outDir: out
7159+// @filename: subfolder/index.js
7160+// cjs format file
7161+import fs = require("fs");
7162+fs.readFile;
7163+export import fs2 = require("fs");
7164+// @filename: index.js
7165+// esm format file
7166+import fs = require("fs");
7167+fs.readFile;
7168+export import fs2 = require("fs");
7169+// @filename: file.js
7170+// esm format file
7171+const __require = null;
7172+const _createRequire = null;
7173+import fs = require("fs");
7174+fs.readFile;
7175+export import fs2 = require("fs");
7176+// @filename: package.json
7177+{
7178+    "name": "package",
7179+    "private": true,
7180+    "type": "module"
7181+}
7182+// @filename: subfolder/package.json
7183+{
7184+    "type": "commonjs"
7185+}
7186+// @filename: types.d.ts
7187+declare module "fs";
7188\ No newline at end of file
7189diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions1.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions1.ts
7190new file mode 100644
7191index 0000000000..d5727a3dc7
7192--- /dev/null
7193+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions1.ts
7194@@ -0,0 +1,34 @@
7195+// @module: node12,nodenext
7196+// @declaration: true
7197+// @importHelpers: true
7198+// @allowJs: true
7199+// @checkJs: true
7200+// @outDir: out
7201+// @filename: subfolder/index.js
7202+// cjs format file
7203+import {default as _fs} from "fs";
7204+_fs.readFile;
7205+import * as fs from "fs";
7206+fs.readFile;
7207+// @filename: index.js
7208+// esm format file
7209+import {default as _fs} from "fs";
7210+_fs.readFile;
7211+import * as fs from "fs";
7212+fs.readFile;
7213+// @filename: package.json
7214+{
7215+    "name": "package",
7216+    "private": true,
7217+    "type": "module"
7218+}
7219+// @filename: subfolder/package.json
7220+{
7221+    "type": "commonjs"
7222+}
7223+// @filename: types.d.ts
7224+declare module "fs";
7225+declare module "tslib" {
7226+    export {};
7227+    // intentionally missing all helpers
7228+}
7229\ No newline at end of file
7230diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts
7231new file mode 100644
7232index 0000000000..032290f78b
7233--- /dev/null
7234+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts
7235@@ -0,0 +1,30 @@
7236+// @module: node12,nodenext
7237+// @declaration: true
7238+// @importHelpers: true
7239+// @allowJs: true
7240+// @checkJs: true
7241+// @outDir: out
7242+// @filename: subfolder/index.ts
7243+// cjs format file
7244+export * from "fs";
7245+export * as fs from "fs";
7246+// @filename: index.js
7247+// esm format file
7248+export * from "fs";
7249+export * as fs from "fs";
7250+// @filename: package.json
7251+{
7252+    "name": "package",
7253+    "private": true,
7254+    "type": "module"
7255+}
7256+// @filename: subfolder/package.json
7257+{
7258+    "type": "commonjs"
7259+}
7260+// @filename: types.d.ts
7261+declare module "fs";
7262+declare module "tslib" {
7263+    export {};
7264+    // intentionally missing all helpers
7265+}
7266\ No newline at end of file
7267diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions3.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions3.ts
7268new file mode 100644
7269index 0000000000..9452e2003a
7270--- /dev/null
7271+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions3.ts
7272@@ -0,0 +1,32 @@
7273+// @module: node12,nodenext
7274+// @declaration: true
7275+// @importHelpers: true
7276+// @allowJs: true
7277+// @checkJs: true
7278+// @outDir: out
7279+// @filename: subfolder/index.js
7280+// cjs format file
7281+export {default} from "fs";
7282+export {default as foo} from "fs";
7283+export {bar as baz} from "fs";
7284+// @filename: index.js
7285+// esm format file
7286+export {default} from "fs";
7287+export {default as foo} from "fs";
7288+export {bar as baz} from "fs";
7289+// @filename: package.json
7290+{
7291+    "name": "package",
7292+    "private": true,
7293+    "type": "module"
7294+}
7295+// @filename: subfolder/package.json
7296+{
7297+    "type": "commonjs"
7298+}
7299+// @filename: types.d.ts
7300+declare module "fs";
7301+declare module "tslib" {
7302+    export {};
7303+    // intentionally missing all helpers
7304+}
7305\ No newline at end of file
7306diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportMeta.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportMeta.ts
7307new file mode 100644
7308index 0000000000..a8708434b9
7309--- /dev/null
7310+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportMeta.ts
7311@@ -0,0 +1,23 @@
7312+// @module: node12,nodenext
7313+// @declaration: true
7314+// @allowJs: true
7315+// @checkJs: true
7316+// @outDir: out
7317+// @filename: subfolder/index.js
7318+// cjs format file
7319+const x = import.meta.url;
7320+export {x};
7321+// @filename: index.js
7322+// esm format file
7323+const x = import.meta.url;
7324+export {x};
7325+// @filename: package.json
7326+{
7327+    "name": "package",
7328+    "private": true,
7329+    "type": "module"
7330+}
7331+// @filename: subfolder/package.json
7332+{
7333+    "type": "commonjs"
7334+}
7335\ No newline at end of file
7336diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageExports.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageExports.ts
7337new file mode 100644
7338index 0000000000..65e5721b0b
7339--- /dev/null
7340+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageExports.ts
7341@@ -0,0 +1,92 @@
7342+// @module: node12,nodenext
7343+// @declaration: true
7344+// @allowJs: true
7345+// @checkJs: true
7346+// @outDir: out
7347+// @filename: index.js
7348+// esm format file
7349+import * as cjs from "package/cjs";
7350+import * as mjs from "package/mjs";
7351+import * as type from "package";
7352+cjs;
7353+mjs;
7354+type;
7355+import * as cjsi from "inner/cjs";
7356+import * as mjsi from "inner/mjs";
7357+import * as typei from "inner";
7358+cjsi;
7359+mjsi;
7360+typei;
7361+// @filename: index.mjs
7362+// esm format file
7363+import * as cjs from "package/cjs";
7364+import * as mjs from "package/mjs";
7365+import * as type from "package";
7366+cjs;
7367+mjs;
7368+type;
7369+import * as cjsi from "inner/cjs";
7370+import * as mjsi from "inner/mjs";
7371+import * as typei from "inner";
7372+cjsi;
7373+mjsi;
7374+typei;
7375+// @filename: index.cjs
7376+// cjs format file
7377+import * as cjs from "package/cjs";
7378+import * as mjs from "package/mjs";
7379+import * as type from "package";
7380+cjs;
7381+mjs;
7382+type;
7383+import * as cjsi from "inner/cjs";
7384+import * as mjsi from "inner/mjs";
7385+import * as typei from "inner";
7386+cjsi;
7387+mjsi;
7388+typei;
7389+// @filename: node_modules/inner/index.d.ts
7390+// cjs format file
7391+import * as cjs from "inner/cjs";
7392+import * as mjs from "inner/mjs";
7393+import * as type from "inner";
7394+export { cjs };
7395+export { mjs };
7396+export { type };
7397+// @filename: node_modules/inner/index.d.mts
7398+// esm format file
7399+import * as cjs from "inner/cjs";
7400+import * as mjs from "inner/mjs";
7401+import * as type from "inner";
7402+export { cjs };
7403+export { mjs };
7404+export { type };
7405+// @filename: node_modules/inner/index.d.cts
7406+// cjs format file
7407+import * as cjs from "inner/cjs";
7408+import * as mjs from "inner/mjs";
7409+import * as type from "inner";
7410+export { cjs };
7411+export { mjs };
7412+export { type };
7413+// @filename: package.json
7414+{
7415+    "name": "package",
7416+    "private": true,
7417+    "type": "module",
7418+    "exports": {
7419+        "./cjs": "./index.cjs",
7420+        "./mjs": "./index.mjs",
7421+        ".": "./index.js"
7422+    }
7423+}
7424+// @filename: node_modules/inner/package.json
7425+{
7426+    "name": "inner",
7427+    "private": true,
7428+    "exports": {
7429+        "./cjs": "./index.cjs",
7430+        "./mjs": "./index.mjs",
7431+        ".": "./index.js"
7432+    }
7433+}
7434\ No newline at end of file
7435diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageImports.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageImports.ts
7436new file mode 100644
7437index 0000000000..b9d6027f5d
7438--- /dev/null
7439+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageImports.ts
7440@@ -0,0 +1,41 @@
7441+// @module: node12,nodenext
7442+// @declaration: true
7443+// @allowJs: true
7444+// @checkJs: true
7445+// @outDir: out
7446+// @filename: index.js
7447+// esm format file
7448+import * as cjs from "#cjs";
7449+import * as mjs from "#mjs";
7450+import * as type from "#type";
7451+cjs;
7452+mjs;
7453+type;
7454+// @filename: index.mjs
7455+// esm format file
7456+import * as cjs from "#cjs";
7457+import * as mjs from "#mjs";
7458+import * as type from "#type";
7459+cjs;
7460+mjs;
7461+type;
7462+// @filename: index.cjs
7463+// esm format file
7464+import * as cjs from "#cjs";
7465+import * as mjs from "#mjs";
7466+import * as type from "#type";
7467+cjs;
7468+mjs;
7469+type;
7470+// @filename: package.json
7471+{
7472+    "name": "package",
7473+    "private": true,
7474+    "type": "module",
7475+    "exports": "./index.js",
7476+    "imports": {
7477+        "#cjs": "./index.cjs",
7478+        "#mjs": "./index.mjs",
7479+        "#type": "./index.js"
7480+    }
7481+}
7482\ No newline at end of file
7483diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExports.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExports.ts
7484new file mode 100644
7485index 0000000000..2691885690
7486--- /dev/null
7487+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExports.ts
7488@@ -0,0 +1,69 @@
7489+// @module: node12,nodenext
7490+// @declaration: true
7491+// @allowJs: true
7492+// @checkJs: true
7493+// @outDir: out
7494+// @filename: index.js
7495+// esm format file
7496+import * as cjsi from "inner/cjs/index";
7497+import * as mjsi from "inner/mjs/index";
7498+import * as typei from "inner/js/index";
7499+cjsi;
7500+mjsi;
7501+typei;
7502+// @filename: index.mjs
7503+// esm format file
7504+import * as cjsi from "inner/cjs/index";
7505+import * as mjsi from "inner/mjs/index";
7506+import * as typei from "inner/js/index";
7507+cjsi;
7508+mjsi;
7509+typei;
7510+// @filename: index.cjs
7511+// cjs format file
7512+import * as cjsi from "inner/cjs/index";
7513+import * as mjsi from "inner/mjs/index";
7514+import * as typei from "inner/js/index";
7515+cjsi;
7516+mjsi;
7517+typei;
7518+// @filename: node_modules/inner/index.d.ts
7519+// cjs format file
7520+import * as cjs from "inner/cjs/index";
7521+import * as mjs from "inner/mjs/index";
7522+import * as type from "inner/js/index";
7523+export { cjs };
7524+export { mjs };
7525+export { type };
7526+// @filename: node_modules/inner/index.d.mts
7527+// esm format file
7528+import * as cjs from "inner/cjs/index";
7529+import * as mjs from "inner/mjs/index";
7530+import * as type from "inner/js/index";
7531+export { cjs };
7532+export { mjs };
7533+export { type };
7534+// @filename: node_modules/inner/index.d.cts
7535+// cjs format file
7536+import * as cjs from "inner/cjs/index";
7537+import * as mjs from "inner/mjs/index";
7538+import * as type from "inner/js/index";
7539+export { cjs };
7540+export { mjs };
7541+export { type };
7542+// @filename: package.json
7543+{
7544+    "name": "package",
7545+    "private": true,
7546+    "type": "module",
7547+}
7548+// @filename: node_modules/inner/package.json
7549+{
7550+    "name": "inner",
7551+    "private": true,
7552+    "exports": {
7553+        "./cjs/*": "./*.cjs",
7554+        "./mjs/*": "./*.mjs",
7555+        "./js/*": "./*.js"
7556+    }
7557+}
7558\ No newline at end of file
7559diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsTrailers.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsTrailers.ts
7560new file mode 100644
7561index 0000000000..6b96f34758
7562--- /dev/null
7563+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsTrailers.ts
7564@@ -0,0 +1,69 @@
7565+// @module: node12,nodenext
7566+// @declaration: true
7567+// @allowJs: true
7568+// @checkJs: true
7569+// @outDir: out
7570+// @filename: index.js
7571+// esm format file
7572+import * as cjsi from "inner/cjs/index.cjs";
7573+import * as mjsi from "inner/mjs/index.mjs";
7574+import * as typei from "inner/js/index.js";
7575+cjsi;
7576+mjsi;
7577+typei;
7578+// @filename: index.mjs
7579+// esm format file
7580+import * as cjsi from "inner/cjs/index.cjs";
7581+import * as mjsi from "inner/mjs/index.mjs";
7582+import * as typei from "inner/js/index.js";
7583+cjsi;
7584+mjsi;
7585+typei;
7586+// @filename: index.cjs
7587+// cjs format file
7588+import * as cjsi from "inner/cjs/index.cjs";
7589+import * as mjsi from "inner/mjs/index.mjs";
7590+import * as typei from "inner/js/index.js";
7591+cjsi;
7592+mjsi;
7593+typei;
7594+// @filename: node_modules/inner/index.d.ts
7595+// cjs format file
7596+import * as cjs from "inner/cjs/index.cjs";
7597+import * as mjs from "inner/mjs/index.mjs";
7598+import * as type from "inner/js/index.js";
7599+export { cjs };
7600+export { mjs };
7601+export { type };
7602+// @filename: node_modules/inner/index.d.mts
7603+// esm format file
7604+import * as cjs from "inner/cjs/index.cjs";
7605+import * as mjs from "inner/mjs/index.mjs";
7606+import * as type from "inner/js/index.js";
7607+export { cjs };
7608+export { mjs };
7609+export { type };
7610+// @filename: node_modules/inner/index.d.cts
7611+// cjs format file
7612+import * as cjs from "inner/cjs/index.cjs";
7613+import * as mjs from "inner/mjs/index.mjs";
7614+import * as type from "inner/js/index.js";
7615+export { cjs };
7616+export { mjs };
7617+export { type };
7618+// @filename: package.json
7619+{
7620+    "name": "package",
7621+    "private": true,
7622+    "type": "module",
7623+}
7624+// @filename: node_modules/inner/package.json
7625+{
7626+    "name": "inner",
7627+    "private": true,
7628+    "exports": {
7629+        "./cjs/*.cjs": "./*.cjs",
7630+        "./mjs/*.mjs": "./*.mjs",
7631+        "./js/*.js": "./*.js"
7632+    }
7633+}
7634\ No newline at end of file
7635diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsSynchronousCallErrors.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsSynchronousCallErrors.ts
7636new file mode 100644
7637index 0000000000..15892edbe3
7638--- /dev/null
7639+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsSynchronousCallErrors.ts
7640@@ -0,0 +1,37 @@
7641+// @module: node12,nodenext
7642+// @declaration: true
7643+// @allowJs: true
7644+// @checkJs: true
7645+// @outDir: out
7646+// @filename: subfolder/index.js
7647+// cjs format file
7648+import {h} from "../index.js";
7649+import mod = require("../index.js");
7650+import {f as _f} from "./index.js";
7651+import mod2 = require("./index.js");
7652+export async function f() {
7653+    const mod3 = await import ("../index.js");
7654+    const mod4 = await import ("./index.js");
7655+    h();
7656+}
7657+// @filename: index.js
7658+// esm format file
7659+import {h as _h} from "./index.js";
7660+import mod = require("./index.js");
7661+import {f} from "./subfolder/index.js";
7662+import mod2 = require("./subfolder/index.js");
7663+export async function h() {
7664+    const mod3 = await import ("./index.js");
7665+    const mod4 = await import ("./subfolder/index.js");
7666+    f();
7667+}
7668+// @filename: package.json
7669+{
7670+    "name": "package",
7671+    "private": true,
7672+    "type": "module"
7673+}
7674+// @filename: subfolder/package.json
7675+{
7676+    "type": "commonjs"
7677+}
7678\ No newline at end of file
7679diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts
7680new file mode 100644
7681index 0000000000..872cad71c9
7682--- /dev/null
7683+++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts
7684@@ -0,0 +1,25 @@
7685+// @module: node12,nodenext
7686+// @declaration: true
7687+// @allowJs: true
7688+// @checkJs: true
7689+// @outDir: out
7690+// @filename: subfolder/index.js
7691+// cjs format file
7692+const x = await 1;
7693+export {x};
7694+for await (const y of []) {}
7695+// @filename: index.js
7696+// esm format file
7697+const x = await 1;
7698+export {x};
7699+for await (const y of []) {}
7700+// @filename: package.json
7701+{
7702+    "name": "package",
7703+    "private": true,
7704+    "type": "module"
7705+}
7706+// @filename: subfolder/package.json
7707+{
7708+    "type": "commonjs"
7709+}
7710\ No newline at end of file
7711diff --git a/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts
7712new file mode 100644
7713index 0000000000..656465829e
7714--- /dev/null
7715+++ b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts
7716@@ -0,0 +1,33 @@
7717+// @module: commonjs
7718+// @lib: es2020
7719+// @declaration: true
7720+// @filename: index.ts
7721+export const a = async () => (await import("inner")).x();
7722+// @filename: node_modules/inner/index.d.ts
7723+export { x } from "./other.js";
7724+// @filename: node_modules/inner/other.d.ts
7725+import { Thing } from "./private.js"
7726+export const x: () => Thing;
7727+// @filename: node_modules/inner/private.d.ts
7728+export interface Thing {} // not exported in export map, inaccessible under new module modes
7729+// @filename: package.json
7730+{
7731+    "name": "package",
7732+    "private": true,
7733+    "type": "module",
7734+    "exports": "./index.js"
7735+}
7736+// @filename: node_modules/inner/package.json
7737+{
7738+    "name": "inner",
7739+    "private": true,
7740+    "type": "module",
7741+    "exports": {
7742+        ".": {
7743+            "default": "./index.js"
7744+        },
7745+        "./other": {
7746+            "default": "./other.js"
7747+        }
7748+    }
7749+}
7750\ No newline at end of file
7751diff --git a/tests/cases/conformance/node/nodeModules1.ts b/tests/cases/conformance/node/nodeModules1.ts
7752new file mode 100644
7753index 0000000000..698a6efec1
7754--- /dev/null
7755+++ b/tests/cases/conformance/node/nodeModules1.ts
7756@@ -0,0 +1,321 @@
7757+// @module: node12,nodenext
7758+// @declaration: true
7759+// @filename: subfolder/index.ts
7760+// cjs format file
7761+const x = 1;
7762+export {x};
7763+// @filename: subfolder/index.cts
7764+// cjs format file
7765+const x = 1;
7766+export {x};
7767+// @filename: subfolder/index.mts
7768+// esm format file
7769+const x = 1;
7770+export {x};
7771+// @filename: subfolder2/index.ts
7772+// cjs format file
7773+const x = 1;
7774+export {x};
7775+// @filename: subfolder2/index.cts
7776+// cjs format file
7777+const x = 1;
7778+export {x};
7779+// @filename: subfolder2/index.mts
7780+// esm format file
7781+const x = 1;
7782+export {x};
7783+// @filename: subfolder2/another/index.ts
7784+// esm format file
7785+const x = 1;
7786+export {x};
7787+// @filename: subfolder2/another/index.mts
7788+// esm format file
7789+const x = 1;
7790+export {x};
7791+// @filename: subfolder2/another/index.cts
7792+// cjs format file
7793+const x = 1;
7794+export {x};
7795+// @filename: index.mts
7796+import * as m1 from "./index.js";
7797+import * as m2 from "./index.mjs";
7798+import * as m3 from "./index.cjs";
7799+import * as m4 from "./subfolder/index.js";
7800+import * as m5 from "./subfolder/index.mjs";
7801+import * as m6 from "./subfolder/index.cjs";
7802+import * as m7 from "./subfolder2/index.js";
7803+import * as m8 from "./subfolder2/index.mjs";
7804+import * as m9 from "./subfolder2/index.cjs";
7805+import * as m10 from "./subfolder2/another/index.js";
7806+import * as m11 from "./subfolder2/another/index.mjs";
7807+import * as m12 from "./subfolder2/another/index.cjs";
7808+// The next ones should all fail - esm format files have no index resolution or extension resolution
7809+import * as m13 from "./";
7810+import * as m14 from "./index";
7811+import * as m15 from "./subfolder";
7812+import * as m16 from "./subfolder/";
7813+import * as m17 from "./subfolder/index";
7814+import * as m18 from "./subfolder2";
7815+import * as m19 from "./subfolder2/";
7816+import * as m20 from "./subfolder2/index";
7817+import * as m21 from "./subfolder2/another";
7818+import * as m22 from "./subfolder2/another/";
7819+import * as m23 from "./subfolder2/another/index";
7820+void m1;
7821+void m2;
7822+void m3;
7823+void m4;
7824+void m5;
7825+void m6;
7826+void m7;
7827+void m8;
7828+void m9;
7829+void m10;
7830+void m11;
7831+void m12;
7832+void m13;
7833+void m14;
7834+void m15;
7835+void m16;
7836+void m17;
7837+void m18;
7838+void m19;
7839+void m20;
7840+void m21;
7841+void m22;
7842+void m23;
7843+
7844+// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
7845+import m24 = require("./");
7846+import m25 = require("./index");
7847+import m26 = require("./subfolder");
7848+import m27 = require("./subfolder/");
7849+import m28 = require("./subfolder/index");
7850+import m29 = require("./subfolder2");
7851+import m30 = require("./subfolder2/");
7852+import m31 = require("./subfolder2/index");
7853+import m32 = require("./subfolder2/another");
7854+import m33 = require("./subfolder2/another/");
7855+import m34 = require("./subfolder2/another/index");
7856+void m24;
7857+void m25;
7858+void m26;
7859+void m27;
7860+void m28;
7861+void m29;
7862+void m30;
7863+void m31;
7864+void m32;
7865+void m33;
7866+void m34;
7867+
7868+// These shouldn't work - dynamic `import()` always uses the esm resolver, which does not have extension resolution
7869+const _m35 = import("./");
7870+const _m36 = import("./index");
7871+const _m37 = import("./subfolder");
7872+const _m38 = import("./subfolder/");
7873+const _m39 = import("./subfolder/index");
7874+const _m40 = import("./subfolder2");
7875+const _m41 = import("./subfolder2/");
7876+const _m42 = import("./subfolder2/index");
7877+const _m43 = import("./subfolder2/another");
7878+const _m44 = import("./subfolder2/another/");
7879+const _m45 = import("./subfolder2/another/index");
7880+
7881+// esm format file
7882+const x = 1;
7883+export {x};
7884+// @filename: index.cts
7885+// ESM-format imports below should issue errors
7886+import * as m1 from "./index.js";
7887+import * as m2 from "./index.mjs";
7888+import * as m3 from "./index.cjs";
7889+import * as m4 from "./subfolder/index.js";
7890+import * as m5 from "./subfolder/index.mjs";
7891+import * as m6 from "./subfolder/index.cjs";
7892+import * as m7 from "./subfolder2/index.js";
7893+import * as m8 from "./subfolder2/index.mjs";
7894+import * as m9 from "./subfolder2/index.cjs";
7895+import * as m10 from "./subfolder2/another/index.js";
7896+import * as m11 from "./subfolder2/another/index.mjs";
7897+import * as m12 from "./subfolder2/another/index.cjs";
7898+// The next ones should _mostly_ work - cjs format files have index resolution and extension resolution (except for those which resolve to an esm format file)
7899+import * as m13 from "./";
7900+import * as m14 from "./index";
7901+import * as m15 from "./subfolder";
7902+import * as m16 from "./subfolder/";
7903+import * as m17 from "./subfolder/index";
7904+import * as m18 from "./subfolder2";
7905+import * as m19 from "./subfolder2/";
7906+import * as m20 from "./subfolder2/index";
7907+import * as m21 from "./subfolder2/another";
7908+import * as m22 from "./subfolder2/another/";
7909+import * as m23 from "./subfolder2/another/index";
7910+void m1;
7911+void m2;
7912+void m3;
7913+void m4;
7914+void m5;
7915+void m6;
7916+void m7;
7917+void m8;
7918+void m9;
7919+void m10;
7920+void m11;
7921+void m12;
7922+void m13;
7923+void m14;
7924+void m15;
7925+void m16;
7926+void m17;
7927+void m18;
7928+void m19;
7929+void m20;
7930+void m21;
7931+void m22;
7932+void m23;
7933+
7934+// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
7935+import m24 = require("./");
7936+import m25 = require("./index");
7937+import m26 = require("./subfolder");
7938+import m27 = require("./subfolder/");
7939+import m28 = require("./subfolder/index");
7940+import m29 = require("./subfolder2");
7941+import m30 = require("./subfolder2/");
7942+import m31 = require("./subfolder2/index");
7943+import m32 = require("./subfolder2/another");
7944+import m33 = require("./subfolder2/another/");
7945+import m34 = require("./subfolder2/another/index");
7946+void m24;
7947+void m25;
7948+void m26;
7949+void m27;
7950+void m28;
7951+void m29;
7952+void m30;
7953+void m31;
7954+void m32;
7955+void m33;
7956+void m34;
7957+
7958+// These shouldn't work - dynamic `import()` always uses the esm resolver, which does not have extension resolution
7959+const _m35 = import("./");
7960+const _m36 = import("./index");
7961+const _m37 = import("./subfolder");
7962+const _m38 = import("./subfolder/");
7963+const _m39 = import("./subfolder/index");
7964+const _m40 = import("./subfolder2");
7965+const _m41 = import("./subfolder2/");
7966+const _m42 = import("./subfolder2/index");
7967+const _m43 = import("./subfolder2/another");
7968+const _m44 = import("./subfolder2/another/");
7969+const _m45 = import("./subfolder2/another/index");
7970+// cjs format file
7971+const x = 1;
7972+export {x};
7973+// @filename: index.ts
7974+import * as m1 from "./index.js";
7975+import * as m2 from "./index.mjs";
7976+import * as m3 from "./index.cjs";
7977+import * as m4 from "./subfolder/index.js";
7978+import * as m5 from "./subfolder/index.mjs";
7979+import * as m6 from "./subfolder/index.cjs";
7980+import * as m7 from "./subfolder2/index.js";
7981+import * as m8 from "./subfolder2/index.mjs";
7982+import * as m9 from "./subfolder2/index.cjs";
7983+import * as m10 from "./subfolder2/another/index.js";
7984+import * as m11 from "./subfolder2/another/index.mjs";
7985+import * as m12 from "./subfolder2/another/index.cjs";
7986+// The next ones shouldn't all work - esm format files have no index resolution or extension resolution
7987+import * as m13 from "./";
7988+import * as m14 from "./index";
7989+import * as m15 from "./subfolder";
7990+import * as m16 from "./subfolder/";
7991+import * as m17 from "./subfolder/index";
7992+import * as m18 from "./subfolder2";
7993+import * as m19 from "./subfolder2/";
7994+import * as m20 from "./subfolder2/index";
7995+import * as m21 from "./subfolder2/another";
7996+import * as m22 from "./subfolder2/another/";
7997+import * as m23 from "./subfolder2/another/index";
7998+void m1;
7999+void m2;
8000+void m3;
8001+void m4;
8002+void m5;
8003+void m6;
8004+void m7;
8005+void m8;
8006+void m9;
8007+void m10;
8008+void m11;
8009+void m12;
8010+void m13;
8011+void m14;
8012+void m15;
8013+void m16;
8014+void m17;
8015+void m18;
8016+void m19;
8017+void m20;
8018+void m21;
8019+void m22;
8020+void m23;
8021+
8022+// These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!)
8023+import m24 = require("./");
8024+import m25 = require("./index");
8025+import m26 = require("./subfolder");
8026+import m27 = require("./subfolder/");
8027+import m28 = require("./subfolder/index");
8028+import m29 = require("./subfolder2");
8029+import m30 = require("./subfolder2/");
8030+import m31 = require("./subfolder2/index");
8031+import m32 = require("./subfolder2/another");
8032+import m33 = require("./subfolder2/another/");
8033+import m34 = require("./subfolder2/another/index");
8034+void m24;
8035+void m25;
8036+void m26;
8037+void m27;
8038+void m28;
8039+void m29;
8040+void m30;
8041+void m31;
8042+void m32;
8043+void m33;
8044+void m34;
8045+
8046+// These shouldn't work - dynamic `import()` always uses the esm resolver, which does not have extension resolution
8047+const _m35 = import("./");
8048+const _m36 = import("./index");
8049+const _m37 = import("./subfolder");
8050+const _m38 = import("./subfolder/");
8051+const _m39 = import("./subfolder/index");
8052+const _m40 = import("./subfolder2");
8053+const _m41 = import("./subfolder2/");
8054+const _m42 = import("./subfolder2/index");
8055+const _m43 = import("./subfolder2/another");
8056+const _m44 = import("./subfolder2/another/");
8057+const _m45 = import("./subfolder2/another/index");
8058+// esm format file
8059+const x = 1;
8060+export {x};
8061+// @filename: package.json
8062+{
8063+    "name": "package",
8064+    "private": true,
8065+    "type": "module"
8066+}
8067+// @filename: subfolder/package.json
8068+{
8069+    "type": "commonjs"
8070+}
8071+// @filename: subfolder2/package.json
8072+{
8073+}
8074+// @filename: subfolder2/another/package.json
8075+{
8076+    "type": "module"
8077+}
8078\ No newline at end of file
8079diff --git a/tests/cases/conformance/node/nodeModulesCjsFormatFileAlwaysHasDefault.ts b/tests/cases/conformance/node/nodeModulesCjsFormatFileAlwaysHasDefault.ts
8080new file mode 100644
8081index 0000000000..06c6320d77
8082--- /dev/null
8083+++ b/tests/cases/conformance/node/nodeModulesCjsFormatFileAlwaysHasDefault.ts
8084@@ -0,0 +1,19 @@
8085+// @module: node12,nodenext
8086+// @declaration: true
8087+// @filename: subfolder/index.ts
8088+// cjs format file
8089+export const a = 1;
8090+// @filename: index.ts
8091+// esm format file
8092+import mod from "./subfolder/index.js";
8093+mod;
8094+// @filename: package.json
8095+{
8096+    "name": "package",
8097+    "private": true,
8098+    "type": "module"
8099+}
8100+// @filename: subfolder/package.json
8101+{
8102+    "type": "commonjs"
8103+}
8104\ No newline at end of file
8105diff --git a/tests/cases/conformance/node/nodeModulesConditionalPackageExports.ts b/tests/cases/conformance/node/nodeModulesConditionalPackageExports.ts
8106new file mode 100644
8107index 0000000000..07bf9d9724
8108--- /dev/null
8109+++ b/tests/cases/conformance/node/nodeModulesConditionalPackageExports.ts
8110@@ -0,0 +1,124 @@
8111+// @module: node12,nodenext
8112+// @declaration: true
8113+// @outDir: out
8114+// @filename: index.ts
8115+// esm format file
8116+import * as cjs from "package/cjs";
8117+import * as mjs from "package/mjs";
8118+import * as type from "package";
8119+cjs;
8120+mjs;
8121+type;
8122+import * as cjsi from "inner/a";
8123+import * as mjsi from "inner/b";
8124+import * as typei from "inner";
8125+import * as ts from "inner/types";
8126+cjsi.mjsSource;
8127+mjsi.mjsSource;
8128+typei.mjsSource;
8129+ts.mjsSource;
8130+// @filename: index.mts
8131+// esm format file
8132+import * as cjs from "package/cjs";
8133+import * as mjs from "package/mjs";
8134+import * as type from "package";
8135+cjs;
8136+mjs;
8137+type;
8138+import * as cjsi from "inner/a";
8139+import * as mjsi from "inner/b";
8140+import * as typei from "inner";
8141+import * as ts from "inner/types";
8142+cjsi.mjsSource;
8143+mjsi.mjsSource;
8144+typei.mjsSource;
8145+ts.mjsSource;
8146+// @filename: index.cts
8147+// cjs format file
8148+import * as cjs from "package/cjs";
8149+import * as mjs from "package/mjs";
8150+import * as type from "package";
8151+cjs;
8152+mjs;
8153+type;
8154+import * as cjsi from "inner/a";
8155+import * as mjsi from "inner/b";
8156+import * as typei from "inner";
8157+import * as ts from "inner/types";
8158+cjsi.cjsSource;
8159+mjsi.cjsSource;
8160+typei.implicitCjsSource;
8161+ts.cjsSource;
8162+// @filename: node_modules/inner/index.d.ts
8163+// cjs format file
8164+import * as cjs from "inner/a";
8165+import * as mjs from "inner/b";
8166+import * as type from "inner";
8167+import * as ts from "inner/types";
8168+export { cjs };
8169+export { mjs };
8170+export { type };
8171+export { ts };
8172+export const implicitCjsSource = true;
8173+// @filename: node_modules/inner/index.d.mts
8174+// esm format file
8175+import * as cjs from "inner/a";
8176+import * as mjs from "inner/b";
8177+import * as type from "inner";
8178+import * as ts from "inner/types";
8179+export { cjs };
8180+export { mjs };
8181+export { type };
8182+export { ts };
8183+export const mjsSource = true;
8184+// @filename: node_modules/inner/index.d.cts
8185+// cjs format file
8186+import * as cjs from "inner/a";
8187+import * as mjs from "inner/b";
8188+import * as type from "inner";
8189+import * as ts from "inner/types";
8190+export { cjs };
8191+export { mjs };
8192+export { type };
8193+export { ts };
8194+export const cjsSource = true;
8195+// @filename: package.json
8196+{
8197+    "name": "package",
8198+    "private": true,
8199+    "type": "module",
8200+    "exports": {
8201+        "./cjs": "./index.cjs",
8202+        "./mjs": "./index.mjs",
8203+        ".": "./index.js"
8204+    }
8205+}
8206+// @filename: node_modules/inner/package.json
8207+{
8208+    "name": "inner",
8209+    "private": true,
8210+    "exports": {
8211+        "./a": {
8212+            "require": "./index.cjs",
8213+            "node": "./index.mjs"
8214+        },
8215+        "./b": {
8216+            "import": "./index.mjs",
8217+            "node": "./index.cjs"
8218+        },
8219+        ".": {
8220+            "import": "./index.mjs",
8221+            "node": "./index.js"
8222+        },
8223+        "./types": {
8224+            "types": {
8225+                "import": "./index.d.mts",
8226+                "require": "./index.d.cts",
8227+            },
8228+            "node": {
8229+                "import": "./index.mjs",
8230+                "require": "./index.cjs"
8231+            }
8232+        }
8233+    }
8234+}
8235\ No newline at end of file
8236diff --git a/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts
8237new file mode 100644
8238index 0000000000..3f8bae7ffc
8239--- /dev/null
8240+++ b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts
8241@@ -0,0 +1,71 @@
8242+// @module: nodenext
8243+// @declaration: true
8244+// @filename: index.ts
8245+// esm format file
8246+export {};
8247+// @filename: index.mts
8248+// esm format file
8249+export {};
8250+// @filename: index.cts
8251+// cjs format file
8252+export {};
8253+// @filename: other.ts
8254+// esm format file
8255+export const a = await import("package/cjs");
8256+export const b = await import("package/mjs");
8257+export const c = await import("package");
8258+export const f = await import("inner");
8259+// @filename: other2.ts
8260+// esm format file
8261+export const d = await import("inner/cjs");
8262+export const e = await import("inner/mjs");
8263+// @filename: other.mts
8264+// esm format file
8265+export const a = await import("package/cjs");
8266+export const b = await import("package/mjs");
8267+export const c = await import("package");
8268+export const f = await import("inner");
8269+// @filename: other2.mts
8270+// esm format file
8271+export const d = await import("inner/cjs");
8272+export const e = await import("inner/mjs");
8273+// @filename: other.cts
8274+// cjs format file, no TLA
8275+export const a = import("package/cjs");
8276+export const b = import("package/mjs");
8277+export const c = import("package");
8278+export const f = import("inner");
8279+// @filename: other2.cts
8280+// cjs format file, no TLA
8281+export const d = import("inner/cjs");
8282+export const e = import("inner/mjs");
8283+// @filename: node_modules/inner/index.d.ts
8284+// cjs format file
8285+export const cjsMain = true;
8286+// @filename: node_modules/inner/index.d.mts
8287+// esm format file
8288+export const esm = true;
8289+// @filename: node_modules/inner/index.d.cts
8290+// cjs format file
8291+export const cjsNonmain = true;
8292+// @filename: package.json
8293+{
8294+    "name": "package",
8295+    "private": true,
8296+    "type": "module",
8297+    "exports": {
8298+        "./cjs": "./index.cjs",
8299+        "./mjs": "./index.mjs",
8300+        ".": "./index.js"
8301+    }
8302+}
8303+// @filename: node_modules/inner/package.json
8304+{
8305+    "name": "inner",
8306+    "private": true,
8307+    "exports": {
8308+        "./cjs": "./index.cjs",
8309+        "./mjs": "./index.mjs",
8310+        ".": "./index.js"
8311+    }
8312+}
8313\ No newline at end of file
8314diff --git a/tests/cases/conformance/node/nodeModulesDeclarationEmitWithPackageExports.ts b/tests/cases/conformance/node/nodeModulesDeclarationEmitWithPackageExports.ts
8315new file mode 100644
8316index 0000000000..2599ff429f
8317--- /dev/null
8318+++ b/tests/cases/conformance/node/nodeModulesDeclarationEmitWithPackageExports.ts
8319@@ -0,0 +1,93 @@
8320+// @module: node12,nodenext
8321+// @declaration: true
8322+// @outDir: out
8323+// @filename: index.ts
8324+// esm format file
8325+import * as cjs from "package/cjs";
8326+import * as mjs from "package/mjs";
8327+import * as type from "package";
8328+export const a = cjs;
8329+export const b = mjs;
8330+export const c = type;
8331+import * as cjsi from "inner/cjs";
8332+import * as mjsi from "inner/mjs";
8333+import * as typei from "inner";
8334+export const d = cjsi;
8335+export const e = mjsi;
8336+export const f = typei;
8337+// @filename: index.mts
8338+// esm format file
8339+import * as cjs from "package/cjs";
8340+import * as mjs from "package/mjs";
8341+import * as type from "package";
8342+export const a = cjs;
8343+export const b = mjs;
8344+export const c = type;
8345+import * as cjsi from "inner/cjs";
8346+import * as mjsi from "inner/mjs";
8347+import * as typei from "inner";
8348+export const d = cjsi;
8349+export const e = mjsi;
8350+export const f = typei;
8351+// @filename: index.cts
8352+// cjs format file
8353+import * as cjs from "package/cjs";
8354+import * as mjs from "package/mjs";
8355+import * as type from "package";
8356+export const a = cjs;
8357+export const b = mjs;
8358+export const c = type;
8359+import * as cjsi from "inner/cjs";
8360+import * as mjsi from "inner/mjs";
8361+import * as typei from "inner";
8362+export const d = cjsi;
8363+export const e = mjsi;
8364+export const f = typei;
8365+// @filename: node_modules/inner/index.d.ts
8366+// cjs format file
8367+import * as cjs from "inner/cjs";
8368+import * as mjs from "inner/mjs";
8369+import * as type from "inner";
8370+cjs;
8371+mjs;
8372+type;
8373+export const cjsMain = true;
8374+// @filename: node_modules/inner/index.d.mts
8375+// esm format file
8376+import * as cjs from "inner/cjs";
8377+import * as mjs from "inner/mjs";
8378+import * as type from "inner";
8379+cjs;
8380+mjs;
8381+type;
8382+export const esm = true;
8383+// @filename: node_modules/inner/index.d.cts
8384+// cjs format file
8385+import * as cjs from "inner/cjs";
8386+import * as mjs from "inner/mjs";
8387+import * as type from "inner";
8388+cjs;
8389+mjs;
8390+type;
8391+export const cjsNonmain = true;
8392+// @filename: package.json
8393+{
8394+    "name": "package",
8395+    "private": true,
8396+    "type": "module",
8397+    "exports": {
8398+        "./cjs": "./index.cjs",
8399+        "./mjs": "./index.mjs",
8400+        ".": "./index.js"
8401+    }
8402+}
8403+// @filename: node_modules/inner/package.json
8404+{
8405+    "name": "inner",
8406+    "private": true,
8407+    "exports": {
8408+        "./cjs": "./index.cjs",
8409+        "./mjs": "./index.mjs",
8410+        ".": "./index.js"
8411+    }
8412+}
8413\ No newline at end of file
8414diff --git a/tests/cases/conformance/node/nodeModulesDynamicImport.ts b/tests/cases/conformance/node/nodeModulesDynamicImport.ts
8415new file mode 100644
8416index 0000000000..46b317ca52
8417--- /dev/null
8418+++ b/tests/cases/conformance/node/nodeModulesDynamicImport.ts
8419@@ -0,0 +1,24 @@
8420+// @module: node12,nodenext
8421+// @declaration: true
8422+// @filename: subfolder/index.ts
8423+// cjs format file
8424+export async function main() {
8425+    const { readFile } = await import("fs");
8426+}
8427+// @filename: index.ts
8428+// esm format file
8429+export async function main() {
8430+    const { readFile } = await import("fs");
8431+}
8432+// @filename: package.json
8433+{
8434+    "name": "package",
8435+    "private": true,
8436+    "type": "module"
8437+}
8438+// @filename: subfolder/package.json
8439+{
8440+    "type": "commonjs"
8441+}
8442+// @filename: types.d.ts
8443+declare module "fs";
8444\ No newline at end of file
8445diff --git a/tests/cases/conformance/node/nodeModulesExportAssignments.ts b/tests/cases/conformance/node/nodeModulesExportAssignments.ts
8446new file mode 100644
8447index 0000000000..7cbcd200d9
8448--- /dev/null
8449+++ b/tests/cases/conformance/node/nodeModulesExportAssignments.ts
8450@@ -0,0 +1,20 @@
8451+// @module: node12,nodenext
8452+// @declaration: true
8453+// @filename: subfolder/index.ts
8454+// cjs format file
8455+const a = {};
8456+export = a;
8457+// @filename: index.ts
8458+// esm format file
8459+const a = {};
8460+export = a;
8461+// @filename: package.json
8462+{
8463+    "name": "package",
8464+    "private": true,
8465+    "type": "module"
8466+}
8467+// @filename: subfolder/package.json
8468+{
8469+    "type": "commonjs"
8470+}
8471\ No newline at end of file
8472diff --git a/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts
8473new file mode 100644
8474index 0000000000..ffc5adf8e0
8475--- /dev/null
8476+++ b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts
8477@@ -0,0 +1,27 @@
8478+// @module: node12,nodenext
8479+// @declaration: true
8480+// @filename: index.ts
8481+// esm format file
8482+import { Thing } from "inner/other";
8483+export const a = (await import("inner")).x();
8484+// @filename: node_modules/inner/index.d.ts
8485+// esm format file
8486+export { x } from "./other.js";
8487+// @filename: node_modules/inner/other.d.ts
8488+// esm format file
8489+export interface Thing {}
8490+export const x: () => Thing;
8491+// @filename: package.json
8492+{
8493+    "name": "package",
8494+    "private": true,
8495+    "type": "module",
8496+    "exports": "./index.js"
8497+}
8498+// @filename: node_modules/inner/package.json
8499+{
8500+    "name": "inner",
8501+    "private": true,
8502+    "type": "module",
8503+    "exports": "./index.js"
8504+}
8505\ No newline at end of file
8506diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts
8507new file mode 100644
8508index 0000000000..2562c7a4a1
8509--- /dev/null
8510+++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts
8511@@ -0,0 +1,34 @@
8512+// @module: node12,nodenext
8513+// @declaration: true
8514+// @filename: index.ts
8515+// esm format file
8516+import { Thing } from "inner/other.js"; // should fail
8517+export const a = (await import("inner")).x();
8518+// @filename: node_modules/inner/index.d.ts
8519+// esm format file
8520+export { x } from "./other.js";
8521+// @filename: node_modules/inner/other.d.ts
8522+// esm format file
8523+export interface Thing {}
8524+export const x: () => Thing;
8525+// @filename: package.json
8526+{
8527+    "name": "package",
8528+    "private": true,
8529+    "type": "module",
8530+    "exports": "./index.js"
8531+}
8532+// @filename: node_modules/inner/package.json
8533+{
8534+    "name": "inner",
8535+    "private": true,
8536+    "type": "module",
8537+    "exports": {
8538+        ".": {
8539+            "default": "./index.js"
8540+        },
8541+        "./other": {
8542+            "default": "./other.js"
8543+        }
8544+    }
8545+}
8546\ No newline at end of file
8547diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts
8548new file mode 100644
8549index 0000000000..2eb8ac58e6
8550--- /dev/null
8551+++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts
8552@@ -0,0 +1,29 @@
8553+// @module: node12,nodenext
8554+// @declaration: true
8555+// @filename: index.ts
8556+// esm format file
8557+import { Thing } from "inner/other";
8558+export const a = (await import("inner/index.js")).x();
8559+// @filename: node_modules/inner/index.d.ts
8560+// esm format file
8561+export { x } from "./other.js";
8562+// @filename: node_modules/inner/other.d.ts
8563+// esm format file
8564+export interface Thing {}
8565+export const x: () => Thing;
8566+// @filename: package.json
8567+{
8568+    "name": "package",
8569+    "private": true,
8570+    "type": "module",
8571+    "exports": "./index.js"
8572+}
8573+// @filename: node_modules/inner/package.json
8574+{
8575+    "name": "inner",
8576+    "private": true,
8577+    "type": "module",
8578+    "exports": {
8579+        "./": "./"
8580+    }
8581+}
8582\ No newline at end of file
8583diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts
8584new file mode 100644
8585index 0000000000..97812da5b5
8586--- /dev/null
8587+++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts
8588@@ -0,0 +1,29 @@
8589+// @module: node12,nodenext
8590+// @declaration: true
8591+// @filename: index.ts
8592+// esm format file
8593+import { Thing } from "inner/other";
8594+export const a = (await import("inner/index.js")).x();
8595+// @filename: node_modules/inner/index.d.ts
8596+// esm format file
8597+export { x } from "./other.js";
8598+// @filename: node_modules/inner/other.d.ts
8599+// esm format file
8600+export interface Thing {}
8601+export const x: () => Thing;
8602+// @filename: package.json
8603+{
8604+    "name": "package",
8605+    "private": true,
8606+    "type": "module",
8607+    "exports": "./index.js"
8608+}
8609+// @filename: node_modules/inner/package.json
8610+{
8611+    "name": "inner",
8612+    "private": true,
8613+    "type": "module",
8614+    "exports": {
8615+        "./*.js": "./*.js"
8616+    }
8617+}
8618\ No newline at end of file
8619diff --git a/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts
8620new file mode 100644
8621index 0000000000..d441627d7d
8622--- /dev/null
8623+++ b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts
8624@@ -0,0 +1,67 @@
8625+// @module: node12,nodenext
8626+// @declaration: true
8627+// @filename: subfolder/index.ts
8628+// cjs format file
8629+const x = <T>() => <T><any>(void 0);
8630+export {x};
8631+// @filename: subfolder/index.cts
8632+// cjs format file
8633+const x = <T>() => <T><any>(void 0);
8634+export {x};
8635+// @filename: subfolder/index.mts
8636+// esm format file
8637+const x = <T>() => <T><any>(void 0);
8638+export {x};
8639+// @filename: subfolder2/index.ts
8640+// cjs format file
8641+const x = <T>() => <T><any>(void 0);
8642+export {x};
8643+// @filename: subfolder2/index.cts
8644+// cjs format file
8645+const x = <T>() => <T><any>(void 0);
8646+export {x};
8647+// @filename: subfolder2/index.mts
8648+// esm format file
8649+const x = <T>() => <T><any>(void 0);
8650+export {x};
8651+// @filename: subfolder2/another/index.ts
8652+// esm format file
8653+const x = <T>() => <T><any>(void 0);
8654+export {x};
8655+// @filename: subfolder2/another/index.mts
8656+// esm format file
8657+const x = <T>() => <T><any>(void 0);
8658+export {x};
8659+// @filename: subfolder2/another/index.cts
8660+// cjs format file
8661+const x = <T>() => <T><any>(void 0);
8662+export {x};
8663+// @filename: index.mts
8664+// esm format file
8665+const x = <T>() => <T><any>(void 0);
8666+export {x};
8667+// @filename: index.cts
8668+// cjs format file
8669+const x = <T>() => <T><any>(void 0);
8670+export {x};
8671+// @filename: index.ts
8672+// esm format file
8673+const x = <T>() => <T><any>(void 0);
8674+export {x};
8675+// @filename: package.json
8676+{
8677+    "name": "package",
8678+    "private": true,
8679+    "type": "module"
8680+}
8681+// @filename: subfolder/package.json
8682+{
8683+    "type": "commonjs"
8684+}
8685+// @filename: subfolder2/package.json
8686+{
8687+}
8688+// @filename: subfolder2/another/package.json
8689+{
8690+    "type": "module"
8691+}
8692\ No newline at end of file
8693diff --git a/tests/cases/conformance/node/nodeModulesGeneratedNameCollisions.ts b/tests/cases/conformance/node/nodeModulesGeneratedNameCollisions.ts
8694new file mode 100644
8695index 0000000000..e9a9b9d9ed
8696--- /dev/null
8697+++ b/tests/cases/conformance/node/nodeModulesGeneratedNameCollisions.ts
8698@@ -0,0 +1,26 @@
8699+// @module: node12,nodenext
8700+// @declaration: true
8701+// @filename: subfolder/index.ts
8702+// cjs format file
8703+function require() {}
8704+const exports = {};
8705+class Object {}
8706+export const __esModule = false;
8707+export {require, exports, Object};
8708+// @filename: index.ts
8709+// esm format file
8710+function require() {}
8711+const exports = {};
8712+class Object {}
8713+export const __esModule = false;
8714+export {require, exports, Object};
8715+// @filename: package.json
8716+{
8717+    "name": "package",
8718+    "private": true,
8719+    "type": "module"
8720+}
8721+// @filename: subfolder/package.json
8722+{
8723+    "type": "commonjs"
8724+}
8725\ No newline at end of file
8726diff --git a/tests/cases/conformance/node/nodeModulesImportAssertions.ts b/tests/cases/conformance/node/nodeModulesImportAssertions.ts
8727new file mode 100644
8728index 0000000000..0fe1ccdf82
8729--- /dev/null
8730+++ b/tests/cases/conformance/node/nodeModulesImportAssertions.ts
8731@@ -0,0 +1,13 @@
8732+// @module: node12,nodenext
8733+// @resolveJsonModule: true
8734+// @filename: index.ts
8735+import json from "./package.json" assert { type: "json" };
8736+// @filename: otherc.cts
8737+import json from "./package.json" assert { type: "json" }; // should error, cjs mode imports don't support assertions
8738+const json2 = import("./package.json", { assert: { type: "json" } }); // should be fine
8739+// @filename: package.json
8740+{
8741+    "name": "pkg",
8742+    "private": true,
8743+    "type": "module"
8744+}
8745\ No newline at end of file
8746diff --git a/tests/cases/conformance/node/nodeModulesImportAssignments.ts b/tests/cases/conformance/node/nodeModulesImportAssignments.ts
8747new file mode 100644
8748index 0000000000..6c22fe83e0
8749--- /dev/null
8750+++ b/tests/cases/conformance/node/nodeModulesImportAssignments.ts
8751@@ -0,0 +1,31 @@
8752+// @module: node12,nodenext
8753+// @declaration: true
8754+// @filename: subfolder/index.ts
8755+// cjs format file
8756+import fs = require("fs");
8757+fs.readFile;
8758+export import fs2 = require("fs");
8759+// @filename: index.ts
8760+// esm format file
8761+import fs = require("fs");
8762+fs.readFile;
8763+export import fs2 = require("fs");
8764+// @filename: file.ts
8765+// esm format file
8766+const __require = null;
8767+const _createRequire = null;
8768+import fs = require("fs");
8769+fs.readFile;
8770+export import fs2 = require("fs");
8771+// @filename: package.json
8772+{
8773+    "name": "package",
8774+    "private": true,
8775+    "type": "module"
8776+}
8777+// @filename: subfolder/package.json
8778+{
8779+    "type": "commonjs"
8780+}
8781+// @filename: types.d.ts
8782+declare module "fs";
8783\ No newline at end of file
8784diff --git a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions.ts b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions.ts
8785new file mode 100644
8786index 0000000000..103b583712
8787--- /dev/null
8788+++ b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions.ts
8789@@ -0,0 +1,31 @@
8790+// @module: node12,nodenext
8791+// @declaration: true
8792+// @importHelpers: true
8793+// @filename: subfolder/index.ts
8794+// cjs format file
8795+import {default as _fs} from "fs";
8796+_fs.readFile;
8797+import * as fs from "fs";
8798+fs.readFile;
8799+// @filename: index.ts
8800+// esm format file
8801+import {default as _fs} from "fs";
8802+_fs.readFile;
8803+import * as fs from "fs";
8804+fs.readFile;
8805+// @filename: package.json
8806+{
8807+    "name": "package",
8808+    "private": true,
8809+    "type": "module"
8810+}
8811+// @filename: subfolder/package.json
8812+{
8813+    "type": "commonjs"
8814+}
8815+// @filename: types.d.ts
8816+declare module "fs";
8817+declare module "tslib" {
8818+    export {};
8819+    // intentionally missing all helpers
8820+}
8821\ No newline at end of file
8822diff --git a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts
8823new file mode 100644
8824index 0000000000..7f90947a5f
8825--- /dev/null
8826+++ b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts
8827@@ -0,0 +1,27 @@
8828+// @module: node12,nodenext
8829+// @declaration: true
8830+// @importHelpers: true
8831+// @filename: subfolder/index.ts
8832+// cjs format file
8833+export * from "fs";
8834+export * as fs from "fs";
8835+// @filename: index.ts
8836+// esm format file
8837+export * from "fs";
8838+export * as fs from "fs";
8839+// @filename: package.json
8840+{
8841+    "name": "package",
8842+    "private": true,
8843+    "type": "module"
8844+}
8845+// @filename: subfolder/package.json
8846+{
8847+    "type": "commonjs"
8848+}
8849+// @filename: types.d.ts
8850+declare module "fs";
8851+declare module "tslib" {
8852+    export {};
8853+    // intentionally missing all helpers
8854+}
8855\ No newline at end of file
8856diff --git a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts
8857new file mode 100644
8858index 0000000000..5f6984ad1f
8859--- /dev/null
8860+++ b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts
8861@@ -0,0 +1,25 @@
8862+// @module: node12,nodenext
8863+// @declaration: true
8864+// @importHelpers: true
8865+// @filename: subfolder/index.ts
8866+// cjs format file
8867+export {default} from "fs";
8868+// @filename: index.ts
8869+// esm format file
8870+export {default} from "fs";
8871+// @filename: package.json
8872+{
8873+    "name": "package",
8874+    "private": true,
8875+    "type": "module"
8876+}
8877+// @filename: subfolder/package.json
8878+{
8879+    "type": "commonjs"
8880+}
8881+// @filename: types.d.ts
8882+declare module "fs";
8883+declare module "tslib" {
8884+    export {};
8885+    // intentionally missing all helpers
8886+}
8887\ No newline at end of file
8888diff --git a/tests/cases/conformance/node/nodeModulesImportMeta.ts b/tests/cases/conformance/node/nodeModulesImportMeta.ts
8889new file mode 100644
8890index 0000000000..d684c7b5cb
8891--- /dev/null
8892+++ b/tests/cases/conformance/node/nodeModulesImportMeta.ts
8893@@ -0,0 +1,20 @@
8894+// @module: node12,nodenext
8895+// @declaration: true
8896+// @filename: subfolder/index.ts
8897+// cjs format file
8898+const x = import.meta.url;
8899+export {x};
8900+// @filename: index.ts
8901+// esm format file
8902+const x = import.meta.url;
8903+export {x};
8904+// @filename: package.json
8905+{
8906+    "name": "package",
8907+    "private": true,
8908+    "type": "module"
8909+}
8910+// @filename: subfolder/package.json
8911+{
8912+    "type": "commonjs"
8913+}
8914\ No newline at end of file
8915diff --git a/tests/cases/conformance/node/nodeModulesImportResolutionIntoExport.ts b/tests/cases/conformance/node/nodeModulesImportResolutionIntoExport.ts
8916new file mode 100644
8917index 0000000000..2a407b2bc6
8918--- /dev/null
8919+++ b/tests/cases/conformance/node/nodeModulesImportResolutionIntoExport.ts
8920@@ -0,0 +1,24 @@
8921+// @module: node12,nodenext
8922+// @declaration: true
8923+// @filename: index.ts
8924+// esm format file
8925+import * as type from "#type";
8926+type;
8927+// @filename: index.mts
8928+// esm format file
8929+import * as type from "#type";
8930+type;
8931+// @filename: index.cts
8932+// esm format file
8933+import * as type from "#type";
8934+type;
8935+// @filename: package.json
8936+{
8937+    "name": "package",
8938+    "private": true,
8939+    "type": "module",
8940+    "exports": "./index.cjs",
8941+    "imports": {
8942+        "#type": "package"
8943+    }
8944+}
8945\ No newline at end of file
8946diff --git a/tests/cases/conformance/node/nodeModulesImportResolutionNoCycle.ts b/tests/cases/conformance/node/nodeModulesImportResolutionNoCycle.ts
8947new file mode 100644
8948index 0000000000..c0482c86ec
8949--- /dev/null
8950+++ b/tests/cases/conformance/node/nodeModulesImportResolutionNoCycle.ts
8951@@ -0,0 +1,24 @@
8952+// @module: node12,nodenext
8953+// @declaration: true
8954+// @filename: index.ts
8955+// esm format file
8956+import * as type from "#type";
8957+type;
8958+// @filename: index.mts
8959+// esm format file
8960+import * as type from "#type";
8961+type;
8962+// @filename: index.cts
8963+// esm format file
8964+import * as type from "#type";
8965+type;
8966+// @filename: package.json
8967+{
8968+    "name": "package",
8969+    "private": true,
8970+    "type": "module",
8971+    "exports": "package",
8972+    "imports": {
8973+        "#type": "package"
8974+    }
8975+}
8976\ No newline at end of file
8977diff --git a/tests/cases/conformance/node/nodeModulesPackageExports.ts b/tests/cases/conformance/node/nodeModulesPackageExports.ts
8978new file mode 100644
8979index 0000000000..897d01b07d
8980--- /dev/null
8981+++ b/tests/cases/conformance/node/nodeModulesPackageExports.ts
8982@@ -0,0 +1,90 @@
8983+// @module: node12,nodenext
8984+// @declaration: true
8985+// @outDir: out
8986+// @filename: index.ts
8987+// esm format file
8988+import * as cjs from "package/cjs";
8989+import * as mjs from "package/mjs";
8990+import * as type from "package";
8991+cjs;
8992+mjs;
8993+type;
8994+import * as cjsi from "inner/cjs";
8995+import * as mjsi from "inner/mjs";
8996+import * as typei from "inner";
8997+cjsi;
8998+mjsi;
8999+typei;
9000+// @filename: index.mts
9001+// esm format file
9002+import * as cjs from "package/cjs";
9003+import * as mjs from "package/mjs";
9004+import * as type from "package";
9005+cjs;
9006+mjs;
9007+type;
9008+import * as cjsi from "inner/cjs";
9009+import * as mjsi from "inner/mjs";
9010+import * as typei from "inner";
9011+cjsi;
9012+mjsi;
9013+typei;
9014+// @filename: index.cts
9015+// cjs format file
9016+import * as cjs from "package/cjs";
9017+import * as mjs from "package/mjs";
9018+import * as type from "package";
9019+cjs;
9020+mjs;
9021+type;
9022+import * as cjsi from "inner/cjs";
9023+import * as mjsi from "inner/mjs";
9024+import * as typei from "inner";
9025+cjsi;
9026+mjsi;
9027+typei;
9028+// @filename: node_modules/inner/index.d.ts
9029+// cjs format file
9030+import * as cjs from "inner/cjs";
9031+import * as mjs from "inner/mjs";
9032+import * as type from "inner";
9033+export { cjs };
9034+export { mjs };
9035+export { type };
9036+// @filename: node_modules/inner/index.d.mts
9037+// esm format file
9038+import * as cjs from "inner/cjs";
9039+import * as mjs from "inner/mjs";
9040+import * as type from "inner";
9041+export { cjs };
9042+export { mjs };
9043+export { type };
9044+// @filename: node_modules/inner/index.d.cts
9045+// cjs format file
9046+import * as cjs from "inner/cjs";
9047+import * as mjs from "inner/mjs";
9048+import * as type from "inner";
9049+export { cjs };
9050+export { mjs };
9051+export { type };
9052+// @filename: package.json
9053+{
9054+    "name": "package",
9055+    "private": true,
9056+    "type": "module",
9057+    "exports": {
9058+        "./cjs": "./index.cjs",
9059+        "./mjs": "./index.mjs",
9060+        ".": "./index.js"
9061+    }
9062+}
9063+// @filename: node_modules/inner/package.json
9064+{
9065+    "name": "inner",
9066+    "private": true,
9067+    "exports": {
9068+        "./cjs": "./index.cjs",
9069+        "./mjs": "./index.mjs",
9070+        ".": "./index.js"
9071+    }
9072+}
9073\ No newline at end of file
9074diff --git a/tests/cases/conformance/node/nodeModulesPackageImports.ts b/tests/cases/conformance/node/nodeModulesPackageImports.ts
9075new file mode 100644
9076index 0000000000..cccf930098
9077--- /dev/null
9078+++ b/tests/cases/conformance/node/nodeModulesPackageImports.ts
9079@@ -0,0 +1,38 @@
9080+// @module: node12,nodenext
9081+// @declaration: true
9082+// @filename: index.ts
9083+// esm format file
9084+import * as cjs from "#cjs";
9085+import * as mjs from "#mjs";
9086+import * as type from "#type";
9087+cjs;
9088+mjs;
9089+type;
9090+// @filename: index.mts
9091+// esm format file
9092+import * as cjs from "#cjs";
9093+import * as mjs from "#mjs";
9094+import * as type from "#type";
9095+cjs;
9096+mjs;
9097+type;
9098+// @filename: index.cts
9099+// esm format file
9100+import * as cjs from "#cjs";
9101+import * as mjs from "#mjs";
9102+import * as type from "#type";
9103+cjs;
9104+mjs;
9105+type;
9106+// @filename: package.json
9107+{
9108+    "name": "package",
9109+    "private": true,
9110+    "type": "module",
9111+    "exports": "./index.js",
9112+    "imports": {
9113+        "#cjs": "./index.cjs",
9114+        "#mjs": "./index.mjs",
9115+        "#type": "./index.js"
9116+    }
9117+}
9118\ No newline at end of file
9119diff --git a/tests/cases/conformance/node/nodeModulesPackagePatternExports.ts b/tests/cases/conformance/node/nodeModulesPackagePatternExports.ts
9120new file mode 100644
9121index 0000000000..e22e497a94
9122--- /dev/null
9123+++ b/tests/cases/conformance/node/nodeModulesPackagePatternExports.ts
9124@@ -0,0 +1,67 @@
9125+// @module: node12,nodenext
9126+// @declaration: true
9127+// @outDir: out
9128+// @filename: index.ts
9129+// esm format file
9130+import * as cjsi from "inner/cjs/index";
9131+import * as mjsi from "inner/mjs/index";
9132+import * as typei from "inner/js/index";
9133+cjsi;
9134+mjsi;
9135+typei;
9136+// @filename: index.mts
9137+// esm format file
9138+import * as cjsi from "inner/cjs/index";
9139+import * as mjsi from "inner/mjs/index";
9140+import * as typei from "inner/js/index";
9141+cjsi;
9142+mjsi;
9143+typei;
9144+// @filename: index.cts
9145+// cjs format file
9146+import * as cjsi from "inner/cjs/index";
9147+import * as mjsi from "inner/mjs/index";
9148+import * as typei from "inner/js/index";
9149+cjsi;
9150+mjsi;
9151+typei;
9152+// @filename: node_modules/inner/index.d.ts
9153+// cjs format file
9154+import * as cjs from "inner/cjs/index";
9155+import * as mjs from "inner/mjs/index";
9156+import * as type from "inner/js/index";
9157+export { cjs };
9158+export { mjs };
9159+export { type };
9160+// @filename: node_modules/inner/index.d.mts
9161+// esm format file
9162+import * as cjs from "inner/cjs/index";
9163+import * as mjs from "inner/mjs/index";
9164+import * as type from "inner/js/index";
9165+export { cjs };
9166+export { mjs };
9167+export { type };
9168+// @filename: node_modules/inner/index.d.cts
9169+// cjs format file
9170+import * as cjs from "inner/cjs/index";
9171+import * as mjs from "inner/mjs/index";
9172+import * as type from "inner/js/index";
9173+export { cjs };
9174+export { mjs };
9175+export { type };
9176+// @filename: package.json
9177+{
9178+    "name": "package",
9179+    "private": true,
9180+    "type": "module",
9181+}
9182+// @filename: node_modules/inner/package.json
9183+{
9184+    "name": "inner",
9185+    "private": true,
9186+    "exports": {
9187+        "./cjs/*": "./*.cjs",
9188+        "./mjs/*": "./*.mjs",
9189+        "./js/*": "./*.js"
9190+    }
9191+}
9192\ No newline at end of file
9193diff --git a/tests/cases/conformance/node/nodeModulesPackagePatternExportsTrailers.ts b/tests/cases/conformance/node/nodeModulesPackagePatternExportsTrailers.ts
9194new file mode 100644
9195index 0000000000..3abe36e0d6
9196--- /dev/null
9197+++ b/tests/cases/conformance/node/nodeModulesPackagePatternExportsTrailers.ts
9198@@ -0,0 +1,67 @@
9199+// @module: node12,nodenext
9200+// @declaration: true
9201+// @outDir: out
9202+// @filename: index.ts
9203+// esm format file
9204+import * as cjsi from "inner/cjs/index.cjs";
9205+import * as mjsi from "inner/mjs/index.mjs";
9206+import * as typei from "inner/js/index.js";
9207+cjsi;
9208+mjsi;
9209+typei;
9210+// @filename: index.mts
9211+// esm format file
9212+import * as cjsi from "inner/cjs/index.cjs";
9213+import * as mjsi from "inner/mjs/index.mjs";
9214+import * as typei from "inner/js/index.js";
9215+cjsi;
9216+mjsi;
9217+typei;
9218+// @filename: index.cts
9219+// cjs format file
9220+import * as cjsi from "inner/cjs/index.cjs";
9221+import * as mjsi from "inner/mjs/index.mjs";
9222+import * as typei from "inner/js/index.js";
9223+cjsi;
9224+mjsi;
9225+typei;
9226+// @filename: node_modules/inner/index.d.ts
9227+// cjs format file
9228+import * as cjs from "inner/cjs/index.cjs";
9229+import * as mjs from "inner/mjs/index.mjs";
9230+import * as type from "inner/js/index.js";
9231+export { cjs };
9232+export { mjs };
9233+export { type };
9234+// @filename: node_modules/inner/index.d.mts
9235+// esm format file
9236+import * as cjs from "inner/cjs/index.cjs";
9237+import * as mjs from "inner/mjs/index.mjs";
9238+import * as type from "inner/js/index.js";
9239+export { cjs };
9240+export { mjs };
9241+export { type };
9242+// @filename: node_modules/inner/index.d.cts
9243+// cjs format file
9244+import * as cjs from "inner/cjs/index.cjs";
9245+import * as mjs from "inner/mjs/index.mjs";
9246+import * as type from "inner/js/index.js";
9247+export { cjs };
9248+export { mjs };
9249+export { type };
9250+// @filename: package.json
9251+{
9252+    "name": "package",
9253+    "private": true,
9254+    "type": "module",
9255+}
9256+// @filename: node_modules/inner/package.json
9257+{
9258+    "name": "inner",
9259+    "private": true,
9260+    "exports": {
9261+        "./cjs/*.cjs": "./*.cjs",
9262+        "./mjs/*.mjs": "./*.mjs",
9263+        "./js/*.js": "./*.js"
9264+    }
9265+}
9266\ No newline at end of file
9267diff --git a/tests/cases/conformance/node/nodeModulesResolveJsonModule.ts b/tests/cases/conformance/node/nodeModulesResolveJsonModule.ts
9268new file mode 100644
9269index 0000000000..c298685c22
9270--- /dev/null
9271+++ b/tests/cases/conformance/node/nodeModulesResolveJsonModule.ts
9272@@ -0,0 +1,29 @@
9273+// @module: node12,nodenext
9274+// @resolveJsonModule: true
9275+// @outDir: ./out
9276+// @declaration: true
9277+// @filename: index.ts
9278+import pkg from "./package.json"
9279+export const name = pkg.name;
9280+import * as ns from "./package.json";
9281+export const thing = ns;
9282+export const name2 = ns.default.name;
9283+// @filename: index.cts
9284+import pkg from "./package.json"
9285+export const name = pkg.name;
9286+import * as ns from "./package.json";
9287+export const thing = ns;
9288+export const name2 = ns.default.name;
9289+// @filename: index.mts
9290+import pkg from "./package.json"
9291+export const name = pkg.name;
9292+import * as ns from "./package.json";
9293+export const thing = ns;
9294+export const name2 = ns.default.name;
9295+// @filename: package.json
9296+{
9297+    "name": "pkg",
9298+    "version": "0.0.1",
9299+    "type": "module",
9300+    "default": "misedirection"
9301+}
9302\ No newline at end of file
9303diff --git a/tests/cases/conformance/node/nodeModulesSynchronousCallErrors.ts b/tests/cases/conformance/node/nodeModulesSynchronousCallErrors.ts
9304new file mode 100644
9305index 0000000000..78aa93ee17
9306--- /dev/null
9307+++ b/tests/cases/conformance/node/nodeModulesSynchronousCallErrors.ts
9308@@ -0,0 +1,34 @@
9309+// @module: node12,nodenext
9310+// @declaration: true
9311+// @filename: subfolder/index.ts
9312+// cjs format file
9313+import {h} from "../index.js";
9314+import mod = require("../index.js");
9315+import {f as _f} from "./index.js";
9316+import mod2 = require("./index.js");
9317+export async function f() {
9318+    const mod3 = await import ("../index.js");
9319+    const mod4 = await import ("./index.js");
9320+    h();
9321+}
9322+// @filename: index.ts
9323+// esm format file
9324+import {h as _h} from "./index.js";
9325+import mod = require("./index.js");
9326+import {f} from "./subfolder/index.js";
9327+import mod2 = require("./subfolder/index.js");
9328+export async function h() {
9329+    const mod3 = await import ("./index.js");
9330+    const mod4 = await import ("./subfolder/index.js");
9331+    f();
9332+}
9333+// @filename: package.json
9334+{
9335+    "name": "package",
9336+    "private": true,
9337+    "type": "module"
9338+}
9339+// @filename: subfolder/package.json
9340+{
9341+    "type": "commonjs"
9342+}
9343\ No newline at end of file
9344diff --git a/tests/cases/conformance/node/nodeModulesTopLevelAwait.ts b/tests/cases/conformance/node/nodeModulesTopLevelAwait.ts
9345new file mode 100644
9346index 0000000000..2fbd5d3b0c
9347--- /dev/null
9348+++ b/tests/cases/conformance/node/nodeModulesTopLevelAwait.ts
9349@@ -0,0 +1,22 @@
9350+// @module: node12,nodenext
9351+// @declaration: true
9352+// @filename: subfolder/index.ts
9353+// cjs format file
9354+const x = await 1;
9355+export {x};
9356+for await (const y of []) {}
9357+// @filename: index.ts
9358+// esm format file
9359+const x = await 1;
9360+export {x};
9361+for await (const y of []) {}
9362+// @filename: package.json
9363+{
9364+    "name": "package",
9365+    "private": true,
9366+    "type": "module"
9367+}
9368+// @filename: subfolder/package.json
9369+{
9370+    "type": "commonjs"
9371+}
9372\ No newline at end of file
9373diff --git a/tests/cases/conformance/node/nodeModulesTypesVersionPackageExports.ts b/tests/cases/conformance/node/nodeModulesTypesVersionPackageExports.ts
9374new file mode 100644
9375index 0000000000..52cda091b3
9376--- /dev/null
9377+++ b/tests/cases/conformance/node/nodeModulesTypesVersionPackageExports.ts
9378@@ -0,0 +1,53 @@
9379+// @module: node12,nodenext
9380+// @declaration: true
9381+// @outDir: out
9382+// @filename: index.ts
9383+// esm format file
9384+import * as mod from "inner";
9385+mod.correctVersionApplied;
9386+
9387+// @filename: index.mts
9388+// esm format file
9389+import * as mod from "inner";
9390+mod.correctVersionApplied;
9391+
9392+// @filename: index.cts
9393+// cjs format file
9394+import * as mod from "inner";
9395+mod.correctVersionApplied;
9396+
9397+// @filename: node_modules/inner/index.d.ts
9398+// cjs format file
9399+export const noConditionsApplied = true;
9400+// @filename: node_modules/inner/index.d.mts
9401+// esm format file
9402+export const importConditionApplied = true;
9403+// @filename: node_modules/inner/index.d.cts
9404+// cjs format file
9405+export const wrongConditionApplied = true;
9406+// @filename: node_modules/inner/old-types.d.ts
9407+export const noVersionApplied = true;
9408+// @filename: node_modules/inner/new-types.d.ts
9409+export const correctVersionApplied = true;
9410+// @filename: node_modules/inner/future-types.d.ts
9411+export const futureVersionApplied = true;
9412+// @filename: package.json
9413+{
9414+    "name": "package",
9415+    "private": true,
9416+    "type": "module",
9417+}
9418+// @filename: node_modules/inner/package.json
9419+{
9420+    "name": "inner",
9421+    "private": true,
9422+    "exports": {
9423+        ".": {
9424+            "types@>=10000": "./future-types.d.ts",
9425+            "types@>=1": "./new-types.d.ts",
9426+            "types": "./old-types.d.ts",
9427+            "import": "./index.mjs",
9428+            "node": "./index.js"
9429+        },
9430+    }
9431+}
9432\ No newline at end of file
9433diff --git a/tests/cases/conformance/node/nodePackageSelfName.ts b/tests/cases/conformance/node/nodePackageSelfName.ts
9434new file mode 100644
9435index 0000000000..099d9c424e
9436--- /dev/null
9437+++ b/tests/cases/conformance/node/nodePackageSelfName.ts
9438@@ -0,0 +1,21 @@
9439+// @module: node12,nodenext
9440+// @declaration: true
9441+// @filename: index.ts
9442+// esm format file
9443+import * as self from "package";
9444+self;
9445+// @filename: index.mts
9446+// esm format file
9447+import * as self from "package";
9448+self;
9449+// @filename: index.cts
9450+// esm format file
9451+import * as self from "package";
9452+self;
9453+// @filename: package.json
9454+{
9455+    "name": "package",
9456+    "private": true,
9457+    "type": "module",
9458+    "exports": "./index.js"
9459+}
9460\ No newline at end of file
9461diff --git a/tests/cases/conformance/node/nodePackageSelfNameScoped.ts b/tests/cases/conformance/node/nodePackageSelfNameScoped.ts
9462new file mode 100644
9463index 0000000000..f4ef1e3798
9464--- /dev/null
9465+++ b/tests/cases/conformance/node/nodePackageSelfNameScoped.ts
9466@@ -0,0 +1,21 @@
9467+// @module: node12,nodenext
9468+// @declaration: true
9469+// @filename: index.ts
9470+// esm format file
9471+import * as self from "@scope/package";
9472+self;
9473+// @filename: index.mts
9474+// esm format file
9475+import * as self from "@scope/package";
9476+self;
9477+// @filename: index.cts
9478+// cjs format file
9479+import * as self from "@scope/package";
9480+self;
9481+// @filename: package.json
9482+{
9483+    "name": "@scope/package",
9484+    "private": true,
9485+    "type": "module",
9486+    "exports": "./index.js"
9487+}
9488\ No newline at end of file
9489diff --git a/tests/cases/conformance/override/override10.ts b/tests/cases/conformance/override/override10.ts
9490index 3a8eca1632..31b904811c 100644
9491--- a/tests/cases/conformance/override/override10.ts
9492+++ b/tests/cases/conformance/override/override10.ts
9493@@ -9,4 +9,5 @@ abstract class Base {
9494 abstract class Sub extends Base {
9495     abstract override foo(): number;
9496     bar() { }
9497-}
9498\ No newline at end of file
9499+}
9500+let aa =new Sub();
9501\ No newline at end of file
9502diff --git a/tests/cases/conformance/override/override12.ts b/tests/cases/conformance/override/override12.ts
9503index 304caf1627..084c248b37 100644
9504--- a/tests/cases/conformance/override/override12.ts
9505+++ b/tests/cases/conformance/override/override12.ts
9506@@ -24,3 +24,4 @@ class B extends A {
9507 
9508     override m3(): void {}
9509 }
9510+let qq13 = new B();
9511\ No newline at end of file
9512diff --git a/tests/cases/conformance/override/override15.ts b/tests/cases/conformance/override/override15.ts
9513new file mode 100644
9514index 0000000000..882cc7eb97
9515--- /dev/null
9516+++ b/tests/cases/conformance/override/override15.ts
9517@@ -0,0 +1,9 @@
9518+// @noImplicitOverride: true
9519+
9520+class A {
9521+    doSomething() {}
9522+}
9523+
9524+class B extends A {
9525+    override doSomethang() {}
9526+}
9527diff --git a/tests/cases/conformance/override/override16.ts b/tests/cases/conformance/override/override16.ts
9528index 4468edfdc4..b869c89311 100644
9529--- a/tests/cases/conformance/override/override16.ts
9530+++ b/tests/cases/conformance/override/override16.ts
9531@@ -8,3 +8,4 @@ class A {
9532 class B extends A {
9533     override foo = "string";
9534 }
9535+let qq12 = new B();
9536\ No newline at end of file
9537diff --git a/tests/cases/conformance/override/override17.ts b/tests/cases/conformance/override/override17.ts
9538index edabe9816d..a5f92ef955 100644
9539--- a/tests/cases/conformance/override/override17.ts
9540+++ b/tests/cases/conformance/override/override17.ts
9541@@ -25,3 +25,4 @@ class B extends A {
9542 
9543     override m3(): void {}
9544 }
9545+let qq11 = new B();
9546\ No newline at end of file
9547diff --git a/tests/cases/conformance/override/override18.ts b/tests/cases/conformance/override/override18.ts
9548index 2527449e74..6d4d132193 100644
9549--- a/tests/cases/conformance/override/override18.ts
9550+++ b/tests/cases/conformance/override/override18.ts
9551@@ -9,3 +9,4 @@ class A {
9552 class B extends A {
9553     override foo = "string";
9554 }
9555+let qq7 = new B();
9556\ No newline at end of file
9557diff --git a/tests/cases/conformance/override/override19.ts b/tests/cases/conformance/override/override19.ts
9558new file mode 100644
9559index 0000000000..63e5cd9994
9560--- /dev/null
9561+++ b/tests/cases/conformance/override/override19.ts
9562@@ -0,0 +1,20 @@
9563+// @target: esnext
9564+// @noImplicitOverride: true
9565+
9566+type Foo = abstract new(...args: any) => any;
9567+declare function CreateMixin<C extends Foo, T extends Foo>(Context: C, Base: T): T & {
9568+   new (...args: any[]): { context: InstanceType<C> }
9569+}
9570+class Context {}
9571+
9572+class A {
9573+    doSomething() {}
9574+}
9575+
9576+class B extends CreateMixin(Context, A) {
9577+   override foo() {} // Remove override
9578+}
9579+
9580+class C extends CreateMixin(Context, A) {
9581+    override doSomethang() {} // Suggestion 'doSomething'
9582+}
9583diff --git a/tests/cases/conformance/override/override20.ts b/tests/cases/conformance/override/override20.ts
9584new file mode 100644
9585index 0000000000..9835cd9135
9586--- /dev/null
9587+++ b/tests/cases/conformance/override/override20.ts
9588@@ -0,0 +1,34 @@
9589+// @target: esnext
9590+// @noImplicitOverride: true
9591+
9592+const Foo: C1 & C2 =
9593+    class {
9594+        m1() { }
9595+        m2() { }
9596+    }
9597+
9598+interface I1 {
9599+    m1(): void;
9600+}
9601+
9602+interface I2 {
9603+    m1(): void;
9604+    m2(): void;
9605+}
9606+
9607+interface C1 {
9608+    new(...args: any[]): I1;
9609+}
9610+
9611+interface C2 {
9612+    new(...args: any[]): I2;
9613+}
9614+
9615+export class Bar extends Foo {
9616+    m1() {
9617+        super.m1();
9618+    }
9619+    m2() {
9620+        super.m2();
9621+    }
9622+}
9623diff --git a/tests/cases/conformance/override/override_js1.ts b/tests/cases/conformance/override/override_js1.ts
9624index 75df72695e..d327d1dbcf 100644
9625--- a/tests/cases/conformance/override/override_js1.ts
9626+++ b/tests/cases/conformance/override/override_js1.ts
9627@@ -22,4 +22,6 @@ class C {
9628     fooo (v) {}
9629     /** @override */
9630     bar(v) {}
9631-}
9632\ No newline at end of file
9633+}
9634+let qq8 = new D();
9635+let qq9 = new C();
9636\ No newline at end of file
9637diff --git a/tests/cases/conformance/override/override_js4.ts b/tests/cases/conformance/override/override_js4.ts
9638new file mode 100644
9639index 0000000000..f5a7f1b6c4
9640--- /dev/null
9641+++ b/tests/cases/conformance/override/override_js4.ts
9642@@ -0,0 +1,14 @@
9643+// @noImplicitOverride: true
9644+// @allowJs: true
9645+// @checkJs: true
9646+// @noEmit: true
9647+
9648+// @Filename: a.js
9649+class A {
9650+    doSomething() {}
9651+}
9652+
9653+class B extends A {
9654+    /** @override  */
9655+    doSomethang() {}
9656+}
9657diff --git a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration16.ts b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration16.ts
9658index b345892ec2..39a09037ca 100644
9659--- a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration16.ts
9660+++ b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration16.ts
9661@@ -1,4 +1,5 @@
9662 class C {
9663    foo();
9664    foo() { }
9665-}
9666\ No newline at end of file
9667+}
9668+let q19 = new C();
9669\ No newline at end of file
9670diff --git a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration17.ts b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration17.ts
9671index a709f7d7bc..08f7560759 100644
9672--- a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration17.ts
9673+++ b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration17.ts
9674@@ -5,3 +5,4 @@ declare class Enumerator {
9675     public item(): any;
9676     constructor (o: any);
9677 }
9678+let q22 = new Enumerator();
9679\ No newline at end of file
9680diff --git a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration19.ts b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration19.ts
9681index 65d9bd0a57..5ed5520812 100644
9682--- a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration19.ts
9683+++ b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration19.ts
9684@@ -1,4 +1,5 @@
9685 class C {
9686     foo();
9687     "foo"() { }
9688-}
9689\ No newline at end of file
9690+}
9691+let q18 = new C();
9692\ No newline at end of file
9693diff --git a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration20.ts b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration20.ts
9694index 6c8540e833..a2025ab46f 100644
9695--- a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration20.ts
9696+++ b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration20.ts
9697@@ -1,4 +1,5 @@
9698 class C {
9699     0();
9700     "0"() { }
9701-}
9702\ No newline at end of file
9703+}
9704+let q23 = new C();
9705\ No newline at end of file
9706diff --git a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.ts b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.ts
9707index 5720f935a6..7ff1604575 100644
9708--- a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.ts
9709+++ b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.ts
9710@@ -1,2 +1,3 @@
9711 class C\u0032 {
9712-}
9713\ No newline at end of file
9714+}
9715+let q17 = new C\u0032();
9716\ No newline at end of file
9717diff --git a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration26.ts b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration26.ts
9718index 4d5395733a..fbefb55710 100644
9719--- a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration26.ts
9720+++ b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration26.ts
9721@@ -1,4 +1,5 @@
9722 class C {
9723    var
9724    public
9725-}
9726\ No newline at end of file
9727+}
9728+let q20 = new C();
9729\ No newline at end of file
9730diff --git a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.ts b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.ts
9731index b99c0c6f48..bae31847e0 100644
9732--- a/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.ts
9733+++ b/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.ts
9734@@ -1,3 +1,4 @@
9735 class C {
9736     [index:number]:number
9737-}
9738\ No newline at end of file
9739+}
9740+let q21 = new C();
9741\ No newline at end of file
9742diff --git a/tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.ts b/tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.ts
9743index b845118647..024f143cad 100644
9744--- a/tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.ts
9745+++ b/tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.ts
9746@@ -1,3 +1,4 @@
9747 class C {
9748  public constructor() { }
9749-}
9750\ No newline at end of file
9751+}
9752+let q24 = new C();
9753\ No newline at end of file
9754diff --git a/tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration5.ts b/tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration5.ts
9755index f445d70c88..7305a4098d 100644
9756--- a/tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration5.ts
9757+++ b/tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration5.ts
9758@@ -1,3 +1,4 @@
9759 class C {
9760   private constructor() { }
9761-}
9762\ No newline at end of file
9763+}
9764+let q25 = new C();
9765\ No newline at end of file
9766diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.ts
9767index 5ebd8f13ae..bd99e7cfb1 100644
9768--- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.ts
9769+++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.ts
9770@@ -2,3 +2,4 @@ class Outer
9771 {
9772 static public() {}
9773 }
9774+let q12 = new Outer();
9775\ No newline at end of file
9776diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.ts
9777index 23fb870f86..474e281b08 100644
9778--- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.ts
9779+++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.ts
9780@@ -2,3 +2,4 @@ class Outer
9781 {
9782 static public<T>() {}
9783 }
9784+let q14 = new Outer();
9785\ No newline at end of file
9786diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic2.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic2.ts
9787index 30045cf9f0..dfc01652e7 100644
9788--- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic2.ts
9789+++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic2.ts
9790@@ -2,3 +2,4 @@ class Outer
9791 {
9792 static public;
9793 }
9794+let q11 = new Outer();
9795\ No newline at end of file
9796diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic3.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic3.ts
9797index c2f462b71a..f38fc7ee97 100644
9798--- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic3.ts
9799+++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic3.ts
9800@@ -2,3 +2,4 @@ class Outer
9801 {
9802 static public = 1;
9803 }
9804+let q9 = new Outer();
9805\ No newline at end of file
9806diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.ts
9807index fe0ed44cf0..41f075c30c 100644
9808--- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.ts
9809+++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.ts
9810@@ -2,3 +2,4 @@ class Outer
9811 {
9812 static public: number;
9813 }
9814+let q13 = new Outer();
9815\ No newline at end of file
9816diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic5.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic5.ts
9817index 49db39132c..ea9593bb53 100644
9818--- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic5.ts
9819+++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic5.ts
9820@@ -2,3 +2,4 @@ class Outer
9821 {
9822 static public
9823 }
9824+let q0 = new Outer();
9825\ No newline at end of file
9826diff --git a/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass1.ts b/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass1.ts
9827index 237910839d..a814947c9e 100644
9828--- a/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass1.ts
9829+++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass1.ts
9830@@ -1,2 +1,3 @@
9831 class C<T> {
9832-}
9833\ No newline at end of file
9834+}
9835+let q38 = new C();
9836\ No newline at end of file
9837diff --git a/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass2.ts b/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass2.ts
9838index 949f220fbd..f4f517c52c 100644
9839--- a/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass2.ts
9840+++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass2.ts
9841@@ -1,2 +1,3 @@
9842 class C<K,V> {
9843-}
9844\ No newline at end of file
9845+}
9846+let q40 = new C();
9847\ No newline at end of file
9848diff --git a/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint1.ts b/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint1.ts
9849index 585fa7dbe1..78a9ffb4db 100644
9850--- a/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint1.ts
9851+++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint1.ts
9852@@ -1,2 +1,3 @@
9853 class C<T extends number> {
9854-}
9855\ No newline at end of file
9856+}
9857+let q39 = new C();
9858\ No newline at end of file
9859diff --git a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.ts b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.ts
9860index 56ba0579b0..7de740ebab 100644
9861--- a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.ts
9862+++ b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.ts
9863@@ -1,3 +1,4 @@
9864 class C {
9865    [a: string]: number
9866-}
9867\ No newline at end of file
9868+}
9869+let q27 = new C();
9870\ No newline at end of file
9871diff --git a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.ts b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.ts
9872index 34108a6e71..f0224e9379 100644
9873--- a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.ts
9874+++ b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.ts
9875@@ -1,4 +1,5 @@
9876 class C {
9877    [a: string]: number
9878    public v: number
9879-}
9880\ No newline at end of file
9881+}
9882+let q29 = new C();
9883\ No newline at end of file
9884diff --git a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.ts b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.ts
9885index f2180413ca..25ea575259 100644
9886--- a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.ts
9887+++ b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.ts
9888@@ -1,4 +1,5 @@
9889 class C {
9890    [a: string]: number;
9891    public v: number
9892-}
9893\ No newline at end of file
9894+}
9895+let q30 = new C();
9896\ No newline at end of file
9897diff --git a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.ts b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.ts
9898index 498ad89d82..42622da3af 100644
9899--- a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.ts
9900+++ b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.ts
9901@@ -1,3 +1,4 @@
9902 class C {
9903    [a: string]: number; public v: number
9904-}
9905\ No newline at end of file
9906+}
9907+let q28 = new C();
9908\ No newline at end of file
9909diff --git a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.ts b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.ts
9910index af180f585f..b89c199246 100644
9911--- a/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.ts
9912+++ b/tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.ts
9913@@ -1,3 +1,4 @@
9914 class C {
9915    static [x: string]: string;
9916-}
9917\ No newline at end of file
9918+}
9919+let q26 = new C();
9920\ No newline at end of file
9921diff --git a/tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration5.ts b/tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration5.ts
9922index 98c4f9a75b..62e5062755 100644
9923--- a/tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration5.ts
9924+++ b/tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration5.ts
9925@@ -1,3 +1,4 @@
9926 class C {
9927   declare Foo;
9928-}
9929\ No newline at end of file
9930+}
9931+let q8 = new C();
9932\ No newline at end of file
9933diff --git a/tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts b/tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts
9934index 2b07e1ca9a..765e7b650a 100644
9935--- a/tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts
9936+++ b/tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts
9937@@ -1,3 +1,4 @@
9938 class C {
9939   protected constructor() { }
9940-}
9941\ No newline at end of file
9942+}
9943+let q37 = new C();
9944\ No newline at end of file
9945diff --git a/tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts b/tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts
9946index f0bf235a03..c1d4944d1e 100644
9947--- a/tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts
9948+++ b/tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts
9949@@ -1,3 +1,4 @@
9950 class C {
9951   protected static m() { }
9952-}
9953\ No newline at end of file
9954+}
9955+let q34 = new C();
9956\ No newline at end of file
9957diff --git a/tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts b/tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts
9958index 4e24e28ec1..5ce2aa474a 100644
9959--- a/tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts
9960+++ b/tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts
9961@@ -1,3 +1,4 @@
9962 class C {
9963    constructor(protected p) { }
9964-}
9965\ No newline at end of file
9966+}
9967+let q35 = new C(null);
9968\ No newline at end of file
9969diff --git a/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts b/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts
9970index bfb48ee0e3..29d488ffbc 100644
9971--- a/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts
9972+++ b/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts
9973@@ -1,3 +1,4 @@
9974 export class Logger { 
9975      public
9976 }
9977+let q32 = new Logger();
9978\ No newline at end of file
9979diff --git a/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts b/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts
9980index bfb48ee0e3..18eeed1a6d 100644
9981--- a/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts
9982+++ b/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts
9983@@ -1,3 +1,4 @@
9984 export class Logger { 
9985      public
9986 }
9987+let q31 = new Logger();
9988\ No newline at end of file
9989diff --git a/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts b/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts
9990index ca1a460120..a4609ba88c 100644
9991--- a/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts
9992+++ b/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts
9993@@ -3,3 +3,4 @@
9994 export class Logger { 
9995      public
9996 }
9997+let q23 = new Logger();
9998\ No newline at end of file
9999diff --git a/tests/cases/conformance/parser/ecmascript5/parserUnicode3.ts b/tests/cases/conformance/parser/ecmascript5/parserUnicode3.ts
10000index bb5f00ea71..99802e72b5 100644
10001--- a/tests/cases/conformance/parser/ecmascript5/parserUnicode3.ts
10002+++ b/tests/cases/conformance/parser/ecmascript5/parserUnicode3.ts
10003@@ -1,2 +1,3 @@
10004 class 剩下 {
10005-}
10006\ No newline at end of file
10007+}
10008+let q5 = new 剩下();
10009diff --git a/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement22.ts b/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement22.ts
10010new file mode 100644
10011index 0000000000..87f569dbfb
10012--- /dev/null
10013+++ b/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement22.ts
10014@@ -0,0 +1,4 @@
10015+// @target: esnext
10016+
10017+var async;
10018+for (async of [1, 2]) {}
10019diff --git a/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement23.ts b/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement23.ts
10020new file mode 100644
10021index 0000000000..5a3601380b
10022--- /dev/null
10023+++ b/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement23.ts
10024@@ -0,0 +1,6 @@
10025+// @target: esnext
10026+
10027+async function foo(x: any) {
10028+    var async;
10029+    for await (async of x) {}
10030+}
10031diff --git a/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement24.ts b/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement24.ts
10032new file mode 100644
10033index 0000000000..3846bd0a91
10034--- /dev/null
10035+++ b/tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement24.ts
10036@@ -0,0 +1,4 @@
10037+// @target: esnext
10038+
10039+var async;
10040+for ((async) of [1, 2]);
10041diff --git a/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts
10042index 800bd368db..f713920ad5 100644
10043--- a/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts
10044+++ b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts
10045@@ -14,3 +14,4 @@ class Derived extends Base {
10046         this.p = 1
10047     }
10048 }
10049+let w1 = new Derived();
10050\ No newline at end of file
10051diff --git a/tests/cases/conformance/salsa/plainJSBinderErrors.ts b/tests/cases/conformance/salsa/plainJSBinderErrors.ts
10052new file mode 100644
10053index 0000000000..d2019e3f78
10054--- /dev/null
10055+++ b/tests/cases/conformance/salsa/plainJSBinderErrors.ts
10056@@ -0,0 +1,44 @@
10057+// @outdir: out/
10058+// @target: esnext
10059+// @allowJS: true
10060+// @filename: plainJSBinderErrors.js
10061+export default 12
10062+export default 13
10063+const await = 1
10064+const yield = 2
10065+async function f() {
10066+    const await = 3
10067+}
10068+function* g() {
10069+    const yield = 4
10070+}
10071+class C {
10072+    #constructor = 5
10073+    deleted() {
10074+        function container(f) {
10075+            delete f
10076+        }
10077+        var g = 6
10078+        delete g
10079+        delete container
10080+    }
10081+    evalArguments() {
10082+        const eval = 7
10083+        const arguments = 8
10084+    }
10085+    withOctal() {
10086+        const redundant = 010
10087+        with (redundant) {
10088+            return toFixed()
10089+        }
10090+    }
10091+    label() {
10092+        for(;;) {
10093+            label: var x = 1
10094+            break label
10095+        }
10096+        return x
10097+    }
10098+}
10099+const eval = 9
10100+const arguments = 10
10101diff --git a/tests/cases/conformance/salsa/plainJSRedeclare.ts b/tests/cases/conformance/salsa/plainJSRedeclare.ts
10102new file mode 100644
10103index 0000000000..be6831d0cd
10104--- /dev/null
10105+++ b/tests/cases/conformance/salsa/plainJSRedeclare.ts
10106@@ -0,0 +1,6 @@
10107+// @outdir: out/
10108+// @allowJS: true
10109+// @filename: plainJSRedeclare.js
10110+const orbitol = 1
10111+var orbitol = 1 + false
10112+orbitol.toExponential()
10113diff --git a/tests/cases/conformance/salsa/plainJSRedeclare2.ts b/tests/cases/conformance/salsa/plainJSRedeclare2.ts
10114new file mode 100644
10115index 0000000000..7409b6c8fe
10116--- /dev/null
10117+++ b/tests/cases/conformance/salsa/plainJSRedeclare2.ts
10118@@ -0,0 +1,7 @@
10119+// @outdir: out/
10120+// @allowJS: true
10121+// @checkJS: true
10122+// @filename: plainJSRedeclare.js
10123+const orbitol = 1
10124+var orbitol = 1 + false
10125+orbitol.toExponential()
10126diff --git a/tests/cases/conformance/salsa/plainJSRedeclare3.ts b/tests/cases/conformance/salsa/plainJSRedeclare3.ts
10127new file mode 100644
10128index 0000000000..1327fcfc17
10129--- /dev/null
10130+++ b/tests/cases/conformance/salsa/plainJSRedeclare3.ts
10131@@ -0,0 +1,7 @@
10132+// @outdir: out/
10133+// @allowJS: true
10134+// @checkJS: false
10135+// @filename: plainJSRedeclare.js
10136+const orbitol = 1
10137+var orbitol = 1 + false
10138+orbitol.toExponential()
10139diff --git a/tests/cases/conformance/salsa/plainJSReservedStrict.ts b/tests/cases/conformance/salsa/plainJSReservedStrict.ts
10140new file mode 100644
10141index 0000000000..fbd654927d
10142--- /dev/null
10143+++ b/tests/cases/conformance/salsa/plainJSReservedStrict.ts
10144@@ -0,0 +1,7 @@
10145+// @outdir: out/
10146+// @target: esnext
10147+// @allowJS: true
10148+// @filename: plainJSReservedStrict.js
10149+"use strict"
10150+const eval = 1
10151+const arguments = 2
10152diff --git a/tests/cases/conformance/salsa/spellingUncheckedJS.ts b/tests/cases/conformance/salsa/spellingUncheckedJS.ts
10153new file mode 100644
10154index 0000000000..d5a1e8ac56
10155--- /dev/null
10156+++ b/tests/cases/conformance/salsa/spellingUncheckedJS.ts
10157@@ -0,0 +1,51 @@
10158+// @noEmit: true
10159+// @allowJs: true
10160+// @filename: spellingUncheckedJS.js
10161+export var inModule = 1
10162+inmodule.toFixed()
10163+
10164+function f() {
10165+    var locals = 2 + true
10166+    locale.toFixed()
10167+    // @ts-expect-error
10168+    localf.toExponential()
10169+    // @ts-expect-error
10170+    "this is fine"
10171+}
10172+class Classe {
10173+    non = 'oui'
10174+    methode() {
10175+        // no error on 'this' references
10176+        return this.none
10177+    }
10178+}
10179+class Derivee extends Classe {
10180+    methode() {
10181+        // no error on 'super' references
10182+        return super.none
10183+    }
10184+}
10185+
10186+
10187+var object = {
10188+    spaaace: 3
10189+}
10190+object.spaaaace // error on read
10191+object.spaace = 12 // error on write
10192+object.fresh = 12 // OK
10193+other.puuuce // OK, from another file
10194+new Date().getGMTDate() // OK, from another file
10195+
10196+// No suggestions for globals from other files
10197+const atoc = setIntegral(() => console.log('ok'), 500)
10198+AudioBuffin // etc
10199+Jimmy
10200+Jon
10201+
10202+// @filename: other.js
10203+var Jimmy = 1
10204+var John = 2
10205+Jon // error, it's from the same file
10206+var other = {
10207+    puuce: 4
10208+}
10209diff --git a/tests/cases/conformance/salsa/typeFromJSInitializer2.ts b/tests/cases/conformance/salsa/typeFromJSInitializer2.ts
10210new file mode 100644
10211index 0000000000..c1d5857624
10212--- /dev/null
10213+++ b/tests/cases/conformance/salsa/typeFromJSInitializer2.ts
10214@@ -0,0 +1,18 @@
10215+// @allowJs: true
10216+// @checkJs: true
10217+// @noEmit: true
10218+// @strictNullChecks: true
10219+// @noImplicitAny: true
10220+// @Filename: a.js
10221+
10222+/** @type {() => undefined} */
10223+function f1() {
10224+    return undefined;
10225+}
10226+const a = f1()
10227+
10228+/** @type {() => null} */
10229+function f2() {
10230+    return null;
10231+}
10232+const b = f2()
10233diff --git a/tests/cases/conformance/salsa/typeFromJSInitializer3.ts b/tests/cases/conformance/salsa/typeFromJSInitializer3.ts
10234new file mode 100644
10235index 0000000000..c5100df43d
10236--- /dev/null
10237+++ b/tests/cases/conformance/salsa/typeFromJSInitializer3.ts
10238@@ -0,0 +1,18 @@
10239+// @allowJs: true
10240+// @checkJs: true
10241+// @noEmit: true
10242+// @strictNullChecks: false
10243+// @noImplicitAny: true
10244+// @Filename: a.js
10245+
10246+/** @type {() => undefined} */
10247+function f1() {
10248+    return undefined;
10249+}
10250+const a = f1()
10251+
10252+/** @type {() => null} */
10253+function f2() {
10254+    return null;
10255+}
10256+const b = f2()
10257diff --git a/tests/cases/conformance/salsa/typeFromJSInitializer4.ts b/tests/cases/conformance/salsa/typeFromJSInitializer4.ts
10258new file mode 100644
10259index 0000000000..02d16c45a2
10260--- /dev/null
10261+++ b/tests/cases/conformance/salsa/typeFromJSInitializer4.ts
10262@@ -0,0 +1,29 @@
10263+// @allowJs: true
10264+// @checkJs: true
10265+// @noEmit: true
10266+// @strictNullChecks: false
10267+// @noImplicitAny: true
10268+// @Filename: a.js
10269+
10270+/** @type {number | undefined} */
10271+var n;
10272+
10273+// should get any on parameter initialisers
10274+function f(a = null, b = n, l = []) {
10275+    // a should be any
10276+    a = undefined
10277+    a = null
10278+    a = 1
10279+    a = true
10280+    a = {}
10281+    a = 'ok'
10282+
10283+    // b should be number | undefined, not any
10284+    b = 1
10285+    b = undefined
10286+    b = 'error'
10287+
10288+    // l should be any[]
10289+    l.push(1)
10290+    l.push('ok')
10291+}
10292diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment23.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment23.ts
10293index 18923e0a5a..1dafa91c28 100644
10294--- a/tests/cases/conformance/salsa/typeFromPropertyAssignment23.ts
10295+++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment23.ts
10296@@ -35,3 +35,6 @@ class NormalModule extends Module {
10297         return 0
10298     }
10299 }
10300+let cc = new C();
10301+let dd = new D();
10302+let mo = new NormalModule();
10303\ No newline at end of file
10304diff --git a/tests/cases/conformance/statements/for-inStatements/for-inStatementsAsyncIdentifier.ts b/tests/cases/conformance/statements/for-inStatements/for-inStatementsAsyncIdentifier.ts
10305new file mode 100644
10306index 0000000000..ae63dd3136
10307--- /dev/null
10308+++ b/tests/cases/conformance/statements/for-inStatements/for-inStatementsAsyncIdentifier.ts
10309@@ -0,0 +1,4 @@
10310+// @target: esnext
10311+
10312+var async;
10313+for (async in { a: 1, b: 2 }) {}
10314diff --git a/tests/cases/conformance/statements/returnStatements/returnStatements.ts b/tests/cases/conformance/statements/returnStatements/returnStatements.ts
10315index ce764c1f11..945b98944c 100644
10316--- a/tests/cases/conformance/statements/returnStatements/returnStatements.ts
10317+++ b/tests/cases/conformance/statements/returnStatements/returnStatements.ts
10318@@ -21,3 +21,4 @@ function fn10(): I { return { id: 12 }; }
10319 function fn11(): I { return new C(); }
10320 function fn12(): C { return new D(); }
10321 function fn13(): C { return null; }
10322+let q41 = new D();
10323\ No newline at end of file
10324diff --git a/tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts b/tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts
10325index c5875327b5..313b2b7169 100644
10326--- a/tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts
10327+++ b/tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts
10328@@ -45,3 +45,4 @@ var aa = {
10329         throw this;
10330     }
10331 }
10332+let q42 = new C();
10333\ No newline at end of file
10334diff --git a/tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts b/tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts
10335index 9529b5b9a3..7996e18343 100644
10336--- a/tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts
10337+++ b/tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts
10338@@ -7,4 +7,6 @@ var b = x<string>('hello');
10339 
10340 class C { foo: string; }
10341 var c = x<C>(x);
10342-var d = x<any>(x);
10343\ No newline at end of file
10344+var d = x<any>(x);
10345+
10346+let c1 = new C();
10347\ No newline at end of file
10348diff --git a/tests/cases/conformance/types/any/assignAnyToEveryType.ts b/tests/cases/conformance/types/any/assignAnyToEveryType.ts
10349index 0af7d94d7b..aba7eb4753 100644
10350--- a/tests/cases/conformance/types/any/assignAnyToEveryType.ts
10351+++ b/tests/cases/conformance/types/any/assignAnyToEveryType.ts
10352@@ -42,4 +42,6 @@ M = x;
10353 
10354 function k<T>(a: T) {
10355     a = x;
10356-}
10357\ No newline at end of file
10358+}
10359+
10360+let c1 = new C();
10361\ No newline at end of file
10362diff --git a/tests/cases/conformance/types/any/assignEveryTypeToAny.ts b/tests/cases/conformance/types/any/assignEveryTypeToAny.ts
10363index 8613550fc5..0f7f258e87 100644
10364--- a/tests/cases/conformance/types/any/assignEveryTypeToAny.ts
10365+++ b/tests/cases/conformance/types/any/assignEveryTypeToAny.ts
10366@@ -52,4 +52,6 @@ x = { f<T>(x: T) { return x; } }
10367 
10368 function j<T>(a: T) {
10369     x = a;
10370-}
10371\ No newline at end of file
10372+}
10373+
10374+let c1 = new C();
10375\ No newline at end of file
10376diff --git a/tests/cases/conformance/types/conditional/variance.ts b/tests/cases/conformance/types/conditional/variance.ts
10377index 1dd5db5c67..433eab8e01 100644
10378--- a/tests/cases/conformance/types/conditional/variance.ts
10379+++ b/tests/cases/conformance/types/conditional/variance.ts
10380@@ -25,3 +25,5 @@ class Bar<T extends string> {
10381     Bar.instance.push(this);
10382   }
10383 }
10384+
10385+let ba = new Bar();
10386diff --git a/tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceWithTypeParameter.ts b/tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceWithTypeParameter.ts
10387index 530d506f64..87069a602d 100644
10388--- a/tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceWithTypeParameter.ts
10389+++ b/tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceWithTypeParameter.ts
10390@@ -31,3 +31,6 @@ testRest((t1: D, t2, t3) => {})
10391 testRest((t1, t2: D, t3) => {})
10392 testRest((t2: D, ...t3) => {})
10393 testRest((t2, ...t3: D[]) => {})
10394+
10395+
10396+let d = new D();
10397diff --git a/tests/cases/conformance/types/import/importTypeAmbient.ts b/tests/cases/conformance/types/import/importTypeAmbient.ts
10398index b1ba463777..3345c3ac06 100644
10399--- a/tests/cases/conformance/types/import/importTypeAmbient.ts
10400+++ b/tests/cases/conformance/types/import/importTypeAmbient.ts
10401@@ -28,8 +28,8 @@ declare module "foo2" {
10402         item: Bar.I;
10403         constructor(input: Baz.J);
10404     }
10405+    
10406 }
10407-
10408 let y: import("foo2").Bar.I = { a: "", b: 0 };
10409 
10410 class Bar2 {
10411@@ -40,3 +40,6 @@ class Bar2 {
10412 let shim: typeof import("foo2") = {
10413     Bar: Bar2
10414 };
10415+
10416+var a;
10417+let ba1 = new Bar2(a);
10418diff --git a/tests/cases/conformance/types/import/importTypeGenericTypes.ts b/tests/cases/conformance/types/import/importTypeGenericTypes.ts
10419index 5bc3aa7802..cf808fc6e3 100644
10420--- a/tests/cases/conformance/types/import/importTypeGenericTypes.ts
10421+++ b/tests/cases/conformance/types/import/importTypeGenericTypes.ts
10422@@ -29,9 +29,10 @@ class Bar<T> {
10423     item: Bar.I<T>;
10424     constructor(input: Baz.J<T>) {}
10425 }
10426+let bbb = new Bar(null);
10427 export { Bar }
10428 
10429-// @filename: usage.ts
10430+// @filename: usage.
10431 export const x: import("./foo")<{x: number}> = { x: 0, y: 0, data: {x: 12} };
10432 export let y: import("./foo2").Bar.I<{x: number}> = { a: "", b: 0, data: {x: 12} };
10433 
10434@@ -43,3 +44,5 @@ export class Bar2<T> {
10435 export let shim: typeof import("./foo2") = {
10436     Bar: Bar2
10437 };
10438+
10439+let ba2 = new Bar2(1);
10440diff --git a/tests/cases/conformance/types/import/importTypeLocal.ts b/tests/cases/conformance/types/import/importTypeLocal.ts
10441index 4f29a22285..6fe5ab1c18 100644
10442--- a/tests/cases/conformance/types/import/importTypeLocal.ts
10443+++ b/tests/cases/conformance/types/import/importTypeLocal.ts
10444@@ -26,8 +26,11 @@ class Bar {
10445     item: Bar.I;
10446     constructor(input: Baz.J) {}
10447 }
10448+let bbb = new Bar(null)
10449 export { Bar }
10450 
10451+
10452+
10453 // @filename: usage.ts
10454 export const x: import("./foo") = { x: 0, y: 0 };
10455 export let y: import("./foo2").Bar.I = { a: "", b: 0 };
10456@@ -40,3 +43,5 @@ export class Bar2 {
10457 export let shim: typeof import("./foo2") = {
10458     Bar: Bar2
10459 };
10460+
10461+let ba2 = new Bar2();
10462\ No newline at end of file
10463diff --git a/tests/cases/conformance/types/intersection/intersectionOfUnionNarrowing.ts b/tests/cases/conformance/types/intersection/intersectionOfUnionNarrowing.ts
10464new file mode 100644
10465index 0000000000..0f67b66bff
10466--- /dev/null
10467+++ b/tests/cases/conformance/types/intersection/intersectionOfUnionNarrowing.ts
10468@@ -0,0 +1,16 @@
10469+// @strict: true
10470+
10471+interface X {
10472+  a?: { aProp: string };
10473+  b?: { bProp: string };
10474+}
10475+type AorB = { a: object; b: undefined } | { a: undefined; b: object };
10476+
10477+declare const q: X & AorB;
10478+
10479+if (q.a !== undefined) {
10480+  q.a.aProp;
10481+} else {
10482+  // q.b is previously incorrectly inferred as potentially undefined
10483+  q.b.bProp;
10484+}
10485diff --git a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts
10486index 56ff157a67..7c7d0b13e0 100644
10487--- a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts
10488+++ b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts
10489@@ -658,3 +658,23 @@ const cf2 = <T extends { [P in K | "cool"]: string; }, K extends keyof T>(t: T,
10490     const s: string = t[k];
10491     t.cool;
10492 };
10493+
10494+let shape = new Shape();
10495+let ta1 = new TaggedShape();
10496+let it = new Item();
10497+let op = new Options();
10498+let com1 = new Component();
10499+let c11 = new C();
10500+let c12 = new C1();
10501+let ba1 = new Base();
10502+let per = new Person(1);
10503+let oth = new OtherPerson(1);
10504+var aa;
10505+let com2 = new Component1(aa);
10506+let com3 = new Component2(aa);
10507+let a11 = new A();
10508+let b11 = new B();
10509+let fo = new Form();
10510+let sam = new SampleClass(1);
10511+let ano = new AnotherSampleClass(1);
10512+let unb = new Unbounded();
10513diff --git a/tests/cases/conformance/types/literal/literalTypes2.ts b/tests/cases/conformance/types/literal/literalTypes2.ts
10514index 57e7a0bc74..46b1479857 100644
10515--- a/tests/cases/conformance/types/literal/literalTypes2.ts
10516+++ b/tests/cases/conformance/types/literal/literalTypes2.ts
10517@@ -176,3 +176,6 @@ type Bit = 0 | 1;
10518 
10519 let aa = makeArray<Bit>(0);
10520 aa = append(aa, 1);
10521+
10522+let c1 = new C1();
10523+let c2 = new C2();
10524diff --git a/tests/cases/conformance/types/localTypes/localTypes2.ts b/tests/cases/conformance/types/localTypes/localTypes2.ts
10525index 79f1402c70..2b81f903ac 100644
10526--- a/tests/cases/conformance/types/localTypes/localTypes2.ts
10527+++ b/tests/cases/conformance/types/localTypes/localTypes2.ts
10528@@ -3,6 +3,7 @@ function f1() {
10529         class C {
10530             constructor(public x: number, public y: number) { }
10531         }
10532+        let c = new C(1,2);
10533         return C;
10534     }
10535     let C = f();
10536@@ -17,6 +18,7 @@ function f2() {
10537             public x = x;
10538             constructor(public y: number) { }
10539         }
10540+        let c = new C(1);
10541         return C;
10542     }
10543     let C = f(10);
10544@@ -31,6 +33,7 @@ function f3() {
10545             public x = x;
10546             public y = y;
10547         }
10548+        let c = new C();
10549         return C;
10550     }
10551     let C = f(10, 20);
10552diff --git a/tests/cases/conformance/types/localTypes/localTypes3.ts b/tests/cases/conformance/types/localTypes/localTypes3.ts
10553index 5eb3cf2850..7b1e536270 100644
10554--- a/tests/cases/conformance/types/localTypes/localTypes3.ts
10555+++ b/tests/cases/conformance/types/localTypes/localTypes3.ts
10556@@ -3,6 +3,7 @@ function f1() {
10557         class C<X, Y> {
10558             constructor(public x: X, public y: Y) { }
10559         }
10560+        let c = new C(1,2);
10561         return C;
10562     }
10563     let C = f();
10564@@ -17,6 +18,7 @@ function f2() {
10565             public x = x;
10566             constructor(public y: Y) { }
10567         }
10568+        let c = new C(1);
10569         return C;
10570     }
10571     let C = f(10);
10572@@ -31,6 +33,7 @@ function f3() {
10573             public x = x;
10574             public y = y;
10575         }
10576+        let c = new C();
10577         return C;
10578     }
10579     let C = f(10, "hello");
10580diff --git a/tests/cases/conformance/types/mapped/mappedTypeAsClauseRelationships.ts b/tests/cases/conformance/types/mapped/mappedTypeAsClauseRelationships.ts
10581new file mode 100644
10582index 0000000000..051192159e
10583--- /dev/null
10584+++ b/tests/cases/conformance/types/mapped/mappedTypeAsClauseRelationships.ts
10585@@ -0,0 +1,27 @@
10586+// From original issue #45212:
10587+type Methods<T> = { [P in keyof T as T[P] extends Function ? P : never]: T[P] };
10588+type H<T> = T[keyof Methods<T>]; // Ok
10589+
10590+// `Filter<T>` only filters out some keys of `T`.
10591+type Filter<T> = { [P in keyof T as T[P] extends Function ? P : never]: T[P] };
10592+// `Modify<T>` might modify some keys of `T`.
10593+type Modify<T> = { [P in keyof T as P extends string? `bool${P}`: P]: T[P] };
10594+
10595+function fun<T>(val: T) {
10596+    let x: Filter<T> = val; // Ok
10597+    let y: Modify<T> = val; // Error
10598+}
10599+
10600+type FilterInclOpt<T> = { [P in keyof T as T[P] extends Function ? P : never]+?: T[P] };
10601+type ModifyInclOpt<T> = { [P in keyof T as P extends string? `bool${P}`: never ]+?: T[P] };
10602+type FilterExclOpt<T> = { [P in keyof T as T[P] extends Function ? P : never]-?: T[P] };
10603+type ModifyExclOpt<T> = { [P in keyof T as P extends string? `bool${P}`: never ]-?: T[P] };
10604+
10605+function fun2<T>(val: T) {
10606+    let x: FilterInclOpt<T> = val; // Ok
10607+    let y: ModifyInclOpt<T> = val; // Ok
10608+    let z: FilterExclOpt<T> = val; // Error
10609+    let w: ModifyExclOpt<T> = val; // Error
10610+}
10611+
10612+
10613diff --git a/tests/cases/conformance/types/mapped/mappedTypeProperties.ts b/tests/cases/conformance/types/mapped/mappedTypeProperties.ts
10614new file mode 100644
10615index 0000000000..407e0eaf56
10616--- /dev/null
10617+++ b/tests/cases/conformance/types/mapped/mappedTypeProperties.ts
10618@@ -0,0 +1,42 @@
10619+// @declaration: true
10620+export type PlaceType = 'openSky' | 'roofed' | 'garage'
10621+type Before = {
10622+    model: 'hour' | 'day';
10623+    [placeType in PlaceType]: void;
10624+}
10625+
10626+type After = {
10627+    [placeType in PlaceType]: void;
10628+    model: 'hour' | 'day'
10629+}
10630+
10631+type AfterQuestion = {
10632+    [placeType in PlaceType]?: void;
10633+    model: 'hour' | 'day';
10634+}
10635+type AfterMethod = {
10636+    [placeType in PlaceType]?: void;
10637+    model(duration: number): 'hour' | 'day';
10638+}
10639+
10640+type AfterImplicit = {
10641+    [placeType in PlaceType]
10642+    model: 'hour' | 'day';
10643+}
10644+type AfterImplicitQ = {
10645+    [placeType in PlaceType]?
10646+    model: 'hour' | 'day'
10647+}
10648+
10649+interface I {
10650+    [P in PlaceType]: any
10651+}
10652+class C {
10653+    [P in PlaceType]: any
10654+}
10655+const D = class {
10656+    [P in PlaceType]: any
10657+}
10658+const E = class {
10659+    [P in 'a' | 'b']: any
10660+}
10661diff --git a/tests/cases/conformance/types/mapped/mappedTypes3.ts b/tests/cases/conformance/types/mapped/mappedTypes3.ts
10662index bf5a4399b0..6ef1918898 100644
10663--- a/tests/cases/conformance/types/mapped/mappedTypes3.ts
10664+++ b/tests/cases/conformance/types/mapped/mappedTypes3.ts
10665@@ -37,4 +37,6 @@ function f3(bb: BoxifiedBacon) {
10666     let b = unboxify<Bacon>(bb);  // Explicit type parameter required
10667     let bool = b.isPerfect;
10668     let weight = bb.weight;
10669-}
10670\ No newline at end of file
10671+}
10672+
10673+let box = new Box();
10674\ No newline at end of file
10675diff --git a/tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts b/tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts
10676index b3530b4696..66e25c6091 100644
10677--- a/tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts
10678+++ b/tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts
10679@@ -43,3 +43,5 @@ interface E3<T> extends Base {
10680 class Form<T> {
10681     private values: {[P in keyof T]?: T[P]} = {}
10682 }
10683+
10684+let f = new Form();
10685\ No newline at end of file
10686diff --git a/tests/cases/conformance/types/members/classWithProtectedProperty.ts b/tests/cases/conformance/types/members/classWithProtectedProperty.ts
10687index 96bc615c02..a37828eef1 100644
10688--- a/tests/cases/conformance/types/members/classWithProtectedProperty.ts
10689+++ b/tests/cases/conformance/types/members/classWithProtectedProperty.ts
10690@@ -24,4 +24,6 @@ class D extends C {
10691         var r7: string = C.f();
10692         var r8: string = C.g();
10693     }
10694-}
10695\ No newline at end of file
10696+}
10697+
10698+let d = new D();
10699\ No newline at end of file
10700diff --git a/tests/cases/conformance/types/members/indexSignatures1.ts b/tests/cases/conformance/types/members/indexSignatures1.ts
10701new file mode 100644
10702index 0000000000..f888275683
10703--- /dev/null
10704+++ b/tests/cases/conformance/types/members/indexSignatures1.ts
10705@@ -0,0 +1,325 @@
10706+// @strict: true
10707+// @declaration: true
10708+// @target: esnext
10709+
10710+// Symbol index signature checking
10711+
10712+const sym = Symbol();
10713+
10714+function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [sym]: number }) {
10715+    x = z;
10716+    y = z;  // Error
10717+}
10718+
10719+// Overlapping index signatures
10720+
10721+function gg1(x: { [key: `a${string}`]: string, [key: `${string}a`]: string }, y: { [key: `a${string}a`]: string }) {
10722+    x = y;
10723+    y = x;
10724+}
10725+
10726+interface IX { [key: `a${string}`]: string, [key: `${string}a`]: string }
10727+interface IY { [key: `a${string}a`]: string }
10728+
10729+function gg2(x: IX, y: IY) {
10730+    x = y;  // Error
10731+    y = x;
10732+}
10733+
10734+// Intersection of multiple applicable index signatures
10735+
10736+declare let combo: { [x: `foo-${string}`]: 'a' | 'b' } & { [x: `${string}-bar`]: 'b' | 'c' };
10737+const x1 = combo['foo-test'];  // 'a' | 'b'
10738+const x2 = combo['test-bar'];  // 'b' | 'c'
10739+const x3 = combo['foo-test-bar'];  // 'b' (('a' | 'b') & ('b' | 'c'))
10740+
10741+declare var str: string;
10742+
10743+const x4 = combo[`foo-${str}`];
10744+const x5 = combo[`${str}-bar`];
10745+const x6 = combo[`foo-${str}-bar`];
10746+
10747+declare let combo2: { [x: `${string}xxx${string}` & `${string}yyy${string}`]: string };
10748+
10749+const x7 = combo2['axxxbyyyc'];
10750+const x8 = combo2['ayyyxxxbc'];
10751+const x9 = combo2['axxxbbbyc'];  // Error
10752+
10753+// Property access on template pattern index signature
10754+
10755+declare let dom: { [x: `data${string}`]: string };
10756+const y1 = dom['data123'];
10757+const y2 = dom.data123;
10758+
10759+// Excess property checking for template pattern index signature
10760+
10761+dom = { data123: 'hello' };
10762+dom = { date123: 'hello' };  // Error
10763+
10764+// Contextual typing by index signature with template literal pattern
10765+
10766+type Funcs = {
10767+    [key: `s${string}`]: (x: string) => void,
10768+    [key: `n${string}`]: (x: number) => void,
10769+}
10770+
10771+const funcs: Funcs = {
10772+    sfoo: x => x.length,  // x: string
10773+    nfoo: x => x * 2,     // n: number
10774+}
10775+
10776+// Duplicate index signature checking
10777+
10778+type Duplicates = {
10779+    [key: string | number]: any;  // Error
10780+    [key: number | symbol]: any;  // Error
10781+    [key: symbol | `foo${string}`]: any;  // Error
10782+    [key: `foo${string}`]: any;  // Error
10783+}
10784+
10785+// Conflicting index signature checking
10786+
10787+type Conflicting = {
10788+    [key: `a${string}`]: 'a';
10789+    [key: `${string}a`]: 'b';
10790+    [key: `a${string}a`]: 'c';  // Error
10791+}
10792+
10793+// Invalid index signatures
10794+
10795+type Invalid<T extends string> = {
10796+    [key: 'a' | 'b' | 'c']: string;  // Error
10797+    [key: T | number]: string;  // Error
10798+    [key: Error]: string;  // Error
10799+    [key: T & string]: string;  // Error
10800+}
10801+
10802+// Intersections in index signatures
10803+
10804+type Tag1 = { __tag1__: void };
10805+type Tag2 = { __tag2__: void };
10806+
10807+type TaggedString1 = string & Tag1;
10808+type TaggedString2 = string & Tag2;
10809+
10810+declare let s0: string;
10811+declare let s1: TaggedString1;
10812+declare let s2: TaggedString2;
10813+declare let s3: TaggedString1 | TaggedString2;
10814+declare let s4: TaggedString1 & TaggedString2;
10815+
10816+interface I1 { [key: TaggedString1]: string }
10817+interface I2 { [key: TaggedString2]: string }
10818+interface I3 { [key: TaggedString1 | TaggedString2]: string }
10819+interface I4 { [key: TaggedString1 & TaggedString2]: string }
10820+
10821+declare let i1: I1;
10822+declare let i2: I2;
10823+declare let i3: I3;
10824+declare let i4: I4;
10825+
10826+i1[s0];  // Error
10827+i1[s1];
10828+i1[s2];  // Error
10829+i1[s3];  // Error
10830+i1[s4];
10831+
10832+i2[s0];  // Error
10833+i2[s1];  // Error
10834+i2[s2];
10835+i2[s3];  // Error
10836+i2[s4];
10837+
10838+i3[s0];  // Error
10839+i3[s1];
10840+i3[s2];
10841+i3[s3];
10842+i3[s4];
10843+
10844+i4[s0];  // Error
10845+i4[s1];  // Error
10846+i4[s2];  // Error
10847+i4[s3];  // Error
10848+i4[s4];
10849+
10850+i1 = i2;  // Error
10851+i1 = i3;
10852+i1 = i4;  // Error
10853+
10854+i2 = i1;  // Error
10855+i2 = i3;
10856+i2 = i4;  // Error
10857+
10858+i3 = i1;  // Error
10859+i3 = i2;  // Error
10860+i3 = i4;  // Error
10861+
10862+i4 = i1;
10863+i4 = i2;
10864+i4 = i3;
10865+
10866+declare let o1: { [key: TaggedString1]: string };
10867+declare let o2: { [key: TaggedString2]: string };
10868+declare let o3: { [key: TaggedString1 | TaggedString2]: string };
10869+declare let o4: { [key: TaggedString1 & TaggedString2]: string };
10870+
10871+o1[s0];  // Error
10872+o1[s1];
10873+o1[s2];  // Error
10874+o1[s3];  // Error
10875+o1[s4];
10876+
10877+o2[s0];  // Error
10878+o2[s1];  // Error
10879+o2[s2];
10880+o2[s3];  // Error
10881+o2[s4];
10882+
10883+o3[s0];  // Error
10884+o3[s1];
10885+o3[s2];
10886+o3[s3];
10887+o3[s4];
10888+
10889+o4[s0];  // Error
10890+o4[s1];  // Error
10891+o4[s2];  // Error
10892+o4[s3];  // Error
10893+o4[s4];
10894+
10895+o1 = o2;
10896+o1 = o3;
10897+o1 = o4;
10898+
10899+o2 = o1;
10900+o2 = o3;
10901+o2 = o4;
10902+
10903+o3 = o1;
10904+o3 = o2;
10905+o3 = o4;
10906+
10907+o4 = o1;
10908+o4 = o2;
10909+o4 = o3;
10910+
10911+// Index signatures inferred from computed property names
10912+
10913+const obj10 = {
10914+    ['x']: 0 as const,
10915+    ['a' + 'b']: 1 as const,
10916+};
10917+
10918+const obj11 = {
10919+    [1]: 2 as const,
10920+    [1 + 2]: 3 as const,
10921+};
10922+
10923+const obj12 = {
10924+    [sym]: 4 as const,
10925+    [Symbol()]: 5 as const,
10926+};
10927+
10928+const obj13 = {
10929+    ['x']: 0 as const,
10930+    ['a' + 'b']: 1 as const,
10931+    [1]: 2 as const,
10932+    [1 + 2]: 3 as const,
10933+    [sym]: 4 as const,
10934+    [Symbol()]: 5 as const,
10935+};
10936+
10937+// Repros from #1863
10938+
10939+const system = Symbol('system');
10940+const SomeSytePlugin = Symbol('SomeSytePlugin');
10941+
10942+interface Plugs {
10943+    [key: symbol]: (...args: any) => unknown;
10944+}
10945+
10946+const plugins = {
10947+    "user": {} as Plugs,
10948+    [system]: {} as Plugs
10949+};
10950+
10951+plugins[system][SomeSytePlugin] = () => console.log('awsome');
10952+plugins[system][SomeSytePlugin]();
10953+
10954+var theAnswer: symbol = Symbol('secret');
10955+var obj = {} as Record<symbol, number>;
10956+obj[theAnswer] = 42;
10957+
10958+// Repro from #26470
10959+
10960+const directive = Symbol('directive');
10961+declare function foo<TArg, TRet, TDir>(options: { [x in string]: (arg: TArg) => TRet } & { [directive]?: TDir }): void;
10962+
10963+let case1 = foo({
10964+    [directive]: (x: string) => 'str',
10965+    addOne: (x: number) => x + 1,
10966+    double: (x: number) => x + x,
10967+});
10968+
10969+let case2 = foo({
10970+    addOne: (x: number) => x + 1,
10971+    double: (x: number) => x + x,
10972+    [directive]: (x: string) => 'str',
10973+});
10974+
10975+let case3 = foo({
10976+    [directive]: 'str',
10977+    addOne: (x: number) => x + 1,
10978+    double: (x: number) => x + x,
10979+});
10980+
10981+// Repros from #42192
10982+
10983+type Pseudo = `&:${string}`;
10984+
10985+const AmIPseudo1: Pseudo = '&:test';
10986+const AmIPseudo: Pseudo = '&';  // Error
10987+
10988+type PseudoDeclaration = { [key in Pseudo]: string };
10989+
10990+const test: PseudoDeclaration = { 'someKey' : 'someValue' };  // Error
10991+
10992+type FieldPattern = `/${string}`;
10993+
10994+const path1: FieldPattern = '/one';
10995+const path2: FieldPattern = 'two';  // Error
10996+
10997+type PathsObject = { [P in FieldPattern]: object; };
10998+const pathObject: PathsObject = 123;  // Error
10999+
11000+type IdType = `${number}-${number}-${number}-${number}`
11001+const id: IdType = '0000-0000-0000-0001';
11002+
11003+type A = Record<IdType, string>;
11004+
11005+const a: A = { [id]: 'test' }
11006+
11007+let aid = a[id];
11008+
11009+// Repro from #44793
11010+
11011+interface AA {
11012+    a?: string;
11013+    b?: number;
11014+    [key: symbol]: string;
11015+}
11016+
11017+const aa: AA = { [sym]: '123' };
11018+
11019+const obj1: { [key: symbol]: string } = { [sym]: 'hello '};
11020+const obj2: { [key: string]: string } = { [sym]: 'hello '};  // Permitted for backwards compatibility
11021+const obj3: { [key: number]: string } = { [sym]: 'hello '};  // Error
11022+
11023+// Repro from #45772
11024+
11025+type Id = string & { __tag: 'id '};
11026+type Rec1 = { [key: Id]: number };
11027+type Rec2 = Record<Id, number>;
11028+
11029+type K1 = keyof Rec1;  // Id
11030+type K2 = keyof Rec2;  // Id
11031diff --git a/tests/cases/conformance/types/members/objectTypeHidingMembersOfObject.ts b/tests/cases/conformance/types/members/objectTypeHidingMembersOfObject.ts
11032index 1a7d6f2be4..bc489541ae 100644
11033--- a/tests/cases/conformance/types/members/objectTypeHidingMembersOfObject.ts
11034+++ b/tests/cases/conformance/types/members/objectTypeHidingMembersOfObject.ts
11035@@ -24,4 +24,6 @@ var b: {
11036     valueOf(): void;
11037 }
11038 
11039-var r4: void = b.valueOf();
11040\ No newline at end of file
11041+var r4: void = b.valueOf();
11042+
11043+let c1 = new C();
11044\ No newline at end of file
11045diff --git a/tests/cases/conformance/types/members/objectTypePropertyAccess.ts b/tests/cases/conformance/types/members/objectTypePropertyAccess.ts
11046index a54890fce9..e3c2cca547 100644
11047--- a/tests/cases/conformance/types/members/objectTypePropertyAccess.ts
11048+++ b/tests/cases/conformance/types/members/objectTypePropertyAccess.ts
11049@@ -26,3 +26,5 @@ var r8 = a.toString();
11050 var r9 = a['toString']();
11051 var r10 = a.foo;
11052 var r11 = a['foo'];
11053+
11054+let c1 = new C(); 
11055\ No newline at end of file
11056diff --git a/tests/cases/conformance/types/members/objectTypeWithNumericProperty.ts b/tests/cases/conformance/types/members/objectTypeWithNumericProperty.ts
11057index 730ab43ec9..2c1b46b5d1 100644
11058--- a/tests/cases/conformance/types/members/objectTypeWithNumericProperty.ts
11059+++ b/tests/cases/conformance/types/members/objectTypeWithNumericProperty.ts
11060@@ -40,4 +40,6 @@ var b = {
11061 var r1 = b[1];
11062 var r2 = b[1.1];
11063 var r3 = b['1'];
11064-var r4 = b['1.1'];
11065\ No newline at end of file
11066+var r4 = b['1.1'];
11067+
11068+let c1 = new C();
11069\ No newline at end of file
11070diff --git a/tests/cases/conformance/types/members/objectTypeWithStringNamedPropertyOfIllegalCharacters.ts b/tests/cases/conformance/types/members/objectTypeWithStringNamedPropertyOfIllegalCharacters.ts
11071index 766f56bdd2..d67c011129 100644
11072--- a/tests/cases/conformance/types/members/objectTypeWithStringNamedPropertyOfIllegalCharacters.ts
11073+++ b/tests/cases/conformance/types/members/objectTypeWithStringNamedPropertyOfIllegalCharacters.ts
11074@@ -50,3 +50,5 @@ var r2 = b["    "];
11075 var r3 = b["a   b"];
11076 // BUG 817263
11077 var r4 = b["~!@#$%^&*()_+{}|:'<>?\/.,`"];
11078+
11079+let c1 = new C();
11080\ No newline at end of file
11081diff --git a/tests/cases/conformance/types/members/typesWithSpecializedCallSignatures.ts b/tests/cases/conformance/types/members/typesWithSpecializedCallSignatures.ts
11082index 9eef3476f2..9aea8f6a18 100644
11083--- a/tests/cases/conformance/types/members/typesWithSpecializedCallSignatures.ts
11084+++ b/tests/cases/conformance/types/members/typesWithSpecializedCallSignatures.ts
11085@@ -38,4 +38,7 @@ a = i;
11086 
11087 var r1: Derived1 = c.foo('hi');
11088 var r2: Derived2 = c.foo('bye');
11089-var r3: Base = c.foo('hm');
11090\ No newline at end of file
11091+var r3: Base = c.foo('hm');
11092+
11093+// let dev1 = new Derived1();
11094+// let dev2 = new Derived2();
11095\ No newline at end of file
11096diff --git a/tests/cases/conformance/types/members/typesWithSpecializedConstructSignatures.ts b/tests/cases/conformance/types/members/typesWithSpecializedConstructSignatures.ts
11097index 7c84e76f14..522fad55bf 100644
11098--- a/tests/cases/conformance/types/members/typesWithSpecializedConstructSignatures.ts
11099+++ b/tests/cases/conformance/types/members/typesWithSpecializedConstructSignatures.ts
11100@@ -36,4 +36,7 @@ a = i;
11101 
11102 var r1 = new C('hi');
11103 var r2: Derived2 = new i('bye');
11104-var r3: Base = new a('hm');
11105\ No newline at end of file
11106+var r3: Base = new a('hm');
11107+
11108+let dev1 = new Derived1();
11109+let dev2 = new Derived2();
11110\ No newline at end of file
11111diff --git a/tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts b/tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts
11112index 82e7de4584..97001142ae 100644
11113--- a/tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts
11114+++ b/tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts
11115@@ -8,4 +8,7 @@ class C {
11116 class C2<T> {
11117     x?: T;
11118     f?(x: T) {}
11119-}
11120\ No newline at end of file
11121+}
11122+
11123+let c = new C();
11124+let c2 = new C2();
11125\ No newline at end of file
11126diff --git a/tests/cases/conformance/types/namedTypes/optionalMethods.ts b/tests/cases/conformance/types/namedTypes/optionalMethods.ts
11127index 932521425f..dc7fe5cf4c 100644
11128--- a/tests/cases/conformance/types/namedTypes/optionalMethods.ts
11129+++ b/tests/cases/conformance/types/namedTypes/optionalMethods.ts
11130@@ -56,3 +56,6 @@ class Derived extends Base {
11131     a = 1;
11132     f(): number { return 1; }
11133 }
11134+
11135+let ba1 = new Bar();
11136+let dev = new Derived();
11137diff --git a/tests/cases/conformance/types/never/neverType.ts b/tests/cases/conformance/types/never/neverType.ts
11138index d58471d62a..e548194630 100644
11139--- a/tests/cases/conformance/types/never/neverType.ts
11140+++ b/tests/cases/conformance/types/never/neverType.ts
11141@@ -91,3 +91,5 @@ test(() => "hello");
11142 test(() => fail());
11143 test(() => { throw new Error(); })
11144 test(errorCallback);
11145+
11146+let c1 = new C();
11147diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts
11148index 1cc499c7d6..16fe9f1bc5 100644
11149--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts
11150+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts
11151@@ -77,6 +77,7 @@ module M {
11152     export var x = 1;
11153     export class C { foo: string }
11154 }
11155+let c2 = new M.C();
11156 function foo11() {
11157     return M;
11158 }
11159@@ -119,4 +120,7 @@ module e1 { export var y = 1; }
11160 function foo15() {
11161     return e1;
11162 }
11163-var r15 = foo15();
11164\ No newline at end of file
11165+var r15 = foo15();
11166+
11167+let c = new C();
11168+let c11 = new c1(1);
11169diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts
11170index d5ff0c1f56..191117eb92 100644
11171--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts
11172+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts
11173@@ -35,4 +35,6 @@ var b = {
11174     foo(x, x) { },
11175     a: function foo(x: number, x: string) { },
11176     b: <T>(x: T, x: T) => { }
11177-}
11178\ No newline at end of file
11179+}
11180+
11181+let c1 = new C();
11182\ No newline at end of file
11183diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts
11184index 34edfba671..d285c45d78 100644
11185--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts
11186+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts
11187@@ -52,3 +52,5 @@ b.a(1);
11188 b.a(1, 2);
11189 b.b();
11190 b.b(1);
11191+
11192+let c1 = new C();
11193diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts
11194index 4f31726f82..bdd01987b0 100644
11195--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts
11196+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts
11197@@ -56,4 +56,6 @@ a(1);
11198 a(1, 2);
11199 a.foo(1);
11200 a.foo(1, 2);
11201-a.foo(1, 2, 3);
11202\ No newline at end of file
11203+a.foo(1, 2, 3);
11204+
11205+let c1 = new C();
11206diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/parametersWithNoAnnotationAreAny.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/parametersWithNoAnnotationAreAny.ts
11207index 432c905765..4c09ab1066 100644
11208--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/parametersWithNoAnnotationAreAny.ts
11209+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/parametersWithNoAnnotationAreAny.ts
11210@@ -26,4 +26,6 @@ var b = {
11211         return x;
11212     },
11213     b: (x) => x
11214-}
11215\ No newline at end of file
11216+}
11217+
11218+let c1 = new C();
11219diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts
11220index 01f33fbd7b..0aeddb657c 100644
11221--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts
11222+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts
11223@@ -62,3 +62,6 @@ var a3: {
11224     foo(x: 'a');
11225     foo<T extends String>(x: T);
11226 }
11227+let c1 = new C();
11228+let c2 = new C2();
11229+let c3 = new C3();
11230diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsSubtypeOfNonSpecializedSignature.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsSubtypeOfNonSpecializedSignature.ts
11231index 70735b8edd..06ca07fbe8 100644
11232--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsSubtypeOfNonSpecializedSignature.ts
11233+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsSubtypeOfNonSpecializedSignature.ts
11234@@ -78,3 +78,6 @@ var a3: {
11235     foo(x: 'a');
11236     foo<T extends String>(x: T);
11237 }
11238+let c1 = new C();
11239+let c2 = new C2();
11240+let c3 = new C3();
11241\ No newline at end of file
11242diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts
11243index a8bf323850..6ea1c88cfb 100644
11244--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts
11245+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts
11246@@ -23,3 +23,5 @@ var b = {
11247     a: function foo(x: 'hi', y: 'hi') { },
11248     b: (x: 'hi') => { }
11249 }
11250+
11251+let c1 = new C();
11252diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterAsTypeArgument.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterAsTypeArgument.ts
11253index ef33eef5d5..5e87397a9e 100644
11254--- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterAsTypeArgument.ts
11255+++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterAsTypeArgument.ts
11256@@ -24,4 +24,6 @@ interface I<T, U> {
11257 
11258 //interface I<T, U extends T> {
11259 //    x: C<U, T>;
11260-//}
11261+//}
11262+
11263+let c1 = new C();
11264diff --git a/tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.ts b/tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.ts
11265index 4ac60bd7f7..9a462477de 100644
11266--- a/tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.ts
11267+++ b/tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.ts
11268@@ -29,4 +29,7 @@ var a: {
11269 var b: {
11270     new <T>(x: T, y: string): C2<T>;
11271     new <T>(x: T, y: string): C; // error
11272-}
11273\ No newline at end of file
11274+}
11275+
11276+let c1 = new C(1);
11277+let c2 = new C2(1);
11278\ No newline at end of file
11279diff --git a/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexingResults.ts b/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexingResults.ts
11280index 3d7b7eba45..4af4aba5a9 100644
11281--- a/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexingResults.ts
11282+++ b/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexingResults.ts
11283@@ -53,4 +53,6 @@ var r2b = b2['2'];
11284 var r3 = b2['3'];
11285 var r4 = b2[1];
11286 var r5 = b2[2];
11287-var r6 = b2[3];
11288\ No newline at end of file
11289+var r6 = b2[3];
11290+
11291+let  c1 = new C();
11292diff --git a/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexingResults.ts b/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexingResults.ts
11293index f51b8e461e..48ccea819f 100644
11294--- a/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexingResults.ts
11295+++ b/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexingResults.ts
11296@@ -32,3 +32,5 @@ var b: { [x: string]: string } = { y: '' }
11297 var r10 = b['y'];
11298 var r11 = b['a'];
11299 var r12 = b[1];
11300+
11301+let c1 = new C();
11302\ No newline at end of file
11303diff --git a/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNameWithoutTypeAnnotation.ts b/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNameWithoutTypeAnnotation.ts
11304index 42f42eb312..ce53505fda 100644
11305--- a/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNameWithoutTypeAnnotation.ts
11306+++ b/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNameWithoutTypeAnnotation.ts
11307@@ -18,4 +18,6 @@ var b = {
11308 var r1 = (new C()).foo;
11309 var r2 = (<I>null).foo;
11310 var r3 = a.foo;
11311-var r4 = b.foo;
11312\ No newline at end of file
11313+var r4 = b.foo;
11314+
11315+let c1 = new C();
11316\ No newline at end of file
11317diff --git a/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNamesOfReservedWords.ts b/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNamesOfReservedWords.ts
11318index 6673465381..e8589921f5 100644
11319--- a/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNamesOfReservedWords.ts
11320+++ b/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNamesOfReservedWords.ts
11321@@ -273,4 +273,6 @@ enum E {
11322 }
11323 
11324 var r7 = E.abstract;
11325-var r8 = E.as;
11326\ No newline at end of file
11327+var r8 = E.as;
11328+
11329+let c1 = new C();
11330diff --git a/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyAccess.ts b/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyAccess.ts
11331index dbea999036..9c6eea5968 100644
11332--- a/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyAccess.ts
11333+++ b/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyAccess.ts
11334@@ -20,4 +20,6 @@ var r3 = a["a b"];
11335 var b = {
11336     "a b": 1
11337 }
11338-var r4 = b["a b"];
11339\ No newline at end of file
11340+var r4 = b["a b"];
11341+
11342+let c1 = new C();
11343diff --git a/tests/cases/conformance/types/primitives/number/extendNumberInterface.ts b/tests/cases/conformance/types/primitives/number/extendNumberInterface.ts
11344index 6aa6325ee3..68641deedd 100644
11345--- a/tests/cases/conformance/types/primitives/number/extendNumberInterface.ts
11346+++ b/tests/cases/conformance/types/primitives/number/extendNumberInterface.ts
11347@@ -7,4 +7,4 @@ var x = 1;
11348 var a: string = x.doStuff();
11349 var b: string = x.doOtherStuff('hm');
11350 var c: string = x['doStuff']();
11351-var d: string = x['doOtherStuff']('hm');
11352\ No newline at end of file
11353+var d: string = x['doOtherStuff']('hm');  
11354diff --git a/tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts b/tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts
11355index 58a5a54386..572d96843f 100644
11356--- a/tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts
11357+++ b/tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts
11358@@ -28,4 +28,6 @@ x = f;
11359 
11360 enum E { A }
11361 x = E;
11362-x = E.A;
11363\ No newline at end of file
11364+x = E.A;
11365+
11366+let c1 = new C(); 
11367\ No newline at end of file
11368diff --git a/tests/cases/conformance/types/primitives/undefined/validUndefinedAssignments.ts b/tests/cases/conformance/types/primitives/undefined/validUndefinedAssignments.ts
11369index 71ae9f89a1..a1cad7a4a4 100644
11370--- a/tests/cases/conformance/types/primitives/undefined/validUndefinedAssignments.ts
11371+++ b/tests/cases/conformance/types/primitives/undefined/validUndefinedAssignments.ts
11372@@ -20,4 +20,6 @@ var h: { f(): void } = x;
11373 
11374 function i<T>(a: T) {
11375     a = x;
11376-}
11377\ No newline at end of file
11378+}
11379+
11380+let c1 = new C();
11381\ No newline at end of file
11382diff --git a/tests/cases/conformance/types/rest/objectRestParameter.ts b/tests/cases/conformance/types/rest/objectRestParameter.ts
11383index 5b6faeb797..a18f4afc49 100644
11384--- a/tests/cases/conformance/types/rest/objectRestParameter.ts
11385+++ b/tests/cases/conformance/types/rest/objectRestParameter.ts
11386@@ -19,3 +19,4 @@ function foobar({ bar={}, ...opts }: any = {}) {
11387 foobar();
11388 foobar({ baz: 'hello' });
11389 foobar({ bar: { greeting: 'hello' } });
11390+let t1 = new C();
11391\ No newline at end of file
11392diff --git a/tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts b/tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts
11393index 9746dd287b..a518d15d97 100644
11394--- a/tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts
11395+++ b/tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts
11396@@ -23,4 +23,6 @@ var c2: { (x: number): number; <T>(x: T): any; };
11397 
11398 var z2 = [a2, b2, c2];
11399 var r6 = z2[0];
11400-var r7 = r6(''); // any not string
11401\ No newline at end of file
11402+var r7 = r6(''); // any not string
11403+
11404+let c11 = new C();
11405\ No newline at end of file
11406diff --git a/tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteralForOverloads2.ts b/tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteralForOverloads2.ts
11407index 4ba6a76000..1d686dcc89 100644
11408--- a/tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteralForOverloads2.ts
11409+++ b/tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteralForOverloads2.ts
11410@@ -25,4 +25,7 @@ var f2: {
11411 var f3: {
11412     new<T>(x: string): D<T>;
11413     new<T>(x: number): D<T>;
11414-} = D;
11415\ No newline at end of file
11416+} = D;
11417+
11418+let c = new C('');
11419+let d = new D('');
11420\ No newline at end of file
11421diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts
11422index 3e8ee82c74..4dd74a8b9b 100644
11423--- a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts
11424+++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts
11425@@ -53,4 +53,7 @@ class D<T> {
11426 
11427 var d: D<string>;
11428 var r3: typeof D;
11429-var r4: typeof d;
11430\ No newline at end of file
11431+var r4: typeof d;
11432+
11433+let c1 = new C(1);
11434+let d1 = new D(1);
11435\ No newline at end of file
11436diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryWithReservedWords.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryWithReservedWords.ts
11437index 5fb9d2233f..ce1748f526 100644
11438--- a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryWithReservedWords.ts
11439+++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryWithReservedWords.ts
11440@@ -12,3 +12,4 @@ interface IScope {
11441     delete: typeof Controller.prototype.delete;  // Should not error
11442     var: typeof Controller.prototype.var;        // Should not error
11443 }
11444+let c2 = new Controller();
11445diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofClass2.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofClass2.ts
11446index df1898a543..4dcf244525 100644
11447--- a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofClass2.ts
11448+++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofClass2.ts
11449@@ -18,4 +18,7 @@ class D extends C {
11450 var d: D;
11451 
11452 var r1: typeof D;
11453-var r2: typeof d;
11454\ No newline at end of file
11455+var r2: typeof d;
11456+
11457+let c = new C(1);
11458+let d1 = new D(1);
11459\ No newline at end of file
11460diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts
11461index 878885a8a9..53d74c3b71 100644
11462--- a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts
11463+++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts
11464@@ -3,6 +3,7 @@ module M {
11465     class C {
11466         foo: number;
11467     }
11468+    var c = new C();
11469 }
11470 
11471-var r: typeof M;
11472\ No newline at end of file
11473+var r: typeof M;
11474diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts
11475new file mode 100644
11476index 0000000000..420604c550
11477--- /dev/null
11478+++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts
11479@@ -0,0 +1,146 @@
11480+// @noImplicitThis: true
11481+// @strict: true
11482+
11483+class Test {
11484+    data = {};
11485+    constructor() {
11486+        var copy: typeof this.data = {};
11487+    }
11488+}
11489+
11490+class Test1 {
11491+    data = { foo: '' };
11492+    ['this'] = '';
11493+    constructor() {
11494+        var copy: typeof this.data = { foo: '' };
11495+        var foo: typeof this.data.foo = '';
11496+
11497+        var self: typeof this = this;
11498+        self.data;
11499+
11500+        var str: typeof this.this = '';
11501+    }
11502+}
11503+
11504+
11505+function Test2() {
11506+    let x: typeof this.no = 1;
11507+}
11508+
11509+function Test3(this: { no: number }) {
11510+    let x: typeof this.no = 1;
11511+}
11512+
11513+function Test4(this: { no: number } | undefined) {
11514+    let x: typeof this.no = 1;
11515+}
11516+
11517+class Test5 {
11518+    no = 1;
11519+
11520+    f = () => {
11521+        // should not capture this.
11522+        let x: typeof this.no = 1;
11523+    }
11524+}
11525+
11526+namespace Test6 {
11527+    export let f = () => {
11528+        let x: typeof this.no = 1;
11529+    }
11530+}
11531+
11532+module Test7 {
11533+    export let f = () => {
11534+        let x: typeof this.no = 1;
11535+    }
11536+}
11537+
11538+const Test8 = () => {
11539+    let x: typeof this.no = 1;
11540+}
11541+
11542+class Test9 {
11543+    no = 0;
11544+    this = 0;
11545+
11546+    f() {
11547+        if (this instanceof Test9D1) {
11548+            const d1: typeof this = this;
11549+            d1.f1();
11550+        }
11551+
11552+        if (this instanceof Test9D2) {
11553+            const d2: typeof this = this;
11554+            d2.f2();
11555+        }
11556+    }
11557+
11558+    g() {
11559+        if (this.no === 1) {
11560+            const no: typeof this.no = this.no;
11561+        }
11562+
11563+        if (this.this === 1) {
11564+            const no: typeof this.this = this.this;
11565+        }
11566+    }
11567+}
11568+
11569+class Test9D1 {
11570+    f1() {}
11571+}
11572+
11573+class Test9D2 {
11574+    f2() {}
11575+}
11576+
11577+class Test10 {
11578+    a?: { b?: string }
11579+
11580+    foo() {
11581+        let a: typeof this.a = undefined as any;
11582+        if (this.a) {
11583+            let a: typeof this.a = undefined as any;    // should narrow to { b?: string }
11584+            let b: typeof this.a.b = undefined as any;
11585+
11586+            if (this.a.b) {
11587+                let b: typeof this.a.b = undefined as any;   // should narrow to string
11588+            }
11589+        }
11590+    }
11591+}
11592+
11593+class Test11 {
11594+    this?: { x?: string };
11595+    
11596+    foo() {
11597+        const o = this;
11598+        let bar: typeof o.this = {};
11599+
11600+        if (o.this && o.this.x) {
11601+            let y: string = o.this.x;   // should narrow to string
11602+        }
11603+    }
11604+}
11605+
11606+class Tests12 {
11607+    test1() { // OK
11608+        type Test = typeof this;
11609+    }
11610+
11611+    test2() { // OK
11612+        for (;;) {}
11613+        type Test = typeof this;
11614+    }
11615+
11616+    test3() { // expected no compile errors
11617+        for (const dummy in []) {}
11618+        type Test = typeof this;
11619+    }
11620+
11621+    test4() { // expected no compile errors
11622+        for (const dummy of []) {}
11623+        type Test = typeof this;
11624+    }
11625+}
11626\ No newline at end of file
11627diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThisWithImplicitThis.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThisWithImplicitThis.ts
11628new file mode 100644
11629index 0000000000..d99cceaa58
11630--- /dev/null
11631+++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThisWithImplicitThis.ts
11632@@ -0,0 +1,5 @@
11633+// @noImplicitThis: false
11634+
11635+function Test1() {
11636+    let x: typeof this.no = 1
11637+}
11638diff --git a/tests/cases/conformance/types/spread/spreadDuplicate.ts b/tests/cases/conformance/types/spread/spreadDuplicate.ts
11639new file mode 100644
11640index 0000000000..f27a2529f0
11641--- /dev/null
11642+++ b/tests/cases/conformance/types/spread/spreadDuplicate.ts
11643@@ -0,0 +1,21 @@
11644+// @strict: true
11645+// @declaration: true
11646+
11647+// Repro from #44438
11648+
11649+declare let a: { a: string };
11650+declare let b: { a?: string };
11651+declare let c: { a: string | undefined };
11652+declare let d: { a?: string | undefined };
11653+
11654+declare let t: boolean;
11655+
11656+let a1 = { a: 123, ...a };  // string (Error)
11657+let b1 = { a: 123, ...b };  // string | number
11658+let c1 = { a: 123, ...c };  // string | undefined (Error)
11659+let d1 = { a: 123, ...d };  // string | number
11660+
11661+let a2 = { a: 123, ...(t ? a : {}) };  // string | number
11662+let b2 = { a: 123, ...(t ? b : {}) };  // string | number
11663+let c2 = { a: 123, ...(t ? c : {}) };  // string | number
11664+let d2 = { a: 123, ...(t ? d : {}) };  // string | number
11665diff --git a/tests/cases/conformance/types/spread/spreadDuplicateExact.ts b/tests/cases/conformance/types/spread/spreadDuplicateExact.ts
11666new file mode 100644
11667index 0000000000..e395af4ce5
11668--- /dev/null
11669+++ b/tests/cases/conformance/types/spread/spreadDuplicateExact.ts
11670@@ -0,0 +1,22 @@
11671+// @strict: true
11672+// @exactOptionalPropertyTypes: true
11673+// @declaration: true
11674+
11675+// Repro from #44438
11676+
11677+declare let a: { a: string };
11678+declare let b: { a?: string };
11679+declare let c: { a: string | undefined };
11680+declare let d: { a?: string | undefined };
11681+
11682+declare let t: boolean;
11683+
11684+let a1 = { a: 123, ...a };  // string (Error)
11685+let b1 = { a: 123, ...b };  // string | number
11686+let c1 = { a: 123, ...c };  // string | undefined (Error)
11687+let d1 = { a: 123, ...d };  // string | number | undefined
11688+
11689+let a2 = { a: 123, ...(t ? a : {}) };  // string | number
11690+let b2 = { a: 123, ...(t ? b : {}) };  // string | number
11691+let c2 = { a: 123, ...(t ? c : {}) };  // string | number | undefined
11692+let d2 = { a: 123, ...(t ? d : {}) };  // string | number | undefined
11693diff --git a/tests/cases/conformance/types/spread/spreadUnion4.ts b/tests/cases/conformance/types/spread/spreadUnion4.ts
11694new file mode 100644
11695index 0000000000..6a39ac3a3c
11696--- /dev/null
11697+++ b/tests/cases/conformance/types/spread/spreadUnion4.ts
11698@@ -0,0 +1,4 @@
11699+declare const a: { x: () => void }
11700+declare const b: { x?: () => void }
11701+
11702+const c = { ...a, ...b };
11703diff --git a/tests/cases/conformance/types/thisType/fluentClasses.ts b/tests/cases/conformance/types/thisType/fluentClasses.ts
11704index c9e791cb6f..0aad4efe17 100644
11705--- a/tests/cases/conformance/types/thisType/fluentClasses.ts
11706+++ b/tests/cases/conformance/types/thisType/fluentClasses.ts
11707@@ -15,3 +15,5 @@ class C extends B {
11708 }
11709 var c: C;
11710 var z = c.foo().bar().baz();  // Fluent pattern
11711+let b1 = new B();
11712+let c1 = new C();
11713diff --git a/tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts b/tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts
11714index f46b251c3b..c6091fd7a2 100644
11715--- a/tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts
11716+++ b/tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts
11717@@ -19,3 +19,6 @@ class B<T extends A> {
11718         x = x.self();
11719     }
11720 }
11721+
11722+let a = new A();
11723+let b = new B();
11724diff --git a/tests/cases/conformance/types/thisType/thisTypeInClasses.ts b/tests/cases/conformance/types/thisType/thisTypeInClasses.ts
11725index 6c650341fb..0d3913de7e 100644
11726--- a/tests/cases/conformance/types/thisType/thisTypeInClasses.ts
11727+++ b/tests/cases/conformance/types/thisType/thisTypeInClasses.ts
11728@@ -47,3 +47,9 @@ class C5 {
11729         let x2 = undefined as this;
11730     }
11731 }
11732+
11733+let c1 = new C1();
11734+let c2 = new C2();
11735+let c3 = new C3();
11736+let c4 = new C4();
11737+let c5 = new C5();
11738diff --git a/tests/cases/conformance/types/thisType/thisTypeInFunctions3.ts b/tests/cases/conformance/types/thisType/thisTypeInFunctions3.ts
11739index 01d7fd0430..8fe03ac945 100644
11740--- a/tests/cases/conformance/types/thisType/thisTypeInFunctions3.ts
11741+++ b/tests/cases/conformance/types/thisType/thisTypeInFunctions3.ts
11742@@ -7,3 +7,6 @@ class Test extends Base {
11743         this.check(this);
11744     }
11745 }
11746+
11747+let te = new Test();
11748+
11749diff --git a/tests/cases/conformance/types/thisType/thisTypeInTaggedTemplateCall.ts b/tests/cases/conformance/types/thisType/thisTypeInTaggedTemplateCall.ts
11750new file mode 100644
11751index 0000000000..c46933329b
11752--- /dev/null
11753+++ b/tests/cases/conformance/types/thisType/thisTypeInTaggedTemplateCall.ts
11754@@ -0,0 +1,10 @@
11755+// @target: esnext
11756+
11757+class Foo {
11758+    static m<T>(this: new () => T, strings: TemplateStringsArray | string) {
11759+        return new this()
11760+    }
11761+}
11762+
11763+Foo.m`test`;
11764+(Foo.m)`test`;
11765diff --git a/tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts b/tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts
11766index 0f58f1971d..e03bc2a0c6 100644
11767--- a/tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts
11768+++ b/tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts
11769@@ -21,3 +21,5 @@ class A {
11770   @someDec
11771   k: readonly [string, number] = ['foo', 42];
11772 }
11773+
11774+let a = new A();
11775\ No newline at end of file
11776diff --git a/tests/cases/conformance/types/typeAliases/circularTypeAliasForUnionWithClass.ts b/tests/cases/conformance/types/typeAliases/circularTypeAliasForUnionWithClass.ts
11777index e7cca719f4..05fd3be85e 100644
11778--- a/tests/cases/conformance/types/typeAliases/circularTypeAliasForUnionWithClass.ts
11779+++ b/tests/cases/conformance/types/typeAliases/circularTypeAliasForUnionWithClass.ts
11780@@ -15,3 +15,7 @@ type T4 = string | I4;
11781 class I4 {
11782     [x: string]: T4;
11783 }
11784+
11785+let i0 = new I0();
11786+let i3 = new I3();
11787+let i4 = new I4();
11788\ No newline at end of file
11789diff --git a/tests/cases/conformance/types/typeAliases/classDoesNotDependOnBaseTypes.ts b/tests/cases/conformance/types/typeAliases/classDoesNotDependOnBaseTypes.ts
11790index 4cc3a72395..96d1b74b83 100644
11791--- a/tests/cases/conformance/types/typeAliases/classDoesNotDependOnBaseTypes.ts
11792+++ b/tests/cases/conformance/types/typeAliases/classDoesNotDependOnBaseTypes.ts
11793@@ -9,4 +9,6 @@ var x: StringTree;
11794 if (typeof x !== "string") {
11795     x[0] = "";
11796     x[0] = new StringTreeCollection;
11797-}
11798\ No newline at end of file
11799+}
11800+
11801+let s1 = new StringTreeCollection();
11802diff --git a/tests/cases/conformance/types/typeAliases/typeAliases.ts b/tests/cases/conformance/types/typeAliases/typeAliases.ts
11803index b9d28f4cc3..32eb8473bf 100644
11804--- a/tests/cases/conformance/types/typeAliases/typeAliases.ts
11805+++ b/tests/cases/conformance/types/typeAliases/typeAliases.ts
11806@@ -77,4 +77,6 @@ var x: [string, boolean];
11807 f16(x);
11808 
11809 var y: StringAndBoolean = ["1", false];
11810-y[0].toLowerCase();
11811\ No newline at end of file
11812+y[0].toLowerCase();
11813+
11814+let c7 = new C7();
11815\ No newline at end of file
11816diff --git a/tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts b/tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts
11817index 9a21c48ee1..b4a8dc7ba5 100644
11818--- a/tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts
11819+++ b/tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts
11820@@ -33,4 +33,7 @@ interface I2<T> {
11821     f(x: T): T;
11822 }
11823 var i2: I2<number>;
11824-var r7 = i2.f(1);
11825\ No newline at end of file
11826+var r7 = i2.f(1);
11827+
11828+let c1 = new C();
11829+let c2 = new C2();
11830\ No newline at end of file
11831diff --git a/tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction.ts b/tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction.ts
11832index ba1c5b003f..7490e2bd94 100644
11833--- a/tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction.ts
11834+++ b/tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction.ts
11835@@ -58,4 +58,7 @@ function foo2<T extends { (): void }, U extends { (): void }>(x: T, y: U) {
11836 //function foo2<T extends { (): void }, U extends T>(x: T, y: U) {
11837 //    foo(x);
11838 //    foo(y);
11839-//}
11840\ No newline at end of file
11841+//}
11842+
11843+let c11 = new C();
11844+let c12 = new C2();
11845\ No newline at end of file
11846diff --git a/tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction3.ts b/tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction3.ts
11847index 6c32014789..dec6cdd0bd 100644
11848--- a/tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction3.ts
11849+++ b/tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction3.ts
11850@@ -38,4 +38,7 @@ var c2: { <T>(x: T): T; <T>(x: T, y: T): T };
11851 var r9 = foo(function <U>(x: U) { return x; });
11852 var r10 = foo(<U extends string>(x: U) => x);
11853 var r12 = foo(i2);
11854-var r15 = foo(c2);
11855\ No newline at end of file
11856+var r15 = foo(c2);
11857+
11858+let c11 = new C();
11859+let c12 = new C2()
11860\ No newline at end of file
11861diff --git a/tests/cases/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne2.ts b/tests/cases/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne2.ts
11862index 60766c7e5e..4bd0b6c27f 100644
11863--- a/tests/cases/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne2.ts
11864+++ b/tests/cases/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne2.ts
11865@@ -34,4 +34,6 @@ class C2<T extends Date, U extends Date> {
11866 //        var x: U;
11867 //        x.getDate();
11868 //    }
11869-//}
11870\ No newline at end of file
11871+//}
11872+let c1 = new C();
11873+let c2 = new C2();
11874\ No newline at end of file
11875diff --git a/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints.ts b/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints.ts
11876index b89016ecff..c10bef3300 100644
11877--- a/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints.ts
11878+++ b/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints.ts
11879@@ -31,4 +31,5 @@ var b = {
11880     }
11881 }
11882 
11883-var r4 = b.foo(new Date());
11884\ No newline at end of file
11885+var r4 = b.foo(new Date());
11886+let c = new C();
11887\ No newline at end of file
11888diff --git a/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints2.ts b/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints2.ts
11889index 10f3a49884..a9992c5aa1 100644
11890--- a/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints2.ts
11891+++ b/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints2.ts
11892@@ -61,7 +61,7 @@ var a: {
11893 var r3 = a<A, A>().foo(); 
11894 var r3b = a()['foo']();
11895 // parameter supplied for type argument inference to succeed
11896-var aB = new B();
11897+// var aB = new B();
11898 var r3c = a(aB, aB).foo(); 
11899 var r3d = a(aB, aB)['foo']();
11900 
11901@@ -78,4 +78,7 @@ var b = {
11902 //    }
11903 //}
11904 
11905-var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, error
11906\ No newline at end of file
11907+var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, error
11908+
11909+let b1 = new B();
11910+let c1 = new C();
11911\ No newline at end of file
11912diff --git a/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts b/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts
11913index 6167485f1b..73a10ae071 100644
11914--- a/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts
11915+++ b/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts
11916@@ -53,4 +53,6 @@ var b = {
11917     }
11918 }
11919 
11920-var r4 = b.foo(new B()); // valid call to an invalid function
11921\ No newline at end of file
11922+var r4 = b.foo(new B()); // valid call to an invalid function
11923+let b1 = new B();
11924+let c1 = new C();
11925\ No newline at end of file
11926diff --git a/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithoutConstraints.ts b/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithoutConstraints.ts
11927index 1660d67a4e..b46569e9a4 100644
11928--- a/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithoutConstraints.ts
11929+++ b/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithoutConstraints.ts
11930@@ -28,4 +28,6 @@ var b = {
11931     }
11932 }
11933 
11934-var r4 = b.foo(1);
11935\ No newline at end of file
11936+var r4 = b.foo(1);
11937+
11938+let c = new C();
11939\ No newline at end of file
11940diff --git a/tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterUsedAsConstraint.ts b/tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterUsedAsConstraint.ts
11941index bade67badd..b9f3e54bb7 100644
11942--- a/tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterUsedAsConstraint.ts
11943+++ b/tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterUsedAsConstraint.ts
11944@@ -32,3 +32,10 @@ var a3: { <T extends Date, U extends T>(): void }
11945 var a4: { <T extends U, U extends Date>(): void }
11946 var a5: { <T extends U, U extends V, V>(): void }
11947 var a6: { <T, U extends T, V extends U>(): void }
11948+
11949+let c1 = new C();
11950+let c2 = new C2();
11951+let c3 = new C3();
11952+let c4 = new C4();
11953+let c5 = new C5();
11954+let c6 = new C6();
11955\ No newline at end of file
11956diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts
11957index cc154308a1..5dfa8f94d3 100644
11958--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts
11959+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts
11960@@ -85,4 +85,8 @@ var r3 = foo3(a); // any
11961 
11962 declare function foo18(x: {}): {};
11963 declare function foo18(x: any): any;
11964-var r3 = foo3(a); // any
11965\ No newline at end of file
11966+var r3 = foo3(a); // any
11967+
11968+let aa1 = new A();
11969+let aa2 = new A2();
11970+let ccc = new CC();
11971\ No newline at end of file
11972diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts
11973index 1c3bcc71ce..03e0089697 100644
11974--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts
11975+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts
11976@@ -38,6 +38,7 @@ function foo<T, U /*extends T*/, V extends Date>(x: T, y: U, z: V) {
11977     z = a;
11978 }
11979 
11980+let cc = new C();
11981 //function foo<T, U extends T, V extends Date>(x: T, y: U, z: V) {
11982 //    x = a;
11983 //    y = a;
11984diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts
11985index 26f3eee594..74a517176d 100644
11986--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts
11987+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts
11988@@ -127,3 +127,6 @@ interface I20 {
11989     [x: string]: {};
11990     foo: any;
11991 }
11992+let aa = new A();
11993+let aa2 = new A2()
11994+let ccc = new c();
11995\ No newline at end of file
11996diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts
11997index d7a94cc862..464edb67d3 100644
11998--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts
11999+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts
12000@@ -40,6 +40,8 @@ module SimpleTypes {
12001     a2 = b;
12002     a2 = t2;
12003     a2 = t;
12004+    let ss = new S();
12005+    let tt = new T();
12006 }
12007 
12008 module ObjectTypes {
12009@@ -81,5 +83,6 @@ module ObjectTypes {
12010     a2 = b;
12011     a2 = t2;
12012     a2 = t;
12013-
12014+    let ss = new S();
12015+    let tt = new T();
12016 }
12017\ No newline at end of file
12018diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts
12019index a45da06482..a9e3bc6141 100644
12020--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts
12021+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts
12022@@ -39,3 +39,5 @@ b2 = a2;
12023 a2 = b;
12024 a2 = t2;
12025 a2 = t;
12026+let qu1 = new S();
12027+let qu2 = new T();
12028\ No newline at end of file
12029diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts
12030index 6e9a210db4..b96693de94 100644
12031--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts
12032+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts
12033@@ -39,3 +39,5 @@ b2 = a2;
12034 a2 = b;
12035 a2 = t2;
12036 a2 = t;
12037+let qi3 = new S();
12038+let qi4 = new T();
12039\ No newline at end of file
12040diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts
12041index b25c949f42..7372988241 100644
12042--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts
12043+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts
12044@@ -39,3 +39,5 @@ b2 = a2;
12045 a2 = b;
12046 a2 = t2;
12047 a2 = t;
12048+let qi1 = new S();
12049+let qi2 = new T();
12050\ No newline at end of file
12051diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts
12052index 9e6cd52ac2..c511bfa71a 100644
12053--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts
12054+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts
12055@@ -66,4 +66,8 @@ interface I extends A {
12056     a16: <T extends Base>(x: T) => number[]; // ok
12057     a17: <T>(x: (a: T) => T) => T[]; // ok
12058     a18: <T>(x: (a: T) => T) => T[]; // ok, no inferences for T but assignable to any
12059-}
12060\ No newline at end of file
12061+}
12062+
12063+let qi14 = new Derived();
12064+let qi15 = new Derived2();
12065+let qi16 = new OtherDerived();
12066\ No newline at end of file
12067diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts
12068index dd10ee7646..bb1f737657 100644
12069--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts
12070+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts
12071@@ -46,4 +46,8 @@ interface I extends A {
12072     a16: <T>(x: { a: T; b: T }) => T[]; // ok, more general parameter type
12073     a17: <T>(x: (a: T) => T) => T[]; // ok
12074     a18: (x: <T>(a: T) => T) => any[]; // ok
12075-}
12076\ No newline at end of file
12077+}
12078+
12079+let qi14 = new Derived();
12080+let qi15 = new Derived2();
12081+let qi16 = new OtherDerived();
12082\ No newline at end of file
12083diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts
12084index bf60d6518c..ef4e179af9 100644
12085--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts
12086+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts
12087@@ -45,4 +45,7 @@ interface I extends B {
12088     a12: <T extends Array<Base>>(x: Array<Base>, y: T) => Array<Derived>; // ok, less specific parameter type
12089     a13: <T extends Array<Derived>>(x: Array<Base>, y: T) => T; // ok, T = Array<Derived>, satisfies constraint, contextual signature instantiation succeeds
12090     a14: <T, U>(x: { a: T; b: U }) => T; // ok
12091-}
12092\ No newline at end of file
12093+}
12094+let qi14 = new Derived();
12095+let qi15 = new Derived2();
12096+let qi16 = new OtherDerived();
12097\ No newline at end of file
12098diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.ts
12099index 65e4f4c962..8d842b7d7e 100644
12100--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.ts
12101+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.ts
12102@@ -66,4 +66,8 @@ interface I extends A {
12103     a16: new <T extends Base>(x: T) => number[]; // ok
12104     a17: new <T>(x: new (a: T) => T) => T[]; // ok
12105     a18: new <T>(x: new (a: T) => T) => T[]; // ok, no inferences for T but assignable to any
12106-}
12107\ No newline at end of file
12108+}
12109+
12110+let qi14 = new Derived();
12111+let qi15 = new Derived2();
12112+let qi16 = new OtherDerived();
12113\ No newline at end of file
12114diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance4.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance4.ts
12115index 9dfcf5548a..8b57d6a8c7 100644
12116--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance4.ts
12117+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance4.ts
12118@@ -56,4 +56,7 @@ interface I extends A {
12119     a18: new <T extends Base>(x: T) => number[]; // ok, more general parameter type
12120     a19: new <T extends Base>(x: new (a: T) => T) => T[]; // ok
12121     a20: new (x: new <T extends Base>(a: T) => T) => any[]; // ok
12122-}
12123\ No newline at end of file
12124+}
12125+let qi14 = new Derived();
12126+let qi15 = new Derived2();
12127+let qi16 = new OtherDerived();
12128\ No newline at end of file
12129diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.ts
12130index f33820218e..6ba5e454f6 100644
12131--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.ts
12132+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.ts
12133@@ -45,4 +45,7 @@ interface I extends B {
12134     a12: new <T extends Array<Base>>(x: Array<Base>, y: T) => Array<Derived>; // ok, less specific parameter type
12135     a13: new <T extends Array<Derived>>(x: Array<Base>, y: T) => T; // ok, T = Array<Derived>, satisfies constraint, contextual signature instantiation succeeds
12136     a14: new <T, U>(x: { a: T; b: U }) => T; // ok
12137-}
12138\ No newline at end of file
12139+}
12140+let qi14 = new Derived();
12141+let qi15 = new Derived2();
12142+let qi16 = new OtherDerived();
12143\ No newline at end of file
12144diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/everyTypeAssignableToAny.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/everyTypeAssignableToAny.ts
12145index 6c8670abaa..407e128678 100644
12146--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/everyTypeAssignableToAny.ts
12147+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/everyTypeAssignableToAny.ts
12148@@ -53,6 +53,8 @@ function foo<T, U /*extends T*/, V extends Date>(x: T, y: U, z: V) {
12149     a = y;
12150     a = z;
12151 }
12152+
12153+let ccc = new C();
12154 //function foo<T, U extends T, V extends Date>(x: T, y: U, z: V) {
12155 //    a = x;
12156 //    a = y;
12157diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignableToEveryType.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignableToEveryType.ts
12158index b0f55331d7..cc755558ff 100644
12159--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignableToEveryType.ts
12160+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignableToEveryType.ts
12161@@ -35,7 +35,7 @@ function foo<T, U, V extends Date>(x: T, y: U, z: V) {
12162     y = null;
12163     z = null;
12164 }
12165-
12166+let cc = new C();
12167 //function foo<T, U extends T, V extends Date>(x: T, y: U, z: V) {
12168 //    x = null;
12169 //    y = null;
12170diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/undefinedAssignableToEveryType.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/undefinedAssignableToEveryType.ts
12171index 5fc14274a1..f296781ef1 100644
12172--- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/undefinedAssignableToEveryType.ts
12173+++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/undefinedAssignableToEveryType.ts
12174@@ -35,6 +35,7 @@ function foo<T, U, V extends Date>(x: T, y: U, z: V) {
12175     y = undefined;
12176     z = undefined;
12177 }
12178+let cc = new C();
12179 //function foo<T, U extends T, V extends Date>(x: T, y: U, z: V) {
12180 //    x = undefined;
12181 //    y = undefined;
12182diff --git a/tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts b/tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts
12183index 5f02210478..1e1889cc10 100644
12184--- a/tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts
12185+++ b/tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts
12186@@ -23,4 +23,7 @@ var r11 = true ? base : derived2;
12187 
12188 function foo5<T, U>(t: T, u: U): Object {
12189     return true ? t : u; // BCT is Object
12190-}
12191\ No newline at end of file
12192+}
12193+
12194+let qy10 = new Derived();
12195+let qy11 = new Derived2();
12196\ No newline at end of file
12197diff --git a/tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts b/tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts
12198index 8e6f345ea4..f1512e3536 100644
12199--- a/tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts
12200+++ b/tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts
12201@@ -21,4 +21,6 @@ function foo2<T extends U, U>(t: T, u: U) { // Error for referencing own type pa
12202 
12203 function foo3<T extends U, U extends V, V>(t: T, u: U) {
12204     return true ? t : u;
12205-}
12206\ No newline at end of file
12207+}
12208+let qy8 = new Derived();
12209+let qy9 = new Derived2();
12210\ No newline at end of file
12211diff --git a/tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts b/tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts
12212index 0f498c570a..13ecea225a 100644
12213--- a/tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts
12214+++ b/tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts
12215@@ -99,6 +99,8 @@ function foo4<T extends Base, U extends Base>(t: T, u: U) {
12216 
12217     var k: Base[] = [t, u];
12218 }
12219+let qy8 = new Derived();
12220+let qy9 = new Derived2();
12221 
12222 //function foo3<T extends U, U extends Derived>(t: T, u: U) {
12223 //    var a = [t, t]; // T[]
12224diff --git a/tests/cases/conformance/types/typeRelationships/instanceOf/narrowingConstrainedTypeVariable.ts b/tests/cases/conformance/types/typeRelationships/instanceOf/narrowingConstrainedTypeVariable.ts
12225index 04623503f9..491876d8ff 100644
12226--- a/tests/cases/conformance/types/typeRelationships/instanceOf/narrowingConstrainedTypeVariable.ts
12227+++ b/tests/cases/conformance/types/typeRelationships/instanceOf/narrowingConstrainedTypeVariable.ts
12228@@ -34,3 +34,6 @@ function f3<T extends E>(v: T | { x: string }) {
12229         const y: { x: string } = v;
12230     }
12231 }
12232+let qy5 = new C();
12233+let qy6 = new D();
12234+let qy7 = new E();
12235\ No newline at end of file
12236diff --git a/tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts b/tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts
12237index e7260831a4..35de332a33 100644
12238--- a/tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts
12239+++ b/tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts
12240@@ -22,4 +22,8 @@ var ys = [list, list2]; // {}[]
12241 var zs = [list, null]; // List<number>[]
12242 
12243 var myDerivedList: DerivedList<number>;
12244-var as = [list, myDerivedList]; // List<number>[]
12245\ No newline at end of file
12246+var as = [list, myDerivedList]; // List<number>[]
12247+
12248+let li = new List();
12249+let der = new DerivedList();
12250+let my = new MyList();
12251\ No newline at end of file
12252diff --git a/tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypeInGenericConstraint.ts b/tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypeInGenericConstraint.ts
12253index ac6286bd81..e4d37f2abe 100644
12254--- a/tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypeInGenericConstraint.ts
12255+++ b/tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypeInGenericConstraint.ts
12256@@ -10,4 +10,7 @@ class D<T> {
12257     x: G<G<T>>; 
12258 }
12259 
12260-var c1 = new Foo<D<string>>(); // ok, circularity in assignment compat check causes success
12261\ No newline at end of file
12262+var c1 = new Foo<D<string>>(); // ok, circularity in assignment compat check causes success
12263+let g = new G();
12264+let foo = new Foo();
12265+let d = new D();
12266\ No newline at end of file
12267diff --git a/tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypesUsedAsFunctionParameters.ts b/tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypesUsedAsFunctionParameters.ts
12268index 6eba1f2836..6cdf1db8be 100644
12269--- a/tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypesUsedAsFunctionParameters.ts
12270+++ b/tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypesUsedAsFunctionParameters.ts
12271@@ -40,4 +40,7 @@ function other<T extends List<U>, U>() {
12272 
12273     var r = foo5(list);
12274     var r2 = foo5(myList);
12275-}
12276\ No newline at end of file
12277+}
12278+
12279+let li = new List();
12280+let my = new MyList();
12281\ No newline at end of file
12282diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts
12283index 24f2ab71d4..ced02bcefe 100644
12284--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts
12285+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts
12286@@ -88,3 +88,7 @@ var r19 = true ? null : new Object();
12287 
12288 var r20 = true ? {} : null;
12289 var r20 = true ? null : {};
12290+
12291+let c11 = new C1();
12292+let c12 = new C2();
12293+let c13 = new c();
12294diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts
12295index c7e9c0fc8e..0f00bc8c02 100644
12296--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts
12297+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts
12298@@ -97,4 +97,6 @@ function f15<T, U extends T>(x: any) { }
12299 
12300 function f16<T extends String, U extends T>(x: 'a');
12301 function f16<T extends String, U extends T>(x: U);
12302-function f16<T extends String, U extends T>(x: any) { }
12303\ No newline at end of file
12304+function f16<T extends String, U extends T>(x: any) { }
12305+
12306+let ccc = new C();
12307\ No newline at end of file
12308diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts
12309index 0e5df54319..d785a27b7b 100644
12310--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts
12311+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts
12312@@ -130,4 +130,7 @@ interface I19 {
12313 interface I20 {
12314     [x: string]: any;
12315     foo: {};
12316-}
12317\ No newline at end of file
12318+}
12319+let a1 = new A();
12320+let a2 = new A2();
12321+let c1 = new c(); 
12322\ No newline at end of file
12323diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts
12324index 9edf4f5f41..990e4b8cc5 100644
12325--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts
12326+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts
12327@@ -154,4 +154,7 @@ function f20<T extends Number>(x: T) {
12328 function f21<T extends Number>(x: T) {
12329     var r20 = true ? {} : x; // ok
12330     var r20 = true ? x : {}; // ok
12331-}
12332\ No newline at end of file
12333+}
12334+
12335+let c1 = new C1();
12336+let c2 = new C2();
12337\ No newline at end of file
12338diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures2.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures2.ts
12339index e8ae73c5fb..4a29484b12 100644
12340--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures2.ts
12341+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures2.ts
12342@@ -5,6 +5,7 @@ class Derived extends Base { bar: string; }
12343 class Derived2 extends Derived { baz: string; }
12344 class OtherDerived extends Base { bing: string; }
12345 
12346+
12347 declare function foo1(a: (x: number) => number[]): typeof a;
12348 declare function foo1(a: any): any;
12349 
12350@@ -169,3 +170,8 @@ var r17arg1 = <T>(x: (a: T) => T) => <T[]>null;
12351 var r17 = foo17(r17arg1); // any
12352 var r18arg1 = <T>(x: (a: T) => T) => <T[]>null;
12353 var r18 = foo18(r18arg1); 
12354+
12355+ 
12356+let der1 = new Derived();
12357+let der2 = new Derived2();
12358+let oth = new OtherDerived();
12359\ No newline at end of file
12360diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts
12361index 505919547f..51c890854f 100644
12362--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts
12363+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts
12364@@ -103,6 +103,10 @@ module Errors {
12365 
12366     var r9arg = <T>(x: (a: T) => T) => <any[]>null;
12367     var r9 = foo17(r9arg); // (x: { <T extends Derived >(a: T): T; <T extends Base >(a: T): T; }): any[]; (x: { <T extends Derived2>(a: T): T; <T extends Base>(a: T): T; }): any[];
12368+    let ba = new Base();
12369+    let der1 = new Derived();
12370+    let der2 = new Derived2();
12371+    let oth = new OtherDerived();
12372 }
12373 
12374 module WithGenericSignaturesInBaseType {
12375diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures4.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures4.ts
12376index e86fc51d44..e043cec402 100644
12377--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures4.ts
12378+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures4.ts
12379@@ -108,4 +108,8 @@ var r17arg = <T>(x: (a: T) => T) => <T[]>null;
12380 var r17 = foo17(r17arg);
12381 
12382 var r18arg = (x: <T>(a: T) => T) => <any[]>null;
12383-var r18 = foo18(r18arg);
12384\ No newline at end of file
12385+var r18 = foo18(r18arg);
12386+
12387+let der  =new Derived();
12388+let der2 = new Derived2();
12389+let oth = new OtherDerived();
12390\ No newline at end of file
12391diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures2.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures2.ts
12392index 46d1c9e91d..683db9f182 100644
12393--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures2.ts
12394+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures2.ts
12395@@ -169,3 +169,8 @@ var r17arg1: new <T>(x: (a: T) => T) => T[];
12396 var r17 = foo17(r17arg1); // any
12397 var r18arg1: new <T>(x: (a: T) => T) => T[];
12398 var r18 = foo18(r18arg1); 
12399+
12400+
12401+let der  =new Derived();
12402+let der2 = new Derived2();
12403+let oth = new OtherDerived();
12404\ No newline at end of file
12405diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts
12406index 215a5d1d4d..bbaddcabfc 100644
12407--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts
12408+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts
12409@@ -105,6 +105,10 @@ module Errors {
12410 
12411     var r9arg: new <T>(x: new (a: T) => T) => any[];
12412     var r9 = foo17(r9arg); // // (x: { <T extends Derived >(a: T): T; <T extends Base >(a: T): T; }): any[]; (x: { <T extends Derived2>(a: T): T; <T extends Base>(a: T): T; }): any[];
12413+    let ba = new Base();
12414+    let der1 = new Derived();
12415+    let der2 = new Derived2();
12416+    let oth = new OtherDerived();
12417 }
12418 
12419 module WithGenericSignaturesInBaseType {
12420diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures4.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures4.ts
12421index 830139d3fa..5d5145d29d 100644
12422--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures4.ts
12423+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures4.ts
12424@@ -108,4 +108,8 @@ var r17arg: new <T>(x: new (a: T) => T) => T[];
12425 var r17 = foo17(r17arg);
12426 
12427 var r18arg: new (x: new <T>(a: T) => T) => any[];
12428-var r18 = foo18(r18arg);
12429\ No newline at end of file
12430+var r18 = foo18(r18arg);
12431+
12432+let der  =new Derived();
12433+let der2 = new Derived2();
12434+let oth = new OtherDerived();
12435\ No newline at end of file
12436diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures5.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures5.ts
12437index f33820218e..f3c1c5d20d 100644
12438--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures5.ts
12439+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures5.ts
12440@@ -6,6 +6,7 @@ class Derived extends Base { bar: string; }
12441 class Derived2 extends Derived { baz: string; }
12442 class OtherDerived extends Base { bing: string; }
12443 
12444+
12445 interface A { // T
12446     // M's
12447     a: new (x: number) => number[];
12448@@ -45,4 +46,7 @@ interface I extends B {
12449     a12: new <T extends Array<Base>>(x: Array<Base>, y: T) => Array<Derived>; // ok, less specific parameter type
12450     a13: new <T extends Array<Derived>>(x: Array<Base>, y: T) => T; // ok, T = Array<Derived>, satisfies constraint, contextual signature instantiation succeeds
12451     a14: new <T, U>(x: { a: T; b: U }) => T; // ok
12452-}
12453\ No newline at end of file
12454+}
12455+let der  =new Derived();
12456+let der2 = new Derived2();
12457+let oth = new OtherDerived();
12458diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.ts
12459index b50e1f7106..2c99af9515 100644
12460--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.ts
12461+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.ts
12462@@ -30,4 +30,8 @@ class A3 {
12463 
12464 class B3 extends A3 {
12465     '1.1': Derived; // ok, inherits '1'
12466-}
12467\ No newline at end of file
12468+}
12469+let der = new Derived();
12470+let b1 = new B();
12471+let b2 = new B2();
12472+let b3 = new B3();
12473\ No newline at end of file
12474diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts
12475index 7ee0906ee2..08c7e7d192 100644
12476--- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts
12477+++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts
12478@@ -118,3 +118,28 @@ class D16 extends Base {
12479 class D17 extends Base {
12480     foo: {};
12481 }
12482+
12483+
12484+let d0 = new D0();
12485+let da = new DA();
12486+let d1 = new D1()
12487+let d1a = new D1A()
12488+let d2 = new D2()
12489+let d2a = new D2A()
12490+let d3 = new D3()
12491+let d3a = new D1A()
12492+let d4 = new D4()
12493+let d5 = new D5()
12494+let d6 = new D6()
12495+let d7 = new D7()
12496+let d8 = new D8()
12497+let d9 = new D9()
12498+let d10 = new D10()
12499+let d11 = new D11()
12500+let d12 = new D12()
12501+let c1 = new c()
12502+let d13 = new D13()
12503+let d14 = new D14()
12504+let d15 = new D15()
12505+let d16 = new D16()
12506+let d17 = new D17()
12507diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity.ts
12508index 225a974181..acf6300dba 100644
12509--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity.ts
12510+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity.ts
12511@@ -85,4 +85,8 @@ function foo13(x: any) { }
12512 
12513 function foo14(x: I);
12514 function foo14(x: typeof b); // error
12515-function foo14(x: any) { }
12516\ No newline at end of file
12517+function foo14(x: any) { }
12518+
12519+let a1 = new A();
12520+let b1 = new B();
12521+let c1 = new C();
12522\ No newline at end of file
12523diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity2.ts
12524index fefde23a69..2427d26180 100644
12525--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity2.ts
12526+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity2.ts
12527@@ -62,4 +62,7 @@ function foo13(x: any) { }
12528 
12529 function foo14(x: I);
12530 function foo14(x: typeof b); // ok
12531-function foo14(x: any) { }
12532\ No newline at end of file
12533+function foo14(x: any) { }
12534+let aa = new A();
12535+let bb = new B();
12536+let cc = new C();
12537\ No newline at end of file
12538diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures.ts
12539index 94038f6df9..bb5d06c3fc 100644
12540--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures.ts
12541+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures.ts
12542@@ -97,4 +97,7 @@ function foo14(x: any) { }
12543 
12544 function foo15(x: I2<string>);
12545 function foo15(x: C<number>); // ok
12546-function foo15(x: any) { }
12547\ No newline at end of file
12548+function foo15(x: any) { }
12549+let qy17 = new A();
12550+let qy18 = new B();
12551+let qy19 = new C();
12552\ No newline at end of file
12553diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures2.ts
12554index 699f0f73f7..99aafb4b8a 100644
12555--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures2.ts
12556+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures2.ts
12557@@ -97,4 +97,7 @@ function foo14(x: any) { }
12558 
12559 function foo15(x: I2<string>);
12560 function foo15(x: C<number>); // ok
12561-function foo15(x: any) { }
12562\ No newline at end of file
12563+function foo15(x: any) { }
12564+let aa = new A();
12565+let bb = new B();
12566+let cc = new C();
12567\ No newline at end of file
12568diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesDifferingParamCounts.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesDifferingParamCounts.ts
12569index b62b558d06..8a23c2c1bd 100644
12570--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesDifferingParamCounts.ts
12571+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesDifferingParamCounts.ts
12572@@ -97,4 +97,7 @@ function foo14(x: any) { }
12573 
12574 function foo15(x: I2<string>);
12575 function foo15(x: C<number>); // ok
12576-function foo15(x: any) { }
12577\ No newline at end of file
12578+function foo15(x: any) { }
12579+let aa = new A();
12580+let bb = new B();
12581+let cc = new C();
12582\ No newline at end of file
12583diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesWithOverloads.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesWithOverloads.ts
12584index 0aaf7c30f2..cc561aa934 100644
12585--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesWithOverloads.ts
12586+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesWithOverloads.ts
12587@@ -113,4 +113,8 @@ function foo14(x: any) { }
12588 
12589 function foo15(x: I2<string>);
12590 function foo15(x: C<number>); // ok
12591-function foo15(x: any) { }
12592\ No newline at end of file
12593+function foo15(x: any) { }
12594+
12595+let aa = new A();
12596+let bb = new B();
12597+let cc = new C();
12598\ No newline at end of file
12599diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures.ts
12600index efec6a715b..964c2a9d43 100644
12601--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures.ts
12602+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures.ts
12603@@ -84,4 +84,8 @@ function foo13(x: any) { }
12604 
12605 function foo15(x: I2<string>);
12606 function foo15(x: C<number>); // ok
12607-function foo15(x: any) { }
12608\ No newline at end of file
12609+function foo15(x: any) { }
12610+
12611+let a1 = new A('1');
12612+let b1 = new B('1');
12613+let c1 = new C(1);
12614\ No newline at end of file
12615diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures2.ts
12616index 63e5167a4c..09f632da93 100644
12617--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures2.ts
12618+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures2.ts
12619@@ -73,4 +73,6 @@ function foo14(x: any) { }
12620 
12621 function foo15(x: I2<string>);
12622 function foo15(x: C<number>); // ok
12623-function foo15(x: any) { }
12624\ No newline at end of file
12625+function foo15(x: any) { }
12626+let qy38 = new B(null);
12627+let qy39 =new C(null);
12628\ No newline at end of file
12629diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.ts
12630index b8fc424b21..b6af7ec955 100644
12631--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.ts
12632+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.ts
12633@@ -73,4 +73,6 @@ function foo14(x: any) { }
12634 
12635 function foo15(x: I2<string>);
12636 function foo15(x: C<number>); // ok
12637-function foo15(x: any) { }
12638\ No newline at end of file
12639+function foo15(x: any) { }
12640+let qo23 =new B(null,null);
12641+let qo24 =new C(null,null);
12642\ No newline at end of file
12643diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures.ts
12644index d95bc486df..72019e6b9a 100644
12645--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures.ts
12646+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures.ts
12647@@ -97,4 +97,8 @@ function foo14(x: any) { }
12648 
12649 function foo15(x: I2);
12650 function foo15(x: C<number>); // ok
12651-function foo15(x: any) { }
12652\ No newline at end of file
12653+function foo15(x: any) { }
12654+
12655+let a1 = new A();
12656+let b1 = new B();
12657+let c1 = new C();
12658\ No newline at end of file
12659diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures2.ts
12660index 5c009926a0..099927c132 100644
12661--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures2.ts
12662+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures2.ts
12663@@ -97,4 +97,8 @@ function foo14(x: any) { }
12664 
12665 function foo15(x: I2);
12666 function foo15(x: C<string, number>); // ok
12667-function foo15(x: any) { }
12668\ No newline at end of file
12669+function foo15(x: any) { }
12670+
12671+let a1 = new A();
12672+let b1 = new B();
12673+let c1 = new C();
12674diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts
12675index ede6da4040..21f9ed1933 100644
12676--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts
12677+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts
12678@@ -99,4 +99,8 @@ function foo14(x: any) { }
12679 
12680 function foo15(x: I2);
12681 function foo15(x: C<String>); // ok
12682-function foo15(x: any) { }
12683\ No newline at end of file
12684+function foo15(x: any) { }
12685+
12686+let a1 = new A();
12687+let b1 = new B();
12688+let c1 = new C();
12689diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts
12690index 5fb315c4da..c0ce245917 100644
12691--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts
12692+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts
12693@@ -111,4 +111,8 @@ function foo14(x: any) { }
12694 
12695 function foo15(x: I2);
12696 function foo15(x: C<String, String>); // ok
12697-function foo15(x: any) { }
12698\ No newline at end of file
12699+function foo15(x: any) { }
12700+let a1 = new A();
12701+let b1 = new B();
12702+let c1 = new C();
12703+let d1 = new D();
12704\ No newline at end of file
12705diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts
12706index aaae2cbf33..b341b1f6c2 100644
12707--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts
12708+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts
12709@@ -120,4 +120,11 @@ function foo14(x: any) { }
12710 
12711 function foo15(x: I2);
12712 function foo15(x: C<Three, Three>); // ok
12713-function foo15(x: any) { }
12714\ No newline at end of file
12715+function foo15(x: any) { }
12716+
12717+let one = new One();
12718+let two = new Two();
12719+let a1 = new A();
12720+let b1 = new B();
12721+let c1 = new C();
12722+let d1 = new D();
12723\ No newline at end of file
12724diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts
12725index 97a657606e..ab7da883ec 100644
12726--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts
12727+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts
12728@@ -99,4 +99,7 @@ function foo14(x: any) { }
12729 
12730 function foo15(x: I2);
12731 function foo15(x: C<number>); // ok
12732-function foo15(x: any) { }
12733\ No newline at end of file
12734+function foo15(x: any) { }
12735+let qy12 = new A();
12736+let qy13 = new B();
12737+let qy14 = new C();
12738diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts
12739index df7533d906..5e419a9b14 100644
12740--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts
12741+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts
12742@@ -99,4 +99,8 @@ function foo14(x: any) { }
12743 
12744 function foo15(x: I2);
12745 function foo15(x: C<Date>); // ok
12746-function foo15(x: any) { }
12747\ No newline at end of file
12748+function foo15(x: any) { }
12749+
12750+let qo27 = new A();
12751+let qo28 =new B();
12752+let qo29 =new C();
12753\ No newline at end of file
12754diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts
12755index e3bd868941..1bda87ea35 100644
12756--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts
12757+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts
12758@@ -97,4 +97,8 @@ function foo14(x: any) { }
12759 
12760 function foo15(x: I2);
12761 function foo15(x: C<number, B<string, string>, B<number, string>>); // ok
12762-function foo15(x: any) { }
12763\ No newline at end of file
12764+function foo15(x: any) { }
12765+
12766+let a1 = new A();
12767+let b1 = new B();
12768+let c1 = new C();
12769diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.ts
12770index 9e01aaec49..9b74d14cfc 100644
12771--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.ts
12772+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.ts
12773@@ -97,4 +97,7 @@ function foo14(x: any) { }
12774 
12775 function foo15(x: I2);
12776 function foo15(x: C<number>); // ok
12777-function foo15(x: any) { }
12778\ No newline at end of file
12779+function foo15(x: any) { }
12780+let qo17 = new A();
12781+let qo18 =new B();
12782+let qo19 =new C();
12783\ No newline at end of file
12784diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams.ts
12785index c5454cc41e..781a351188 100644
12786--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams.ts
12787+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams.ts
12788@@ -99,4 +99,7 @@ function foo14(x: any) { }
12789 
12790 function foo15(x: I2);
12791 function foo15(x: C<number>); // ok
12792-function foo15(x: any) { }
12793\ No newline at end of file
12794+function foo15(x: any) { }
12795+let qo9 = new A();
12796+let qo10 = new B();
12797+let qo11 = new C();
12798\ No newline at end of file
12799diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts
12800index b8620f04d1..ca2a5abb87 100644
12801--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts
12802+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts
12803@@ -99,4 +99,7 @@ function foo14(x: any) { }
12804 
12805 function foo15(x: I2);
12806 function foo15(x: C<string, number>); // ok
12807-function foo15(x: any) { }
12808\ No newline at end of file
12809+function foo15(x: any) { }
12810+let a1 = new A();
12811+let b1 = new B();
12812+let c1 = new C();
12813\ No newline at end of file
12814diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.ts
12815index f39d23637a..828b26331c 100644
12816--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.ts
12817+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.ts
12818@@ -99,4 +99,8 @@ function foo14(x: any) { }
12819 
12820 function foo15(x: I2);
12821 function foo15(x: C<string, number>); // ok
12822-function foo15(x: any) { }
12823\ No newline at end of file
12824+function foo15(x: any) { }
12825+
12826+let a1 = new A();
12827+let b1 = new B();
12828+let c1 = new C();
12829\ No newline at end of file
12830diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts
12831index 974f53cb9c..8d1aa46bde 100644
12832--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts
12833+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts
12834@@ -72,3 +72,5 @@ function foo13(x: any) { }
12835 function foo14(x: I<Number>);
12836 function foo14(x: typeof b); // ok
12837 function foo14(x: any) { }
12838+let qo15 = new B(null);
12839+let qo16 = new C(null);
12840\ No newline at end of file
12841diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts
12842index 47bab5dab8..963aabc746 100644
12843--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts
12844+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts
12845@@ -83,4 +83,9 @@ function foo13(x: any) { }
12846 
12847 function foo14(x: I<Number, Number>);
12848 function foo14(x: typeof b); // ok
12849-function foo14(x: any) { }
12850\ No newline at end of file
12851+function foo14(x: any) { }
12852+
12853+var aa = []
12854+let b1 = new B(aa,aa);
12855+let c1 = new C('','');
12856+let d1 = new D(1,1);
12857\ No newline at end of file
12858diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts
12859index 14f4933a15..b593e623e5 100644
12860--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts
12861+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts
12862@@ -92,4 +92,9 @@ function foo13(x: any) { }
12863 
12864 function foo14(x: I<Five<string>, Five<string>>);
12865 function foo14(x: typeof b); // ok
12866-function foo14(x: any) { }
12867\ No newline at end of file
12868+function foo14(x: any) { }
12869+let qo1 = new One();
12870+let qo2 = new Two();
12871+let qo3 = new B(null,null);
12872+let qo4 = new C(null,null);
12873+let qo5 = new D(null,null);
12874\ No newline at end of file
12875diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts
12876index 9c072e8936..185dab627d 100644
12877--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts
12878+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts
12879@@ -79,4 +79,6 @@ function foo14(x: any) { }
12880 
12881 function foo15(x: I2);
12882 function foo15(x: C<number>); // ok
12883-function foo15(x: any) { }
12884\ No newline at end of file
12885+function foo15(x: any) { }
12886+let qy49 =new B(null);
12887+let qy50 =new C(null);
12888\ No newline at end of file
12889diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts
12890index 2e0a98d557..9e63b81350 100644
12891--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts
12892+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts
12893@@ -75,4 +75,8 @@ function foo14(x: any) { }
12894 
12895 function foo15(x: I2);
12896 function foo15(x: C<Date>); // ok
12897-function foo15(x: any) { }
12898\ No newline at end of file
12899+function foo15(x: any) { }
12900+
12901+var aa;
12902+let b1 = new B(aa);
12903+let c1 = new C(aa);
12904\ No newline at end of file
12905diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts
12906index fe01df2564..8caa853954 100644
12907--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts
12908+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts
12909@@ -69,4 +69,6 @@ function foo13(x: any) { }
12910 
12911 function foo14(x: I<string, Date, RegExp, boolean>);
12912 function foo14(x: typeof b); // ok
12913-function foo14(x: any) { }
12914\ No newline at end of file
12915+function foo14(x: any) { }
12916+let qo6 = new B(null);
12917+let qo7 = new C(null);
12918\ No newline at end of file
12919diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.ts
12920index 20d7dbab13..7573f3e8b4 100644
12921--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.ts
12922+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.ts
12923@@ -69,4 +69,8 @@ function foo13(x: any) { }
12924 
12925 function foo14(x: I<string>);
12926 function foo14(x: typeof b); // ok
12927-function foo14(x: any) { }
12928\ No newline at end of file
12929+function foo14(x: any) { }
12930+
12931+
12932+let b1 = new B(a);
12933+let c1 = new C(a);
12934diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.ts
12935index 56dc5a051c..2caea04bc0 100644
12936--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.ts
12937+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.ts
12938@@ -71,4 +71,7 @@ function foo13(x: any) { }
12939 
12940 function foo14(x: I<string>);
12941 function foo14(x: typeof b); // ok
12942-function foo14(x: any) { }
12943\ No newline at end of file
12944+function foo14(x: any) { }
12945+
12946+let b1 = new B(a);
12947+let c1 = new C(a);
12948diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.ts
12949index 6c4a282228..d9e2b8c184 100644
12950--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.ts
12951+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.ts
12952@@ -71,4 +71,7 @@ function foo13(x: any) { }
12953 
12954 function foo14(x: I<string, number>);
12955 function foo14(x: typeof b); // ok
12956-function foo14(x: any) { }
12957\ No newline at end of file
12958+function foo14(x: any) { }
12959+
12960+let b1 = new B(a);
12961+let c1 = new C(a);
12962diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.ts
12963index 8c9a08137f..0683e8d40b 100644
12964--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.ts
12965+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.ts
12966@@ -71,4 +71,6 @@ function foo13(x: any) { }
12967 
12968 function foo14(x: I<string, number>);
12969 function foo14(x: typeof b); // ok
12970-function foo14(x: any) { }
12971\ No newline at end of file
12972+function foo14(x: any) { }
12973+let qy15 = new B(null,null);
12974+let qy16 = new C(null,null);
12975\ No newline at end of file
12976diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers1.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers1.ts
12977index 867199d905..0c6b2ca24b 100644
12978--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers1.ts
12979+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers1.ts
12980@@ -119,3 +119,6 @@ function foo16(x: I);
12981 function foo16(x: PB); // error
12982 function foo16(x: any) { }
12983 
12984+let c1 = new C();
12985+let pa = new PA();
12986+let pb = new PB();
12987\ No newline at end of file
12988diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers2.ts
12989index ea9d7d04ee..bf735eb8a5 100644
12990--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers2.ts
12991+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers2.ts
12992@@ -122,3 +122,8 @@ function foo16(x: I);
12993 function foo16(x: PB); // error
12994 function foo16(x: any) { }
12995 
12996+
12997+let der = new Derived()
12998+let c1 = new C();
12999+let pa = new PA();
13000+let pb = new PB();
13001\ No newline at end of file
13002diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers3.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers3.ts
13003index d3f22604c4..337ac0b542 100644
13004--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers3.ts
13005+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers3.ts
13006@@ -119,3 +119,6 @@ function foo16(x: I);
13007 function foo16(x: PB); // error
13008 function foo16(x: any) { }
13009 
13010+let qo32 =new C();
13011+let qo30 = new PA();
13012+let qo31 =new PB();
13013diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithOptionality.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithOptionality.ts
13014index 7c24195105..21be3c5930 100644
13015--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithOptionality.ts
13016+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithOptionality.ts
13017@@ -53,4 +53,8 @@ function foo13(x: any) { }
13018 
13019 function foo14(x: I);
13020 function foo14(x: typeof b); // ok
13021-function foo14(x: any) { }
13022\ No newline at end of file
13023+function foo14(x: any) { }
13024+
13025+let a1 = new A();
13026+let b1 = new B();
13027+let c1 = new C();
13028diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates.ts
13029index b9e390158c..fe547befb2 100644
13030--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates.ts
13031+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates.ts
13032@@ -116,4 +116,6 @@ function foo15(x: any) { }
13033 function foo16(x: I);
13034 function foo16(x: PB); // no error
13035 function foo16(x: any) { }
13036-
13037+let qo26 =new C();
13038+let qo24 = new PA();
13039+let qo25 =new PB();
13040diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates2.ts
13041index 769e59f06d..403c1692d7 100644
13042--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates2.ts
13043+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates2.ts
13044@@ -35,3 +35,4 @@ function foo6(x: D<number>): string; // error
13045 function foo6(x: any): any { }
13046 
13047 
13048+let d1 = new D();
13049diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPublics.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPublics.ts
13050index 813a8333e5..6f12d3d4e0 100644
13051--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPublics.ts
13052+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPublics.ts
13053@@ -85,4 +85,7 @@ function foo13(x: any) { }
13054 
13055 function foo14(x: I);
13056 function foo14(x: typeof b); // error
13057-function foo14(x: any) { }
13058\ No newline at end of file
13059+function foo14(x: any) { }
13060+let qy41 = new A();
13061+let qy42 =new B();
13062+let qy43 =new C();
13063\ No newline at end of file
13064diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers.ts
13065index f511e56bc3..e6d583aa06 100644
13066--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers.ts
13067+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers.ts
13068@@ -119,3 +119,6 @@ function foo16(x: I);
13069 function foo16(x: PB); // error
13070 function foo16(x: any) { }
13071 
13072+let qo35 =new C();
13073+let qo33 = new PA();
13074+let qo34 =new PB();
13075diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers2.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers2.ts
13076index d8af511910..7c37adc723 100644
13077--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers2.ts
13078+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers2.ts
13079@@ -122,3 +122,8 @@ function foo16(x: I);
13080 function foo16(x: PB); // error
13081 function foo16(x: any) { }
13082 
13083+
13084+let der = new Derived();
13085+let c1 = new C();
13086+let pa = new PA();
13087+let pb = new PB();
13088diff --git a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/typeParametersAreIdenticalToThemselves.ts b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/typeParametersAreIdenticalToThemselves.ts
13089index 0495789326..383623ee14 100644
13090--- a/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/typeParametersAreIdenticalToThemselves.ts
13091+++ b/tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/typeParametersAreIdenticalToThemselves.ts
13092@@ -73,4 +73,6 @@ interface I2<T extends Date> {
13093 
13094     foo3<T>(x: T);
13095     foo3<T>(x: T); // no error, different declaration for each T
13096-}
13097\ No newline at end of file
13098+}
13099+let qy36 = new C();
13100+let qy37 =new C2();
13101\ No newline at end of file
13102diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts
13103index 601f790667..b8526977ef 100644
13104--- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts
13105+++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts
13106@@ -104,3 +104,6 @@ var r8b = i.foo5(d2, d2); // Derived2
13107 var r9 = i.foo6(); // Derived
13108 var r10 = i.foo7(d1); // Base
13109 var r11 = i.foo8(); // Base
13110+
13111+let qu12 = new Derived();
13112+let qu13 = new Derived2();
13113\ No newline at end of file
13114diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments4.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments4.ts
13115index 3d68ff7a0d..74c3573627 100644
13116--- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments4.ts
13117+++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments4.ts
13118@@ -19,4 +19,6 @@ var b: {
13119     new<T>(x: T): any;
13120 }
13121 
13122-var r2 = foo4(b); // T is {} (candidates boolean and {}), U is any (candidates any and {})
13123\ No newline at end of file
13124+var r2 = foo4(b); // T is {} (candidates boolean and {}), U is any (candidates any and {})
13125+let qy3 = new C();
13126+let qy4 =new D();
13127\ No newline at end of file
13128diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs2.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs2.ts
13129index 514df351cc..52f1c5e20f 100644
13130--- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs2.ts
13131+++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs2.ts
13132@@ -29,4 +29,6 @@ interface I<T, U> {
13133 }
13134 
13135 var i: I<Base, Derived>;
13136-var r4 = f2(i); // Base => Derived
13137\ No newline at end of file
13138+var r4 = f2(i); // Base => Derived
13139+let qy0 = new Derived();
13140+let qy1 = new Derived2();
13141\ No newline at end of file
13142diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints.ts
13143index e1c91529d7..475dfe3dcb 100644
13144--- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints.ts
13145+++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints.ts
13146@@ -19,8 +19,8 @@ function foo<T extends { x: string }>(t: X<T>, t2: X<T>) {
13147     return x;
13148 }
13149 
13150-var c1 = new X<C>();
13151-var d1 = new X<D>();
13152+// var c1 = new X<C>();
13153+// var d1 = new X<D>();
13154 var r = foo(c1, d1); 
13155 var r2 = foo(c1, c1);
13156 
13157@@ -30,4 +30,8 @@ function foo2<T extends C>(t: X<T>, t2: X<T>) {
13158 }
13159 
13160 var r = foo2(c1, d1); 
13161-var r2 = foo2(c1, c1);
13162\ No newline at end of file
13163+var r2 = foo2(c1, c1);
13164+
13165+let qu4 = new C();
13166+let qu5 = new D();
13167+let qu6 = new X();
13168\ No newline at end of file
13169diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints2.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints2.ts
13170index c97915eaf1..5f7fee7daf 100644
13171--- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints2.ts
13172+++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints2.ts
13173@@ -35,3 +35,4 @@ var r5 = f3(new Derived(), x => x);
13174 
13175 var r6 = f3(null, null); // any
13176 var r7 = f3(null, x => x); // any
13177+let qu8 = new Derived();
13178\ No newline at end of file
13179diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts
13180index 1c29b3822b..a52b2b835e 100644
13181--- a/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts
13182+++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts
13183@@ -37,6 +37,8 @@ module Class {
13184     var g2: G2<D>;
13185     var r = g2.foo2(c1, d1);
13186     var r2 = g2.foo2(c1, c1);
13187+    var gg1 = new G();
13188+    var gg2 = new G2();
13189 }
13190 
13191 module Interface {
13192@@ -57,4 +59,7 @@ module Interface {
13193     var g2: G2<D>;
13194     var r = g2.foo2(c1, d1);
13195     var r2 = g2.foo2(c1, c1);
13196-}
13197\ No newline at end of file
13198+}
13199+let c = new C();
13200+let d = new D();
13201+let x = new X();
13202\ No newline at end of file
13203diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/keyofInferenceLowerPriorityThanReturn.ts b/tests/cases/conformance/types/typeRelationships/typeInference/keyofInferenceLowerPriorityThanReturn.ts
13204index 9de110bd1e..7a24403769 100644
13205--- a/tests/cases/conformance/types/typeRelationships/typeInference/keyofInferenceLowerPriorityThanReturn.ts
13206+++ b/tests/cases/conformance/types/typeRelationships/typeInference/keyofInferenceLowerPriorityThanReturn.ts
13207@@ -44,3 +44,7 @@ function insertOnConflictDoNothing<Req extends object, Def extends object>(_tabl
13208 function f() {
13209     insertOnConflictDoNothing(bookTable, ConflictTarget.tableColumns(["serial"]));  // <-- No error here; should use the type inferred for the return type of `tableColumns`
13210 }
13211+let qu9 = new Write();
13212+let qu10 = new Col();
13213+let qu11 =new Table();
13214+let qu12 =new ConflictTarget();
13215\ No newline at end of file
13216diff --git a/tests/cases/conformance/types/union/discriminatedUnionTypes3.ts b/tests/cases/conformance/types/union/discriminatedUnionTypes3.ts
13217new file mode 100644
13218index 0000000000..a5e51271bc
13219--- /dev/null
13220+++ b/tests/cases/conformance/types/union/discriminatedUnionTypes3.ts
13221@@ -0,0 +1,19 @@
13222+// @strict: true
13223+
13224+// Repro from #44435
13225+
13226+type Correct = {
13227+	code: string
13228+	property: true
13229+	err: undefined
13230+}
13231+type Err = {
13232+	err: `${string} is wrong!`
13233+}
13234+type SomeReturnType = Correct | Err;
13235+
13236+const example: SomeReturnType = {} as SomeReturnType;
13237+
13238+if (example.err === undefined) {
13239+	example.property;  // true
13240+}
13241\ No newline at end of file
13242-- 
132432.17.1
13244
13245