Commit Graph
33858 Commits
Author SHA1 Message Date
Jake BaileyandGitHub 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
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-SandersandGitHub 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 4c1b031355.

* fix semicolon lint
2022-10-03 16:07:57 -07:00
Oleksandr TandGitHub 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
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 RosenwasserandGitHub 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 BranchandGitHub 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 WorksandGitHub 42f9143e11 feat: codefix for for await of (#50623) 2022-09-29 16:13:25 -07:00
Anders HejlsbergandGitHub 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 BranchandGitHub 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 BaileyandGitHub 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 BucktonandGitHub 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 BranchandGitHub fbfe9340a9 Fix comparability between type parameters related by a union constraint (#50978) 2022-09-28 10:06:13 -07:00
navya9singhandGitHub 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 NandiandGitHub 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 NandiandGitHub 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 NandiandGitHub 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 TandGitHub 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
navya9singhandGitHub bc9cbbef42 Merge pull request #49912 from microsoft/fix/47508
fix(47508): noUncheckedIndexedAccess with enums Type narrowed
2022-09-26 09:47:33 -07:00
TypeScript Bot 5a10f46c00 Update package-lock.json 2022-09-26 06:28:37 +00:00
navya9singh 8e71f429c8 Fixing pr comments 2022-09-25 23:12:07 -07:00
TypeScript Bot c100c6488d Update package-lock.json 2022-09-25 06:08:45 +00:00
TypeScript Bot 2a91107f75 Update package-lock.json 2022-09-24 06:11:05 +00:00
Daniel RosenwasserandGitHub 4ab9e76fb7 Use paths in package.json 'files' array that work with npm 6 and later. (#50930) 2022-09-23 16:05:20 -07:00
Jake BaileyandGitHub f16ca7dd36 Remove 'async' dependency, used only in errorCheck.ts, modernize file (#50667) 2022-09-23 09:54:36 -07:00
Alex HsuandGitHub c6bef3f028 LEGO: Merge pull request 50921
LEGO: Merge pull request 50921
2022-09-23 04:35:38 -07:00
TypeScript Bot 675302730b Update package-lock.json 2022-09-23 06:24:32 +00:00
Daniel RosenwasserandGitHub 9740bcc534 Pluralized hasInvalidatedResolution -> hasInvalidatedResolutions (#50912)
* Pluralize hasInvalidatedResolution to hasInvalidatedResolutions.

* Accepted baselines.
2022-09-22 18:33:09 -07:00
Sheetal NandiandGitHub a455955aac Make hasInvalidatedResolution non internal for program and add it watchApi (#50776)
* Make stub for hasInvalidatedResolution

* Wire through hasInvalidatedResolutions
Fixes #48057

* Update comment

* Feedback
2022-09-22 16:51:53 -07:00
Jake BaileyandGitHub 645d1cd7c1 Fix assert in addIndirectUser in FAR (#50905) 2022-09-22 16:47:27 -07:00
Alex HsuandGitHub bbec17d900 LEGO: Merge pull request 50900
LEGO: Merge pull request 50900
2022-09-22 05:56:42 -07:00
TypeScript Bot a9ecc675d6 Update package-lock.json 2022-09-22 06:26:44 +00:00
Andrew BranchandGitHub 221cf55a21 package.json exports should have priority over typesVersions (#50890)
* package.json `exports` should have priority over `typesVersions`

* Test some versioned conditions too
2022-09-21 17:21:51 -07:00
Jake BaileyandGitHub acb8977190 Remove .github/tsc.json (#50664) 2022-09-21 17:11:54 -07:00
Oleksandr TandGitHub 7a3de819bf fix(49993): skip the quick fix for an expression with an enum type (#50625) 2022-09-21 16:59:17 -07:00
Oleksandr TandGitHub 2644f28677 fix(49200): skip duplicated method declarations (#50609) 2022-09-21 16:05:40 -07:00
Oleksandr TandGitHub 4d91204c9d fix(37030): Expand Selection in function and arrow function skips body block (#50711)
* fix(37030): include curly braces from function body in the selection

* add missed sourceFile argument
2022-09-21 10:47:24 -07:00
Nathan Shively-SandersandGitHub e2dd5084f7 DOM update 2022/09/21 (#50884) 2022-09-21 10:17:08 -07:00
Oleksandr TandGitHub 1d9ab83914 fix(50866): emit modifiers from export declarations (#50874) 2022-09-21 09:59:15 -07:00
Alex HsuandGitHub 92a1b124c1 LEGO: Merge pull request 50877
LEGO: Merge pull request 50877
2022-09-21 05:34:27 -07:00
Jake BaileyandGitHub e383db692e Fix debug.ts __debugKind check (#50871) 2022-09-20 22:48:52 -07:00
Anders HejlsbergandGitHub 01054e05ab Consistently add undefined/missing to optional tuple element types (#50831)
* Consistently add undefined/missing type to optional tuple elements

* Accept new baselines

* Add regression test
2022-09-20 18:14:20 -07:00
Daniel RosenwasserandGitHub d90795e799 Improve escape sequence handling in private names (#50856)
* Add tests for identifiers and private identifiers with escape sequences.

* Accepted baselines.

* Store the tokenValue instead of tokenText on PrivateIdentifiers, since the latter can contain escapes and lead to semantic discrepancies.

* Accepted baselines.

* Check for leading escape sequences in PrivateIdentifiers.

* Accepted baselines.

* Fix lints.
2022-09-20 15:00:39 -07:00