TypeScript/tests/cases/conformance
Andrew Branch 3b396e6124 Type-only imports and exports (#35200)
* Add type-only support for export declarations

* Use a synthetic type alias instead of binding type-only exports as a type alias

* Works for re-exports!

* isolatedModules works fine

* Diagnostic for type-only exporting a value

* Start isolated modules codefix

* Update for LKG control flow changes

* Type-only import clause parsing

* Type-only default import checking

* Type-only named imports

* Fix isolated modules error

* Filter namespaces down to type-only

* Fix class references

* Test nested namespaces

* Test circular type-only imports/exports

* Fix getTypeAtLocation for type-only import/export specifiers

* Fix type-only generic imports

* Update public APIs

* Remove unused WIP comment

* Type-only namespace imports

* Fix factory update calls

* Add grammar errors for JS usage and mixing default and named bindings

* Update updateExportDeclaration API baseline

* Fix grammar checking import clauses

* Enums, sort of

* Dedicated error for type-only enum

* Skip past type-only alias symbols in quick info

* Update error code in baseline

* WIP: convertToTypeOnlyExport

* isolatedModules codefix (single export declaration)

* isolatedModules code fix (all)

* Stop eliding non-type-only imports by default, add compiler flag

* Update to match updated diagnostic messages

* Update more baselines

* Update more tests

* Auto-import as type-only

* Add codefix for splitting type-only import with default and named bindings

* Add more services tests

* Add targeted error message for "export type T;" when T exists

* Add targeted error for "import type T = require(...)"

* Flip emit flag

* Add test for preserveUnusedImports option

* Fix flag flip on import =

* Make compiler option string-valued

* Fix merge conflicts

* Add --importsNotUsedAsValue=error

* Phrasing of messages.

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2020-01-03 14:39:32 -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 Private named instance fields (#30829) 2019-12-27 13:07:35 -08:00
constEnums fix compiler crash (#25925) 2019-04-25 10:51:36 -07:00
controlFlow Properly analyze switch statement bypass control flow (#35087) 2019-11-13 09:22:18 -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 Private named instance fields (#30829) 2019-12-27 13:07:35 -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 Change esnext.promise to es2018.promise (#22292) 2018-03-02 17:08:36 -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 Type-only imports and exports (#35200) 2020-01-03 14:39:32 -08:00
functions Add tests 2018-12-10 09:45:55 -08: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 Private named instance fields (#30829) 2019-12-27 13:07:35 -08:00
jsx Fix decoding of HTML entities in TSX/JSX (#35739) 2019-12-17 17:32:48 -08:00
moduleResolution Fix handling of empty 'types', 'typings', etc. fields in package.json (#31539) 2019-05-23 17:19:32 -07:00
parser Private named instance fields (#30829) 2019-12-27 13:07:35 -08:00
references Update Harness.compileFiles to use vfs 2017-11-09 16:01:33 -08:00
salsa Ignore @private/@protected on constructor functions (#35782) 2019-12-20 08:41:52 -08: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 Increase selectivity of subtype relationship for signatures (#35659) 2019-12-20 14:52:22 -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