Component commits:
755e1cbc88 Add minimal failing test
d52b9d3cee Fix checker initialization crash with esModuleInterop global merges resolving to ImportEquals aliases
Co-authored-by: Andrew Branch <andrew@wheream.io>
Component commits:
191aa682f8 Disable JSX attribute snippet if attribute is acutally the HTML tag
1786d5e278 Add more tests of text before and after
7ac5e596ce Big comment
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
* Cherry-pick PR #47007 into release-4.5
Component commits:
48b9027927 Use features for selected module resolution rather than all features for type reference directives, since they can add restrictions to resolutions
* Update baselines for error in stable release versions
Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
Component commits:
e19aed36d8 Fix Awaited<T> for onfulfilled callbacks with more than one argument
f4b3ef2f95 Merge branch 'main' into fix46934
Co-authored-by: Ron Buckton <rbuckton@microsoft.com>
Component commits:
615a82c6b9 Make specifier generation from export map information conditional on module resolution mode
Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
Component commits:
e77514a53b Add failing test.
3c0d51b3ed Check for type parameters on the original type when asking for the type argument constraint.
e7c8095935 Update tests/cases/fourslash/stringLiteralTypeCompletionsInTypeArgForNonGeneric1.ts
Co-authored-by: Daniel Rosenwasser <drosen@microsoft.com>
* Properly check whether union type contains only primitive types
* Add regression test
* Remove 'export' modifier from test
Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
* 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.
Parsing separates the identifier part of the link tag from its text, but
the editor should present an identifier followed by `()` as a single
identifier since people use that syntax as a function sigil.
I prefer `#'` personally, you know, xkcd 297, nudge nudge.
* 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