34082 Commits

Author SHA1 Message Date
Oleksandr T
cf1b6b7333
feat(51163): show QF to fill in the missing properties for the mapped type. (#51165) 2022-10-13 11:29:18 -07:00
Wesley Wigham
bdcc240d68
Remove bug-causing carve-out in conditional type instantiation that hopefully is no longer required (#51151) 2022-10-13 10:58:42 -07:00
Anders Hejlsberg
37317a208f
Check nested weak types in intersections on target side of relation (#51140)
* Check nested weak types in intersections on target side of relation

* Add regression tests

* Move logic from isRelatedTo to structuredTypeRelatedTo

* Fix lint error

* Add additional test
2022-10-13 08:20:07 -07:00
TypeScript Bot
9f49f9ccb0 Update package-lock.json 2022-10-13 06:22:26 +00:00
Anders Hejlsberg
4f54e7e947
Fix isExhaustiveSwitchStatement to better handle circularities (#51095)
* Fix isExhaustiveSwitchStatement to better handle circularities

* Add regression test
2022-10-12 07:22:06 -07:00
Valerian Clerc
503604c884
Overloads shouldn't gain @deprecated tags of other overloads in quick info (#50904)
* Add test case to check for the propogation of @deprecation tag to multiple overloads

* Implement filter to only include @deprecated tag in first signature after JSDoc comment
2022-10-11 16:58:03 -07:00
TypeScript Bot
e14a2298c5 Update package-lock.json 2022-10-11 06:22:40 +00:00
Jake Bailey
67256e50c4
Remove unused declarations array in extractSymbol's TargetRange (#51091) 2022-10-10 13:57:10 -07:00
Rafał Chłodnicki
9c87ded2b3
fix(51100): ensure tsserver shuts down when parent process is killed (#51107)
* fix(51100): ensure tsserver shuts down when parent process is killed

When using IPC channel (`--useNodeIpc`) for communicating with tsserver,
the child tsserver process did not shut down on parent process disconnecting
(for example due to it being killed).

Call exit() on IPC disconnect, same as stdio-based communication did
when pipe to parent process was destroyed.

* don't duplicate inherited method
2022-10-10 12:03:15 -07:00
Jake Bailey
c01ae01fac
Fix nightly publish oops in Gulpfile (#51131) 2022-10-10 09:33:45 -07:00
TypeScript Bot
a7d10f15bb Update package-lock.json 2022-10-08 06:08:40 +00:00
Oleksandr T
d0bfd8caed
fix(51072): ts.preProcessFile finds import in template string after conditional expression with template strings (#51082) 2022-10-07 10:33:20 -07:00
Jake Bailey
ad56b5ca56
Convert scripts/Gulpfile to checked mjs/cjs so they can run without compilation (#50988) 2022-10-07 09:50:46 -07:00
Oleksandr T
dbeae5d943
fix(51017): Make lineText in the references response opt-out (#51081)
* add option to exclude lineText from the response

* add comments

* update baseline
2022-10-07 09:13:22 -07:00
Anders Hejlsberg
d06a592d02
Properly defer resolution of mapped types with generic as clauses (#51050)
* Fix isGenericMappedType, getTemplateLiteralType, getStringMappingType

* Accept new baselines

* Add regression tests

* Fix comment
2022-10-07 07:25:57 -07:00
TypeScript Bot
42b1049aee Update package-lock.json 2022-10-07 06:09:49 +00:00
Sheetal Nandi
5f3e6cc498
Plugin probe location is higher priority than peer node_modules (#51079)
Fixes #34616
2022-10-06 13:45:22 -07:00
Sheetal Nandi
2648f6ab09
Plugins in project were adding up after every config file reload (#51087)
* Add test where current plugins dont get reset when reloading config file

* Reset loaded plugins when reloading configured project and closing project
2022-10-06 13:40:21 -07:00
Sheetal Nandi
c18791ccf1
Fix incorrect options type to WatchOptions (#51064) 2022-10-05 11:54:59 -07:00
TypeScript Bot
b0795e9c94 Update package-lock.json 2022-10-05 06:16:37 +00:00
Sheetal Nandi
43c6fd4c09
Covert some of the config testing to baselines for easy validation (#51063)
* Baseline config tests for easy validation

* Refactor

* Fix incorrect pick

* Dont print unnecessary plugin host not implemented msg in logs
2022-10-04 18:14:14 -07:00
Sheetal Nandi
fc5e72b92c
Remove unused defaultWatchFileKind method since useFsEvents is default for tsserver and tsc (#51044) 2022-10-04 15:06:41 -07:00
Jake Bailey
8af9a936b5
Use typescript.d.ts in APISample tests (#51061) 2022-10-04 15:00:35 -07:00
Jake Bailey
49533168db
Remove configureLanguageServiceBuild, instrumenter (#51048) 2022-10-04 10:36:57 -07:00
Jake Bailey
9dfffd0fbb
Update GitHub Actions (#51045) 2022-10-04 08:11:58 -07:00
TypeScript Bot
4635a5cef9 Update package-lock.json 2022-10-04 06:14:09 +00:00
Ben Taylor
33a34e5b96
Adding a JSDoc comment to the es5 type declarations to describe the functionality of Date.now() (#50630)
* Adding a JSDoc comment to the es5 type declarations to describe the functionality of Date.now() & updating baselines (50565)

* Update the Date.now() type declaration description

Updating the Date.now() type declaration description to make it clearer and more accurate.

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-10-03 16:31:24 -07:00
Nathan Shively-Sanders
299745cb21
Fix crash in goto-def on @override (#51016)
* Fix crash in goto-def on `@override`

When the base type is not defined, getDefinitionFromOverriddenMember
will have its type as errorType, which has no symbol. The error handling
previously only handled the case of no baseType at all -- which I'm not
sure ever actually happens.

* Improve checking

1. getTypeAtLocation never returns undefined, only errorType, so check for that.
2. Return directly after missing baseTypeNode instead of continuing to return later.

* Experiment with making goto-def on `override` more consistent

* Unify static/instance node->symbol->type path

* Make getSymbolAtLocation support class expressions

and parenthesized expressions

* Revert "Make getSymbolAtLocation support class expressions"

This reverts commit 4c1b03135576c9e5d146ce6f38e691c804cbb0dd.

* fix semicolon lint
2022-10-03 16:07:57 -07:00
Oleksandr T
7dcf11f139
fix(50750): Object type literal with string literal property in contextual typing position causes language service error on all literal type references (#50757)
* fix(50750): skip unbound symbols from JSDoc tags in typescript

* skip contextual type checking in JsDoc for TypeScript files
2022-10-03 15:57:32 -07:00
TypeScript Bot
5cd49f6cbc Update package-lock.json 2022-10-03 06:13:27 +00:00
TypeScript Bot
8a1b85880f Update package-lock.json 2022-10-01 06:18:53 +00:00
Anders Hejlsberg
96894db6cb
Include type parameter defaults in contextual typing (#50994)
* Include type parameter defaults in contextual typing

* Add tests

* Add additional an test for instantiating contextual signature using default type param (#51002)

* Update comment

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
2022-09-30 07:02:22 -07:00
Daniel Rosenwasser
0d0a793714
Allow Unicode extended escapes in ES5 and earlier (#50918)
* Remove language version check for extended escapes.

* Accepted baselines.

* Record whether nodes have extended Unicode escapes. Replace them in the es2015 transform.

* Accepted baselines.

* Move file to better-reflect generality of tests.

* Added tests for variables at the top level.

* Accepted baselines.

* Added test for extended astral character.

* Accepted baseline.

* Enable sourcemaps in tests.

* Accepted baselines.

* Call `setOriginalNode` on identifiers with extended escapes.
2022-09-30 01:22:01 -07:00
TypeScript Bot
58bae8db69 Update package-lock.json 2022-09-30 06:30:31 +00:00
Andrew Branch
0ce72ef6c8
Add option to OrganizeImports for removal only (#50931)
* Remove unused imports

* Lint

* Update baselines

* Make mode paramter required

* Clean up
2022-09-29 16:30:02 -07:00
Jack Works
42f9143e11
feat: codefix for for await of (#50623) 2022-09-29 16:13:25 -07:00
Anders Hejlsberg
ecf50e81a7
Properly compute SymbolFlags.Optional for intersected properties (#50958)
* `in` proves property presence only if property can't be undefined

* Accept new baselines

* Add tests

* Accept new baselines

* Properly compute SymbolFlags.Optional for intersected properties

* Accept new baselines

* Check optionality only for property-like declarations

* Add more tests
2022-09-29 15:18:21 -07:00
Andrew Branch
d1586de043
Fully resolve aliases when checking symbol flags (#50853)
* Resolve aliases past first merge in `resolveName`

* WIP

* Fix when a namespace merges with an alias that resolves to a type merged with an alias that resolves to a value 😵

* Audit all resolveSymbol and resolveName calls

* Fix qualification in re-exporting global cases

* Fix infinite loop detection

* Update baselines

* Just make getAllSymbolFlags default to All
2022-09-29 14:00:43 -07:00
Jake Bailey
45148dd715
Update LKG to 4.8.4 (#50987) 2022-09-29 12:42:20 -07:00
TypeScript Bot
9a83f2551d Update package-lock.json 2022-09-29 06:31:31 +00:00
Ron Buckton
865848fcfb
Fix <= and > comparisons when compared against prerelease versions (#50915)
* Fix <= and > comparisons when compared against prerelease versions

* Improve coverage for semver
2022-09-28 18:46:06 -04:00
Andrew Branch
fbfe9340a9
Fix comparability between type parameters related by a union constraint (#50978) 2022-09-28 10:06:13 -07:00
navya9singh
b09e93d3f6
Merge pull request #50041 from microsoft/fix/47969
Fix(47969): String.prototypr.replace docs fix
2022-09-28 08:27:24 -07:00
TypeScript Bot
0ac12bbe7a Update package-lock.json 2022-09-28 06:28:42 +00:00
Sheetal Nandi
8192d55049
Pick correct compilerOptions when checking if we can share emitSignatures (#50910)
* Pick correct compilerOptions when checking if we can share emitSignatures
Fixes #50902

* Add a note

* Rewording
2022-09-27 21:34:39 -07:00
Sheetal Nandi
16faef1d8d
During uptodate ness check with buildInfo, check if there are errors explicitly with noEmit (#50974)
* Add test

* During uptodate ness check, with buildInfo, check if there are errors in the program to determine uptodateness
Fixes #50959

* Comment update
2022-09-27 15:57:29 -07:00
TypeScript Bot
63791f52d4 Update package-lock.json 2022-09-27 06:24:56 +00:00
Sheetal Nandi
09368bcbae
Handle if project for open file will get recollected because of pending cleanup from closed script info (#50908)
* Handle if project for open file will get recollected because of pending cleanup from closed script info
Fixes #50868

* Rename
2022-09-26 12:40:23 -07:00
Oleksandr T
c81bf4d8b0
fix(49594): Typescript 4.7.3 bracketed class property compilation error strictPropertyInitialization:true (#49619)
* fix(49594): allow enum members in computed properties

* add additional tests

* handle enum members without initializers

* update tests
2022-09-26 09:50:02 -07:00
navya9singh
bc9cbbef42
Merge pull request #49912 from microsoft/fix/47508
fix(47508): noUncheckedIndexedAccess with enums Type narrowed
2022-09-26 09:47:33 -07:00