Commit Graph
14347 Commits
Author SHA1 Message Date
Anders Hejlsberg e086c32bdd A few additional changes 2019-10-17 14:13:44 -07:00
Anders Hejlsberg fbcad0c92d All intersection constituents must relate to target index signature 2019-10-17 12:28:59 -07:00
Sheetal Nandi aaadb17afe Merge pull request #34495 from microsoft/forceDts
Add forceDtsEmit flag to getEmitOutput
2019-10-16 08:14:47 -07:00
Eli Barzilay 22c15a2e6e Merge pull request #34365 from elibarzilay/fix-exit-code-on-bogus-build-file
Fix exit code on bogus build file
2019-10-15 15:09:45 -07:00
Nathan Shively-Sanders ab56cc0c6b Remove property-override-method error (#34494)
Originally removed incorrectly along with method-override-property error
in #24343, then both were restored in #33509. Only
method-override-property should be an error, since it doesn't actually
work at runtime.
2019-10-15 14:11:51 -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
Eli Barzilay cd34808a14 Fixes missing error exit code when a bogus input file is specified
Fixes #33849.
2019-10-15 15:35:07 -04:00
Eli Barzilay f25575e5fe Typofix: ..._OutputsSkupped -> ..._OutputsSkipped 2019-10-15 15:13:11 -04: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
Sheetal Nandi 850d16e45f Add forceDtsEmit flag to getEmitOutput
Fixes #33936
2019-10-15 10:07:19 -07:00
Anders Hejlsberg 3438681d6b CR feedback + Consistent error spans on case/default clauses 2019-10-15 08:40:16 -07:00
Sheetal Nandi 4b10145340 Make sure commandline options are absolute paths so they dont conflict with tsbuildinfo paths
Fixes #33667
2019-10-14 14:44:47 -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 a8b9f964b6 Use control flow analyzer for switch case fallthrough checks 2019-10-13 09:45:47 -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
Daniel Rosenwasser 6162001254 fix #33427 (#33486)
fix #33427
2019-10-10 10:13:36 -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
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
Wesley Wigham f1c0300c02 Include project reference in release config so LKG build works (#33864) 2019-10-07 17:31:42 -07:00
Ron Buckton 01b3d41124 Add external mapShim/debug modules (#33712)
* Add external mapShim/debug modules

* rename test file
2019-10-07 13:31:07 -07:00
Daniel Rosenwasser 09a87b9e91 'amd' missing from error message for error TS1323 (#33803)
'amd' missing from error message for error TS1323
2019-10-07 10:12:31 -04:00
Anders Hejlsberg 92212ae19e More succinct 2019-10-06 10:06:40 -07:00
Anders Hejlsberg 720964f729 Fix bounds check 2019-10-05 19:14:48 -07:00
Anders Hejlsberg d415b57d01 Merge branch 'master' into falseAssertions 2019-10-05 18:04:30 -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 f7b22a0216 Support typeof and instanceof 2019-10-05 13:08:24 -07:00
Anders Hejlsberg 719b779b6b Reflect CFA effects of optional chains in equality checks 2019-10-04 15:27:32 -07:00
Ron Buckton a47ac63738 Fix for incorrect 'this' type for optional call (#33799) 2019-10-04 13:39:42 -07:00
Anders Hejlsberg feed4b9b53 Code following truthiness assertion with false argument is unreachable 2019-10-04 12:30:02 -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
Alexander T d9d3e310a0 'amd' missing from error message for error TS1323 2019-10-04 10:21:14 +03:00
Ron Buckton c774762723 Fix crash in transformations (#33768) 2019-10-02 16:13:32 -07:00
Daniel Rosenwasser a3a55cab2c Improve error message when reserved word is used as identifier (#33702)
Improve error message when reserved word is used as identifier
2019-10-01 16:20:28 -04:00
Wesley Wigham 410ff90c54 Fix the third crash in the chrome user suite test by remembering to pass excludeThisKeyword (#33711) 2019-10-01 13:14:23 -07:00
Daniel Rosenwasser 20f42f45ff Merge pull request #33709 from microsoft/moveMessageNumbers
Move error codes to appropriate section
2019-10-01 15:37:23 -04:00
Ron Buckton 526ed5284e Ensure prepend texts are set when skipping internals (#33694) 2019-10-01 12:33:17 -07:00
Daniel Rosenwasser 933065b69c Change error codes. 2019-10-01 12:18:01 -07:00
Mukesh Prasad 03a3589225 Better error message for mistaken import (#40)
Issue number of the reported bug or feature request: microsoft#13601
2019-10-01 17:27:38 +01:00
Sheetal Nandi 2d96a163d1 Merge pull request #33681 from microsoft/autoTypeReference
Fix issue when types installed after watch/editor is opened for auto type reference that is for global types not being detected
2019-10-01 08:28:08 -07:00
Sergey Tychinin ab879939df Improve error message when reserved word is used as identifier
Signed-off-by: Sergey Tychinin <stychinin@bloomberg.net>
2019-10-01 10:48:17 -04:00
Andrew Branch 7be7cba050 Fixes binding well known symbol assignment via element access (#33687)
* Fix binding well-known symbols by element access

* Add navigationBar test

* Revert settings.json change

* Accept baselines

* Actually make it bind

* Accept API baselines

* Dont use internal name in API
2019-09-30 16:14:07 -07:00
Wenlu Wang 7c50bccec2 nullish coalescing commit (#32883)
* migrate nullish coalescing commit

* add more test case

* add branch type check test

* add more tests

* fix nullish precedence

* update public api

* add rescan question question token to fix regression

* update public api baseline

* Added tests that emit for nullish coalescing operator conforming with grammar restrictions when assertions are used.

* Fixed emit to hoist temporary variables (they previously went undeclared).
Added tests to ensure calls and property accesses are only called once.

* use not equal to null

* rename factory

* add grammar check

* fix more cases

* Fix handling of nullish coalescing oprator in expando objects.

* Fixed classifier to support ?? operator.

* update baseline

* accept baseline

* fix review

* update emitter and more testcase

* update control flow

* make linter happy

* update libs

* avoid unnecessary assert

* fix typooo

* Fixes for control-flow analysis
2019-09-30 15:33:50 -07:00
Wesley Wigham 9a7fdade07 Fix crash in contextual typing of defaulted element access declarations (#33686) 2019-09-30 14:42:55 -07:00
Wesley Wigham 98cf317005 Add error message for set accessor vsibility issues (#33683) 2019-09-30 13:12:40 -07:00
Andrew Branch f89de95955 Allow special element access assignments to create declarations (#33537)
* Start enabling element access special assignment

* Treat element access assignment as special assignment in JS

* Make declarations for bindable element access expressions

* Fix navigationBar crash

* Add multi-level test for JS

* Propagate element access expressions to more code paths

* Fix property access on `this`

* Add quick info test

* Uhhh I guess this is fine

* Fix module["exports"] and property access chained off element access

* Add test for this property assignment

* Add test for and fix prototype property assignment

* Fix teeeest???

* Update APIs

* Fix element access declarations on `this`

* Fix go-to-definition

* Add declaration emit to tests

* Reconcile with late-bound symbol element access assignment

* Fix baselines

* Add JS declaration back to tests

* Fix JS declaration emit of non-late-bound string literal property names

* Revert accidental auto-format

* Use `isAccessExpression`

* Add underscore escaping member to test

* Fix and test navBar changes
2019-09-30 15:08:44 -05:00
Ron Buckton fcd9334f57 Add support for Optional Chaining (#33294)
* Add support for Optional Chaining

* Add grammar error for invalid tagged template, more tests

* Prototype

* PR feedback

* Add errors for invalid assignments and a trailing '?.'

* Add additional signature help test, fix lint warnings

* Fix to insert text for completions

* Add initial control-flow analysis for optional chains

* PR Feedback and more tests

* Update to control flow

* Remove mangled smart quotes in comments

* Fix lint, PR feedback

* Updates to control flow

* Switch to FlowCondition for CFA of optional chains

* Fix ?. insertion for completions on type variables

* Accept API baseline change

* Clean up types

* improve control-flow debug output

* Revert Debug.formatControlFlowGraph helper
2019-09-30 12:33:28 -07:00
Anders Hejlsberg 7ce793c5b8 Merge pull request #33678 from microsoft/fix33617
Property handle recursive type references in type inference
2019-09-30 11:15:27 -07:00
Wesley Wigham 7f3c03d441 Implement declaration emit for accessors in the js declaration emitter (#33649)
* Implement declaration emit for accessors in the js declaration emitter

* Use `or`
2019-09-30 11:09:35 -07:00