32283 Commits

Author SHA1 Message Date
TypeScript Bot
2f3cd38121 Update package-lock.json 2021-07-08 06:06:03 +00:00
Ron Buckton
8590f0db40
Fix decorator emit regression for static fields (#44933) 2021-07-07 16:58:36 -07:00
Oleksandr T
c0821aeacd
fix(44926): change noImplicitOverride description (#44929) 2021-07-07 18:43:44 +01:00
TypeScript Bot
1de29af709 Update package-lock.json 2021-07-07 06:06:13 +00:00
Andrew Casey
4d5978d1db
Apply disableReferencedProjectLoad to getOriginalLocationEnsuringConfiguredProject (#44836)
* Apply disableReferencedProjectLoad to getOriginalLocationEnsuringConfiguredProject

* Reuse previously computed values and refine comments

* Add baselines for test matrix
2021-07-06 15:22:48 -07:00
Eli Barzilay
bb7de99e5a Improve "Convert to template string" with template-strings
Fixes #44396
2021-07-06 18:14:58 -04:00
Anders Hejlsberg
8e01a86c01
Consistently ignore attributes with hyphenated names in JSX (#44873)
* Consistently skip attributes with hyphenated names in JSX

* Add regression test

* Accept new baselines

* Fix tests

* Accept new baselines
2021-07-06 10:29:51 -10:00
Andrew Branch
1da18c60d6
Refactor export map cache to not store transient symbols (#44816)
* Add some failing tests around transient symbols

* Working, but slower

* A class is much faster, apparently

* This is probably best?

* Back to multimap

* Go back to single symbol cache

* Revert now-unnecessary generics

* Rename and reorganize

* Fix weird compound condition

* Clean up
2021-07-06 11:04:59 -06:00
Oleksandr T
fc5c765f81
fix(44868): handle import type in shorthand assignment (#44881) 2021-07-06 09:29:09 -06:00
TypeScript Bot
f58a662950 Update package-lock.json 2021-07-05 06:05:57 +00:00
TypeScript Bot
b539c9a0c3 Update package-lock.json 2021-07-04 06:06:07 +00:00
Ron Buckton
069650f602
Change PerformanceObserver to be compatible with new Node types (#44884) 2021-07-03 21:26:56 -07:00
Ron Buckton
09406524b3
Add evaluation tests for class static initializers (#44878) 2021-07-03 18:30:42 -07:00
TypeScript Bot
be5bf3ef2d Update package-lock.json 2021-07-03 06:06:16 +00:00
Ron Buckton
8b496ed34c
Fix class name reference in class expr (#44877) 2021-07-02 18:37:23 -07:00
TypeScript Bot
62f9155a9d Update package-lock.json 2021-07-02 06:07:09 +00:00
Daniel Rosenwasser
248b2c3fc1
Further optional delete corrections (#44862)
* Add more tests.

* Accepted baselines.

* Switch to testing the symbol's flags.

* Accepted baselines.
2021-07-01 18:44:22 -07:00
Daniel Rosenwasser
e3d6189e3a
Correctly check for 'delete' on optional properties in 'exactOptionalPropertyTypes'. (#44854)
* Check for optionality in 'delete'.

* Accepted baselines.
2021-07-01 15:19:11 -07:00
Daniel Rosenwasser
9d443b76aa
Update LKG to enable improved narrowing in 4.4. (#44842)
* Update LKG.

* Remove unnecessary assertions.
2021-07-01 12:21:27 -07:00
TypeScript Bot
d308b99f38 Update package-lock.json 2021-07-01 06:06:07 +00:00
Oleksandr T
e402c1d464
feat(44799): allow auto import codefix for shorthand property assignment (#44827) 2021-06-30 16:09:42 -05:00
Zzzen
813ddf7909
ensure export modifier is used before default modifier (#44570)
* ensure export modifier is used before default modifier

* gracefully handle `default function`

* Revert "gracefully handle `default function`"

This reverts commit 1d8e2887540f5abaa8b7192fee89ef8935be8640.

* give better error message on default without leading export
2021-06-30 09:43:14 -07:00
TypeScript Bot
837ed96697 Update package-lock.json 2021-06-30 06:11:21 +00:00
Oleksandr T
5c8d76347c
fix(44448): disallow 'delete' operator for optional properties (#44612) 2021-06-29 16:56:45 -07:00
Anders Hejlsberg
4c19873b64
Validate symbol-named properties against symbol index signatures (#44815)
* Validate symbols against both symbol and string index signatures

* Add tests

* Accept new baselines
2021-06-29 11:53:07 -10:00
Oleksandr T
114f68cd3d
fix(44725): handle this parameter in tagged template call (#44734) 2021-06-29 14:11:35 -07:00
Orta Therox
fdc31baffe
Fix types in the boolean trivial lint rule (#44801) 2021-06-29 11:53:35 -07:00
Eli Barzilay
f47ddbc3b0 Fix bad line number assertion in ScriptInfo.positionToLineOffset
This is the line number side of ecddf8468f (from #21924, fixing #21818).
But the code is slightly improved for both cases: instead of testing
that `leaf` is defined, check whether `lineCount` is zero, and if it is,
return `〈1,0〉` for the one-based line and zero-based column numbers.
(The requirement of `lineCount > 0` is also seen in the fact
that `lineNumberToInfo` expects a "*One*BasedLine" argument.)

I've stared at this code way too much, since I think that there is
something more fundamentally wrong here.  E.g., `EditWalker` only
`push`es to `startPath` but never pops even a `children`-less node that
is left after deleting the whole contents.  But I can't figure out the
overall structure, which is also why the test that I added is not
great (see the comment there; also, #21924 is dealing with the same
problem and didn't add a test).

Fixes #44518.
2021-06-29 14:13:44 -04:00
TypeScript Bot
5cea46c537 Update package-lock.json 2021-06-29 06:05:59 +00:00
Anders Hejlsberg
5f8a9e5181
Fix constant reference check in CFA (#44762)
* Check entire access path is constant when narrowing by inlining

* Add tests

* Accept new baselines

* Added test cases for parameter properties.

* Accepted baselines.

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2021-06-28 16:41:17 -07:00
Andrew Casey
c0d5c29080
Reduce exceptions (#44710)
* Don't visit non-existent basePaths

* Stop trying to add file watchers after hitting the system limit

* Update tests
2021-06-28 15:45:35 -07:00
Oleksandr T
066796be54
feat(44736): add go-to-definition on overridden members (#44740) 2021-06-28 14:58:06 -07:00
Andrew Branch
54b913cf31
Issue unawaited promise error on symbol-less expressions (#44491)
* Issue unawaited promise error on symbol-less expressions

* Use same behavior for call expressions

* Revert "Use same behavior for call expressions"

This reverts commit 60d58132e4ecfba063b5c9df06acdd05b25decdf.
2021-06-28 12:35:58 -05:00
csigs
4890312ad8
LEGO: Merge pull request 44791
LEGO: Merge pull request 44791
2021-06-28 10:13:00 -07:00
TypeScript Bot
6824480de8 Update package-lock.json 2021-06-28 06:06:29 +00:00
csigs
a6c914e55d
LEGO: Merge pull request 44780
LEGO: Merge pull request 44780
2021-06-27 22:13:03 -07:00
csigs
67357cdb4f
LEGO: Merge pull request 44776
LEGO: Merge pull request 44776
2021-06-27 16:13:07 -07:00
csigs
3b2bc85594
LEGO: Merge pull request 44770
LEGO: Merge pull request 44770
2021-06-27 10:13:36 -07:00
TypeScript Bot
a7a0d258cf Update package-lock.json 2021-06-27 06:06:02 +00:00
csigs
5dbb7d313c
LEGO: Merge pull request 44766
LEGO: Merge pull request 44766
2021-06-26 22:12:53 -07:00
csigs
0b3a15414b
LEGO: Merge pull request 44763
LEGO: Merge pull request 44763
2021-06-26 16:14:05 -07:00
csigs
8c8d22db0f
LEGO: Merge pull request 44757
LEGO: Merge pull request 44757
2021-06-26 10:13:11 -07:00
TypeScript Bot
11b38676b0 Update package-lock.json 2021-06-26 06:05:58 +00:00
Nathan Shively-Sanders
1ae6b8bfb5
Forbid duplicate tests only in compiler+fourslash runner (#44752)
* Forbid duplicate tests only in compiler runner

Not in fourslash, user, docker, etc.

* Include fourslash, but exempt shims and server
2021-06-25 17:33:31 -07:00
Wenlu Wang
dc237b317e
Change static fields emits (#43114)
* use emit into iife

* Update emit

* Revert un-related changes

* Allow super in static context

* Allow this and super in static property declaration

* Add more tests

* Avoid errors

* Accept baseline

* Accept baseline

* Add decorated classes test

* Add errors

* Avoid this in emitter

* make lint happy

* Add class expression tests

* Add computed name test

* Avoid super if target below es6

* Adjust function boundary

* Add internal

* Fix minor CR issues

* accept baseline

* Update behavior

* Avoid spaces

* Make lint happy

* Avoid function boundary utils

* Update baseline

* Avoid errors

* Accept baseline

* Accept baseline

* Accept baseline

* Accept baseline

* Use substitutions

* Full coverage for super, this, merge static and private context

* Fix use-before-def in static fields

Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2021-06-25 15:49:27 -07:00
Andrew Branch
328e888a9d
Resolve module specifiers for auto imports in completion list (in incomplete chunks) (#44713)
* Enable module specifiers for all auto imports

* Use isIncomplete

* isIncomplete continuation

* Lots of fixes

* Merged/transient symbol fixes, resolve all ambient module specifiers up front, pull as many as we want from cache

* Fix existing tests

* Start testing

* Add more tests

* Set cache attempt limit, update API baseline

* Fix a few tests

* Fix contextToken

* Split getModuleSpecifiers

* Unexport function

* Clean up importFixes

* Clean up completions

* Delete transient symbol assertion - fixing later
2021-06-25 17:26:53 -05:00
Oleksandr T
7c47be76b0
fix(44738): fix eslint rules (#44739) 2021-06-25 14:50:19 -07:00
Orta Therox
9ebe11c2d3
Migrate latest dom types into libdom.d.ts (#44684)
* Add the types_web dom dts

* Update

* Adds new DTS

* Update baselines
2021-06-25 14:25:30 -07:00
Anders Hejlsberg
8058619aed
Control flow analysis of aliased conditional expressions and discriminants (#44730)
* CFA inlining of conditional expressions referenced by const variables

* Accept new baselines

* Add tests

* Accept new baselines

* Increase inlining limit to 5 levels per design meeting discussion
2021-06-25 13:59:58 -07:00
Wenlu Wang
906cbd2715
Proposal class static block support (#43370)
* Class static block (#9)

* Add types factory and parser

* Add some case

* Make class static block as a container

* Update cases

* Add visitor

* Add emitter and more compile target

* Check boundary of break and continue

* Add basic transformer

* Fix emit behavior

* Add more tests

* Add friend tests

* Update baseline

* Fix cr issues

* Accept baseline

* Add decorator and modifier check

* Add functional boundary check

* Fix conflict

* Fix computed prop name within context

* Add more tests

* Update baseline

* Avoid invalid test baseline

* Support use before initialize check

* wip

* Fix class static block context

* Fix checks

* Fix missing case

* Improve assert message

* Accept baseline

* Avoid new context

* Update diagnostic message

* Fix name collision

* Fix targets

* Avoid unnecessary files

* Add more case

* Add more test cases

* Fix strict mode function declaration

* Avoid private fields initializer if no private identifier references

* Avoid private fields and add more test case

* Add more case

* Add tests and support for related services functionality

* Fix this reference in static block

* Split parser diagnostic and binder diagnostic

Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2021-06-25 09:24:05 -07:00