TypeScript/tests/cases/conformance
Anders Hejlsberg be4b814a4c
Reduce intersections by discriminants (#36696)
* Treat never-like intersections as never

* Accept new baselines

* Fix compiler issues revealed by increased intersection correctness

* Delete fourslash tests that are no longer applicable

* Include isNeverLikeIntersection check in getNormalizedType

* Erase never-like types in several more places

* Check that base types are not never-like

* Add comments

* Revert isNeverLikeType check in getIndexType (keyof shouldn't resolve member types)

* Introduce getReducedType for union and intersection types

* Don't reduce in getApparentType

* Avoid relationship check in resolveMappedTypeMembers

* Accept new baselines

* Don't call getReducedType in getIndexType

* Ensure reduced and unreduced forms of a type can compare identical

* Reduce types before converting them to string representation

* Accept new baselines

* Reduce intersections before obtaining keyof X

* Add tests

* Accept new baselines

* Fix comment in tests

* Don't infer from empty intersection types

* Add tests

* Accept new baselines

* Defer instantiation of mapped type property types

* Accept new baselines

* Include more precise type in diagnostic

* Accept new baselines

* Minor optimization

* Improve error message

* Optional properties in intersections are never discriminants
2020-02-28 17:06:44 -08:00
..
ambient Add bad test case 2019-04-24 08:44:24 -07:00
async Prevent substitution of 'super' in async super helper 2019-03-19 11:35:18 -07:00
classes Exempt ambient private properties from noImplicitAny (#36640) 2020-02-14 15:01:18 -08:00
constEnums fix compiler crash (#25925) 2019-04-25 10:51:36 -07:00
controlFlow Include super.XXX(...) assertion method calls in CFA (#36293) 2020-01-22 11:21:11 -08:00
declarationEmit Merge branch 'master' into attach_property_to_default_export 2019-03-22 17:40:37 +08:00
decorators Change the type of 'uriComponent' (passed to 'encodeURIComponent') from 'string' to 'string | number | boolean'. Fixes #18159 (#31103) 2019-04-26 13:07:14 -07:00
dynamicImport Add module: es2020 (#33893) 2019-12-20 16:29:49 -08:00
emitter Merge branch 'master' into es2019 2019-02-07 10:08:26 +09:00
enums disallow 'await' and 'yield' in property and enum member initializer (#34892) 2019-11-14 17:44:48 -08:00
es6 Fix initialization error when destructuring from object literal that includes a spread assignment (#36865) 2020-02-19 08:28:12 -08:00
es7 Allow trailing commas after-rest elements in destructuring 2018-06-04 14:58:30 -07:00
es2017 Fix #21089: Do not infer from numeric index signature in Object.values and Object.entries (#21129) 2018-01-17 14:16:11 -08:00
es2018 add support for Lift Template Literal Restriction (#23801) 2020-02-05 08:59:51 -08:00
es2019 Fix crash when exporting+aliasing globalThis inside declare global (#34408) 2019-10-15 14:05:39 -07:00
es2020/modules Implement export as namespace from (#34903) 2019-12-20 16:00:20 -08:00
expressions Private named instance fields (#30829) 2019-12-27 13:07:35 -08:00
externalModules Grammar error on export type * (#37064) 2020-02-27 16:35:15 -08:00
functions Fix ThisParameterType<T> type (#36013) 2020-01-06 08:55:34 -10:00
generators Get contextual type of yield from contextual signature of containing function (#32433) 2019-07-16 17:16:21 -07:00
interfaces getConstraintDeclaration gets the first declaration with a constraint… (#33426) 2019-09-18 13:56:24 -07:00
internalModules
jsdoc Adding support for @implements. (#36292) 2020-02-27 09:27:37 -08:00
jsx Error when property is specified more than once via a spread (#36727) 2020-02-11 10:23:15 -08:00
moduleResolution Fix handling of empty 'types', 'typings', etc. fields in package.json (#31539) 2019-05-23 17:19:32 -07:00
parser fix spelling errors (#36523) 2020-01-30 13:39:54 -08:00
references
salsa Fix getEffectiveTypeAnnotationNode 2020-01-03 22:47:17 -05:00
scanner Add error message for keywords with escapes in them (#32718) 2019-08-12 16:00:38 -07:00
statements Reset error record in downlevel for-of (#31519) 2019-05-22 11:18:07 -07:00
Symbols
types Reduce intersections by discriminants (#36696) 2020-02-28 17:06:44 -08:00
typings Only suggest adding to types if present in compilerOptions 2018-10-30 21:31:22 +01:00
fixSignatureCaching.ts Property assignments in Typescript (#26368) 2018-08-15 15:25:25 -07:00
inferFromBindingPattern.ts Make no inferences from binding patterns with no defaults (#35454) 2019-12-05 07:09:45 -08:00