* Plain JS binder errors
Issue select errors from the binder in JS files that do not have checkJS
explicitly turned on or off. These errors mirror runtime checks done by
Javascript.
* Rest of plain JS binder errors
* address PR comments
* Only issue binder errors in plain JS.
Checker errors require requesting diagnostics, which stll needs to be
peformance tested.
This commit removes one cross-file duplicate declaration error in the tests.
* fix const lint
* CFA for dependent variables destructured from discriminated union
* Accept new baselines
* Add tests
* Limit calls to isSymbolAssigned
* Fix wrong operator
* Added/updated tests.
* Accepted baselines.
* Update test.
* Update instantiateMappedType to work specially when 'any' replaced an array.
* Accepted baselines.
* Ensure check works when constraint is a union of arrayish types, just like in `Promise.all`.
* Accepted baselines.
* Update test for indirect instantiation of a mapped type.
* Accepted baselines.
* Update test comment.
* Accepted baselines.
* Added tuple test case.
* Accepted baselines.
* Don't add special behavior for tuples.
* Accepted baselines.
* Revert "Don't add special behavior for tuples."
This reverts commit f01ae16e65.
* Accepted baselines.
* Error on mapped types with properties
1. Error on properties of type literals with computed properties whose name is a
binary expression with `in`, because that's a good sign of a mapped
type.
2. Parse following properties on mapped types, and error on them.
3. Stop checking computed property names in (1) to avoid producing
errors based on misinterpreting mapped type syntax as an expression.
* add comment in types.ts
* Update API again
* Check interfaces and classes too
* Add missed check in updateMappedTypeNode
Previously, import assertion parsing would try to parse both { and },
even if both were missing. If both were missing, the error for } could
occur past the end of the file, causing an assertion.
Fixes#46364
* Parse type-only import specifiers
* Add type-only export specifiers
* Update transform and emit
* Update checking
* Fix elision when combined with importsNotUsedAsValues=preserve
* Accept baselines
* Add test
* WIP auto imports updates
* First auto-imports test working
* More auto-import tests
* Fix auto imports of type-only exports
* Add test for promoting type-only import
* Sort import/export specifiers by type-onlyness
* Update completions for `import { type |`
* Update other completions tests
* Respect organize imports sorting when promoting type-only to regular while adding a specifier
* Fix comment mistakes
* Update src/services/codefixes/importFixes.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Rearrange some order of assignments in parser
* Split huge if statement
* Remove redundant check
* Update new transformer
* Fix import statement completions
* Fix type keyword completions good grief
* Fix last tests
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Initial support for module: node12
* Add allowJs and declaration emit enabled tests
* Fix typos
* cts, mts, cjs, mjs, etc extension support
* Fix watch of files whose intepretation changes due to a package.json update
* Minor PR feedback
* Adjust error message
* Initial import/export/self-name support
* Accept new error codes
* TypesVersions support in export/import map conditions
* Fix import suggestion and autoimport default extensions under new resolution modes
* Add tests for import maps non-relative name lookup feature
* Fix isDeclarationFileName for .d.mts and .d.cts
* Preserve new extensions when generating module specifiers
* Fix spurious implict any suggestion caused by file ordering bug and optimize import name format detection by relying on parents being set
* Fix a bunch of incremental bugs that dont repro under fourslash for some reason
* Accept updated baseline
* Always include extensions on completions for cjs/mjs style imports
* String completion relative import suggestions respect the mode of the import when choosing if they provide extensions
* Style feedback
* Change diagnostic case
* Transform JSX spread children
* Target es2015 to skip helper and refine emit
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
Co-authored-by: Orta <git@orta.io>
* Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any
* Use Awaited<T> with 'await'
* Clean up overloads
* Further restrict 'Awaited<T>' auto-wrapping for 'await'
* Import of Intl.Locale from #39664
* Handle updating es2020.intl and add es2021 for new DateTimeFormatOptions options - re: #39664
* Extends DateTimeFormatOptions for new Intl APIs - re: #45420
* Handle migrating Intl.NumberFormat.formatToParts to es2018 (keeping esnext.intl around)
* Adds Intl.DisplayNames to es2020 - re: #44022
* Remove attributes added in es2021 from es2020 - re: #42944
* Add a reference to es2021 in the command line parser
* Adds some docs about the lib files
* Baselines
* Allow undefined in Intl inputs to allow for ergonomic usage of exactOptionalPropertyTypes - see #45652
* Adds some tests covering the APIs
* Apply suggestions from code review
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Handle PR feedback
* More review improvements
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>