* CFA for dependent variables destructured from discriminated union
* Accept new baselines
* Add tests
* Limit calls to isSymbolAssigned
* Fix wrong operator
* Decrease recursion depth limit to 3 + smarter check for recursion
* Accept new baselines
* Always set last type id
* Keep indexed access recursion depth check
* Less expensive and corrected check for broadest equivalent keys
* Add failing test.
* Check for type parameters on the original type when asking for the type argument constraint.
* Update tests/cases/fourslash/stringLiteralTypeCompletionsInTypeArgForNonGeneric1.ts
* prototype creation for method override completion snippet
* WIP: start using codefix `addNewNodeForMemberSymbol` to create method decl node
* update type of addNewNodeForMemberSymbol
* add more tests and support more cases
* add more tests and fix some details
* wip: more fixes and tests
* expose check override modifier in checker
* fix test
* WIP: add snippet support
* WIP: snippet support on emitter, adding snippets in completions
* make add snippets work with overloads (not synced)
* fix snippet adding
* rebase
* WIP: try to add snippet escaping in emitter
* support escaping in snippets
* small fixes; fixed tests
* more tests and fixes
* fix new tests
* fix modifier inheritance for overloads
* merge conflict fixes; remove comments
* throw error if setOptions is called but not implemented
* fix newline handling
* fix weird stuff
* fix tests
* fix more tests
* Fix unbound host.getNewLine
* fix isParameterDeclaration changes
* rename diagnostic to status and remove snippets from public api
* rename emitter functions + fix indentation
* check completion kind before calling isclasslikemembercompletion
* fix missing type parameters
* Revert "fix missing type parameters"
This reverts commit 7bdeaa86da.
* add isAmbient flag to addNewNodeForMemberSymbol
* add test for abstract overloads
* refactor snippet escaping support
* add user preference flag for enabling class member snippets
* update API baseline
* update tabstop order
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* 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.
* 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