* Simplify relationship check for conditional type on target side
* Accept new baselines
* Better support for non-distribution-dependent types
* Accept new API baselines
* Accept new 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
* feat: add quick fix for types
* feat: add test case for quick fix of types
* feat: add did-you-mean error when Cannot_find_name_0 and Cannot_find_namespace_0
* feat: add Cannot_find_namespace_0_Did_you_mean_1 error and only suggest when resolve type
* feat: update baselines
* feat: update baselines
* feat: update baselines
* chore: fix style problem
* Always suggest spelling corrections
* suggest primitives instead of their wrappers
* Add primitives to suggestions
Instead of altering wrappers to look like primitives.
* add semicolons
* revert unneeded change
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Track source and target relationship stack depth seperately, only increase on change in value
* Add baselines for test from #43485
* Bail on unwrapping conditional constraints on the source side when the source conditional is already known to be spooling out of control
* More usage of isDeeplyNestedType to block _specifically_ conditional recursion on only one side
* Negative cases of getNarrowedType that match the exact type should be filtered out, even when generic
* Add test and fix for #44404
* Swap to manually specifying left and right recursion
* Rename Left -> Source, Right -> Target
Co-authored-by: Andrew Branch <andrew@wheream.io>
* Loosen check in getIndexTypeForMappedType to directly map property names when any indexy type is present
* Handle homomorphic mappings better in keyof, add specific relationship rule for relating generic keyof MappedType to handle remapped keys
* Remove trailing whitespace
* 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
* Revert "Stop looking at binding patterns for type argument inference (#45719)"
This reverts commit be618b1446.
* Update error baseline for moved lib file declaration
* fix: add override errors for js class members
* fix: test failures of js override error message
* update diagnostic messages
* fix: test errors
* fix: lint errors
* 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'