33270 Commits

Author SHA1 Message Date
Anders Hejlsberg
787bb9ddb6
Improve support for numeric string types (#48837)
* Improve support for numeric string types

* Update test

* Add tests
2022-04-25 15:36:06 -07:00
Andrew Branch
7920783876
Fix workflow syntax error (#48842) 2022-04-25 13:03:02 -07:00
Marek Dědič
42fc05b087
Don't run scheduled GitHub actions on forks (#48693)
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
2022-04-25 11:37:54 -07:00
TypeScript Bot
06fb30725d Update package-lock.json 2022-04-25 06:06:45 +00:00
Andrew Branch
c99380f87b
Fix auto-import completions sometimes not updating existing imports (#48815) 2022-04-22 15:32:52 -07:00
Jake Bailey
07660c8307
Fix emit for undefined SourceFile (#48774)
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2022-04-22 11:18:53 -07:00
Sheetal Nandi
94cb657b1c
Fix: verification of incremental correctness that was not working because of using wrote writeFile (#48751)
* Use fixed time for vfs so baselining is consistent

* Baseline buildinfos

* Write new file text in baseline even if the file wasnt read on the shadow

* Remove unnecessary debugger statement

* Make sure that incremental correctness is checked with correct writeFile so we know buildInfo was written
Also baseline these so its easy to verify the changes

* More baselines for the tsbuildinfo

* Renames and test fixes after dts Signature change merge

* COmment
2022-04-22 09:30:58 -07:00
Mateusz Burzyński
af30c79093
Fixed string literal completions for partially-typed strings when overload could get matched (#48811) 2022-04-22 08:36:14 -07:00
TypeScript Bot
71f94c5bdb Update package-lock.json 2022-04-22 06:06:24 +00:00
Oleksandr T
d71dd1d912
fix(48556): throw an error on jsx spread attributes with an invalid type (#48570) 2022-04-21 16:31:16 -07:00
Andrew Branch
7abdb9e7ef
Format completion snippet text before escaping (#48793)
* Format snippet text before escaping

* Reset `escapes` before printing so printer can be reused
2022-04-21 13:40:14 -07:00
Sheetal Nandi
ab2523bbe0
Handles time on vfs and write non empty shadowed files in baseline even if they were not read (#48703)
* Use fixed time for vfs so baselining is consistent

* Baseline buildinfos

* Write new file text in baseline even if the file wasnt read on the shadow

* Remove unnecessary debugger statement
2022-04-21 11:50:28 -07:00
Sheetal Nandi
7a59e45f48
During emit, if shape signature for the file is same as version, then update it with emitted d.ts file (#48616)
* If we are writing dts file and have used file text as version, we can update the signature when doing actual emit

* Make WriteFileCallback Api ready for future

* Assert that there is only single source file when emitting d.ts file
2022-04-21 11:00:34 -07:00
Sheetal Nandi
45faac7e70
If we are updating dts of any of the file and it affects global scope, everything needs update in signature and dts emit (#48600)
* Add test

* Renames

* More refactoring

* If we are updating dts of any of the file and it affects global scope, everything needs update in signature and dts emit
Fixes #42769
2022-04-20 21:05:10 -07:00
John Lusty
273a567617
Fix handling of prologue statements when there are parameter property declarations (#48775) 2022-04-20 08:49:22 -07:00
Wesley Wigham
ce487e4fd3
Fix meta property symbol lookup (#48773) 2022-04-19 17:57:06 -07:00
Andrew Branch
d81a976c14
Ensure enum aliases referenced in other enum members do not get marked as referenced (#48770)
* Add test

* Ensure enum aliases referenced in other enum members do not get marked as referenced
2022-04-19 15:23:25 -07:00
Patrick Szmucer
2e619fdc80
Fix transformed constructor code when there is code between prologue statements and super call (#48765) 2022-04-19 09:19:25 -07:00
TypeScript Bot
6894f913ec Update package-lock.json 2022-04-19 06:06:46 +00:00
Jake Bailey
d3943fc86f
Disallow line break between entity name and type arguments in typeof expression (#48755) 2022-04-18 16:18:31 -07:00
Anders Hejlsberg
65f6cb23d3
Constraints for mapped types with filtering 'as' clauses (#48699)
* Constraints for mapped types with filtering 'as' clauses

* Add regression test
2022-04-18 14:24:22 -07:00
Sheetal Nandi
56a4a93718
Instead of maintaining cache id etc, reset the "working" exports map cache. (#48579)
* Revert "Avoid no-op export map updates (#45238)"

This reverts commit 0f6e6efde08385916602e254f406f1703907b2a5.

* Need to reset currentAffectedFilesExportedModulesMap after commiting to final exports map
2022-04-15 15:11:30 -07:00
Andrew Branch
0976658418
Allow triggering twoslash bisection manually (#48721) 2022-04-15 12:44:37 -07:00
TypeScript Bot
0d9a4fe490 Update package-lock.json 2022-04-15 06:06:38 +00:00
Andrew Branch
8bd7ce6feb
Find Source Definition (#48264)
* Prototype resolving to JS when go-to-def aliases all resolve to ambient declarations

* Add test infrastructure

* Start fleshing out test coverage

* Fix some go-to-def stuff

* Finish lodash test case

* Make go-to-implementation never return ambient results

* Build new functionality into go-to-implementation

* Update baselines

* Two more test cases

* Refine definition searches for unresolved imports

* Revert "Build new functionality into go-to-implementation"

This reverts commit 381799d0f104000c676334c8e08fcdff9ccac896.

* Fix tests

* Revert go-to-implementation changes

* Wow a bunch of code was unnecessary

* Update baselines and go-to-def test

* Fix navigation on symbols that are not aliases but resolve through aliases in chain

* Temporarily replace go-to-def with new command implementation

* Revert "Temporarily replace go-to-def with new command implementation"

This reverts commit 34c6cfdebbb9e2506ea5e6d528d2cb57b2cdeb2e.

* Revert "Wow a bunch of code was unnecessary"

This reverts commit 1cb2ba646c9e80d1ca08b6fc3f6a2219aac44f67.

* Bring back some deleted code needed for a new test case

* Clean up a little

* Rename more stuff

* Update test

* Update API baseline

* Temporarily replace go-to-def with new command implementation

* PR review fixes

* Fix getTopMostDeclarationNamesInFile

* Rename local

* Use hash set

* Remove option from commandLineParser

* Keep noDtsResolution project around

* Handle AuxiliaryProject kind in ScriptInfo getDefaultProject etc.

* Do not run updateGraph in the background for AuxiliaryProject

* Don’t create auxiliary project outside of semantic mode

* No-op on scheduled invalidation

* Add comments to unit test

* Sync compiler options to auxiliary project

* Fix case sensitivity

* Update extensionIsOk with new file extensions

* PR feedback

* Update API baseline

* Mark scheduleInvalidateResolutionsOfFailedLookupLocations internal

* Use same heuristics on property accesses of loosely-resolvable aliases as unresolvable named imports

* Rename command, and no need to return the bound span

* Update API baseline
2022-04-14 15:44:19 -07:00
Jake Bailey
e6dcf6f5cb
Fix lints after dep update (#48707) 2022-04-14 15:19:22 -07:00
Josh Goldberg
fa2515ecd9
Fixed multiple prologue directives with parameter properties (#48687) 2022-04-14 09:29:15 -07:00
TypeScript Bot
6a4cb30a5f Update package-lock.json 2022-04-14 06:07:26 +00:00
Andrew Branch
4fdffbf58f
Checkout needs everything (#48689) 2022-04-13 17:25:05 -07:00
Andrew Branch
f1df67cf00
Fix workflow syntax 2022-04-13 17:21:19 -07:00
Andrew Branch
d7c95930ef
setup-node needs a version spec (#48688) 2022-04-13 17:19:39 -07:00
Andrew Branch
cb8ddd972d
WIP (#48682) 2022-04-13 17:16:31 -07:00
Andrew Branch
796be45118
Update signatures to avoid post-LKG error (#48677) 2022-04-13 16:36:35 -07:00
Oleksandr T
73c93eec5c
fix(48657): allow JSXElement names to be IdentifierNames (#48661) 2022-04-13 12:32:10 -07:00
Anders Hejlsberg
a027cfa8ac
More permissive parsing of instantiation expressions (#48659)
* More permissive parsing of expressions with type arguments

* Add test
2022-04-13 09:16:43 -04:00
Sheetal Nandi
988fa85f88
Handle declaration file names consistently (#48647) 2022-04-12 11:43:57 -07:00
Anders Hejlsberg
cce61d1b69
Variance annotations on class expressions + deferred valiation (#48645)
* Variance annotations on class expressions + deferred validation

* Add regression tests
2022-04-12 09:34:33 -04:00
TypeScript Bot
c9a4d017fd Update package-lock.json 2022-04-12 06:07:39 +00:00
Sheetal Nandi
a1e77edfdf
Fix the issue with not serializing impliedFormat when signature and version of the file are same (#48614)
* When checking for incremental correctness always calculate signature

* Fix the issue with not serializing impliedFormat when signature == version of the file
2022-04-11 12:39:57 -07:00
Andrew Branch
02787cfde1
Make LKG and nightly declaration emit the same (#48641) 2022-04-11 12:33:57 -07:00
Sheetal Nandi
15c2120a95
Update affected files pending emit when emitting using SemanticDignosticsBuilderProgram (#48519)
* Update affected files pending emit when emitting using SemanticDignosticsBuilderProgram

* Saving of affected files pending emit is not needed any more

* PR feedback
2022-04-11 11:54:39 -07:00
Andrew Branch
a7d818b24a
Allow twoslash-repros action to be run on-demand 2022-04-11 11:50:46 -07:00
Jack Bates
c1db699482
Don't skip tests named *Fourslash.ts (#48615) 2022-04-11 11:45:44 -07:00
Gabriela Araujo Britto
dfb9f2f953
don't have type annotations on suggested object literal methods (#48607) 2022-04-11 11:33:02 -07:00
csigs
f81f63f343
LEGO: Merge pull request 48633
LEGO: Merge pull request 48633
2022-04-10 03:15:53 -07:00
Anders Hejlsberg
a744862aa5
Explore fewer constraints in getResolvedBaseConstraint (#48613) 2022-04-09 10:06:01 -04:00
csigs
b797a3eb2e
LEGO: Merge pull request 48621
LEGO: Merge pull request 48621
2022-04-09 03:16:15 -07:00
Andrew Branch
af3e1d4dfd
Reuse type nodes from optional parameters even when not written as a union with undefined (#48605)
* Reuse type nodes from optional parameters and properties even when not written as a union with `undefined`

* Remove newly unneeded NodeBuilderFlag

* Update public API

* Update baselines from main
2022-04-08 14:28:36 -07:00
Wesley Wigham
12c4ea8542
Fix semantic merge conflict 2022-04-08 12:15:50 -07:00
Wesley Wigham
f30ce1ff8f
Update update-package-lock.yaml
12 -> 14
2022-04-08 11:16:49 -07:00