Anders Hejlsberg
3d4c14c5f8
Add tests
2019-10-24 10:14:09 -04:00
Andrew Casey
6f04f526d4
Merge pull request #34659 from amcasey/FARGlobalThis
...
Don't assume that all symbols have declarations
2019-10-22 16:26:19 -07:00
Andrew Casey
590fd3f2a2
Don't assume that all symbols have declarations
...
...in Find All References. For example, global `this` doesn't in
modules.
Part of #34404
2019-10-22 15:00:30 -07:00
Kārlis Gaņģis
479d30646f
Fix crash in assigning function with this ref to alias ( #34650 )
2019-10-22 14:33:45 -07:00
Nathan Shively-Sanders
1cbbe288ac
Treat any mix of element/prop access as declaration in JS ( #34649 )
...
Fixes #34642 but, notably, doesn't actually make the assignment into a
working declaration. It just fixes the crash.
2019-10-22 11:28:28 -07:00
Andrew Casey
159b6262ea
Merge pull request #34631 from amcasey/ComputedPropName
...
Handle undefined from getPropertyNameForPropertyNameNode
2019-10-22 10:17:05 -07:00
Andrew Casey
7862e58354
Handle undefined from getPropertyNameForPropertyNameNode
...
...which can be returned when the property name is computed.
Part of #34404
2019-10-21 17:41:06 -07:00
Anders Hejlsberg
f84fd300b8
Merge pull request #34607 from microsoft/fix33490
...
Fix type inference regression
2019-10-21 12:50:38 -07:00
Anders Hejlsberg
ff6626f869
Merge pull request #34597 from microsoft/optionalChainControlFlow
...
More optional chaining control flow analysis
2019-10-21 12:36:07 -07:00
Andrew Branch
1d3ecc0610
Ensure export= symbol from JavaScript always has a valueDeclaration ( #34553 )
2019-10-21 09:56:02 -07:00
Anders Hejlsberg
56520da6f0
Add regression tests
2019-10-20 18:00:08 -07:00
Anders Hejlsberg
d218a31a7d
Add tests
2019-10-19 10:51:59 -07:00
Daniel Rosenwasser
b845800bdf
Add option to configure automatic optional chain completions ( #34552 )
...
Add option to configure automatic optional chain completions
2019-10-18 17:35:59 -07:00
Andrew Branch
91196fc53f
Ensure functions that have prototype properties assigned by Object.defineProperty get marked as classes ( #34577 )
...
* Ensure functions that have prototype properties assigned by Object.defineProperty get marked as classes
* Revert unneeded change
2019-10-18 16:31:43 -07:00
Nathan Shively-Sanders
cdf1ab2dec
Bind @class in the right place -- bindWorker not bindChildrenWorker ( #34575 )
...
Also add an assert to make future mismatches fail in an obvious place
instead of in a while loop.
2019-10-18 14:13:14 -07:00
Nathan Shively-Sanders
fa1884ed1b
Fix crash in expando assignment to alias ( #34566 )
...
* Fix crash in expando assignment to alias
This PR disallows expando assignments
Fixes #34493 , but disallows the prototype assignment nonetheless.
* Revert mistaken changes
2019-10-18 13:31:44 -07:00
Nathan Shively-Sanders
1d5add528d
Emit computed property temps even w/o init w/useDefineForClassFields ( #34406 )
...
Fixes #33857
2019-10-18 13:23:38 -07:00
Nathan Shively-Sanders
82f927f8dd
Fix stack overflow in circular assignment declaration ( #34543 )
...
* Fix stack overflow in circular assignment declaration
It also needs to have multiple assignments so that it has a ValueModule
flag.
Fixes #33006
* remove errant comment
* Remove other possible circularity
* Restore fallback with additional condition
2019-10-18 09:01:21 -07:00
Tim Suchanek
9ff9c41a9a
Add completion test for partial generic object ( #34559 )
2019-10-18 08:59:49 -07:00
Daniel Rosenwasser
d2fab65df6
Added test.
2019-10-17 17:04:45 -07:00
Andrew Branch
454a3a0b0f
Fix auto-imports from auto type acquisition definitions ( #33766 )
...
* Fix auto-imports from ATA typings
* Compare canonical filenames in isImportablePath
2019-10-17 13:59:09 -07:00
Nathan Shively-Sanders
f5dbcb78af
Resolve more jsdoc value references as types ( #34515 )
...
* Resolve more jsdoc value references as types
* add test
2019-10-17 11:21:34 -07:00
Andrew Branch
f41b7b59ce
Fix quick info for methods whose contextual type is a mapped type property ( #33930 )
2019-10-17 10:54:01 -07:00
Andrew Branch
a95a25b9a7
Fix completions of optional properties in generic positions ( #33937 )
...
* fixes #30507
* Add test case for generic Partial type
* Fixes #28470
* Simplify contextFlags binary check
* Add string literal completion test
* Fix ContextFlags typings
* Speed up inference expression for completion
* Fix baseline merge
* Make contextFlags internal
* Reapply readonly array changes
* accept baselines
* Fix generic completion tests
* Re-merge ContextFlags
* Don’t change type during inference
* Fix typos and superfluous undefined arguments
* Add test for completions in unconstrained generic object literal
2019-10-17 10:45:40 -07:00
Klaus Meinhardt
45d0ef9441
factory: parenthesize for-of expression when necessary ( #34229 )
...
Fixes : #33856
2019-10-17 10:17:33 -07:00
Orta
5d20c573a6
Merge pull request #34524 from orta/fix_32675
...
Does not add a duplicate completion when offering an export which was re-declared as a global
2019-10-17 13:08:32 -04:00
Orta Therox
85010fa6fe
Make sure that global module re-exports are short-cutted to be added to completions
2019-10-17 12:33:01 -04:00
Nathan Shively-Sanders
f3a234caac
Dedupe inherited jsdoc comments ( #34522 )
...
JSDoc on own properties was already deduped, but inherited jsdoc was
incorrectly not deduped.
Fixes #32708
2019-10-16 15:56:01 -07:00
Orta Therox
c40ddb183e
Does not add a duplicate completion when offering an export which was re-declared as a global - fixes #32675
2019-10-16 17:02:35 -04:00
Klaus Meinhardt
178417f431
factory: correctly parenthesize conditional head ( #34227 )
...
Fixes : #34109
2019-10-16 10:41:52 -07:00
Nathan Shively-Sanders
29f9493d87
Fix crash when exporting+aliasing globalThis inside declare global ( #34408 )
...
* global module:Fix crash when exporting+aliasing globalThis
* Fix another globalThis crash
find-all-refs assumed that an export inside a `declare x` was always an
ambient module, but it is not -- `declare global` does not allow
`export`, so find-all-refs shouldn't return any refs for this error case.
2019-10-15 14:05:39 -07:00
Anders Hejlsberg
a685ac426c
Merge pull request #34212 from microsoft/fix34021
...
Fix control flow analysis for --noFallthroughCasesInSwitch
2019-10-15 12:10:53 -07:00
Andrew Branch
e146f0d13d
Allow inferFromUsage to do auto-imports ( #33915 )
...
* Add test
* Auto-import instead of using ImportTypeNodes
* Write more tests and fix namespace case
* Remove unused enum memmber
* Update API baselines
* Lint
* Style nits and util consolidation
2019-10-14 10:33:00 -07:00
Anders Hejlsberg
cc817bc63e
Add tests
2019-10-13 09:45:56 -07:00
Sheetal Nandi
57d7edb7bd
Merge pull request #33883 from microsoft/revert-32887-incrementalNoEmit
...
Revert "Disallow incremental with noEmit"
2019-10-10 13:08:35 -07:00
Wesley Wigham
114329ade8
Handle when import alias has to parent (therefore is synthetic module symbol) ( #33813 )
2019-10-10 04:29:33 -07:00
Andrew Casey
87c905f423
Handle string literals in merge conflict regions
...
Check for undefined, like the other code paths in the same function.
2019-10-09 14:46:19 -07:00
Anders Hejlsberg
6104f746ad
Merge pull request #33831 from microsoft/falseAssertions
...
Code following truthiness assertion with false argument is unreachable
2019-10-09 13:23:05 -07:00
Klaus Meinhardt
e48cd3a101
Fix noImplicitAny check on ambient private getters ( #33896 )
2019-10-09 10:05:26 -07:00
Sheetal Nandi
8032984de2
Revert "Disallow incremental with noEmit"
2019-10-08 13:41:40 -07:00
Wenlu Wang
3d8252c70e
avoid space before dot question ( #33840 )
2019-10-07 17:11:54 -07:00
Anders Hejlsberg
e0bd810176
Update tests
2019-10-05 18:58:51 -07:00
Anders Hejlsberg
eeaa752833
Add tests
2019-10-05 18:33:00 -07:00
Anders Hejlsberg
afe6f4c95c
Merge pull request #33821 from microsoft/fix33806
...
Reflect control flow effects of optional chains in equality checks
2019-10-05 17:48:53 -07:00
Anders Hejlsberg
f88518187b
Add tests
2019-10-05 13:08:31 -07:00
Anders Hejlsberg
42500d0606
Add tests
2019-10-04 16:12:44 -07:00
Anders Hejlsberg
2447bd775f
Update tests
2019-10-04 16:01:09 -07:00
Ron Buckton
a47ac63738
Fix for incorrect 'this' type for optional call ( #33799 )
2019-10-04 13:39:42 -07:00
Andrew Branch
e2b4c12596
Detect unbindable exports before setting CommonJS module indicator ( #33784 )
...
* Detect unbindable exports before setting CommonJS module indicator
* Fix comment
* Fix unrelated lint?
2019-10-04 11:52:38 -05:00
Ron Buckton
c774762723
Fix crash in transformations ( #33768 )
2019-10-02 16:13:32 -07:00