Sheetal Nandi
a4091ae8e3
Merge branch 'master' into incrementalFromCommandLine
2019-03-26 14:57:18 -07:00
Sheetal Nandi and GitHub
307bf39572
Merge pull request #30605 from Microsoft/sourceFileVersionTsc
...
Ensure that we are setting source file version with --incremental from tsc (without --build or --watch)
2019-03-26 14:53:13 -07:00
Sheetal Nandi
7457e5d9fe
Pull out the incremental compilation into a function so we can test it
2019-03-26 14:28:05 -07:00
Sheetal Nandi
021444a248
Make it as api so we can test it
2019-03-26 14:25:56 -07:00
Sheetal Nandi
e28869d888
Ensure that from tsc with --incremental sets source file version
...
Fixes #30588 and #30589
2019-03-26 14:25:47 -07:00
Sheetal Nandi
684c531386
Always assert that source files are versioned when program is used with Builder
2019-03-26 11:55:12 -07:00
TypeScript Bot and Nathan Shively-Sanders
72dc16a627
Update user baselines ( #30595 )
2019-03-26 07:31:19 -07:00
Anders Hejlsberg
fca46bb706
Compute per-element contextual type in getSpreadArgumentType
2019-03-26 07:00:19 -07:00
Sheetal Nandi
35470b3f3b
Make tsbuildInfoFile as commandline option to tsc (and not tsc -b)
2019-03-25 14:47:36 -07:00
Nathan Shively-Sanders and GitHub
32054f1c31
Forbid accessing block-scoped variables on globalThis ( #30510 )
...
* Forbid accessing const & let on globalThis
It's just an error; you still get the type of the property.
* Disallow access of blockscoped vars on globalThis
Also change Array, Function, String, et al from `const` to `var` so that
they remain accessible via `globalThis.String`.
* Update baselines after lib.d.ts change
Note especially the change in redefineArray, which is now allowed as
long as you provide a type that is assignable to ArrayConstructor.
* Remove blockscoped vars from typeof globalThis
Unlike forbidding them, this removes the properties entirely.
Unfortunately, this means that accessing these properties is only an
error with noImplicitAny, and that error is quite confusing.
Let's discuss our options. I see 3:
1. Forbid access of block-scoped vars as properties (in all flag
settings), but leave them on the type. Simple to implement.
2. Remove block-scoped vars from the globalThis type. Has the bad
error/flag behaviour described above, but simple to implement.
3. Remove block-scoped vars from the globalThis type. Also, forbid
accessing them by executing another resolveName lookup for failed
property accesses on globalThisSymbol. If the second lookup returns a
blockscoped var, issue an error instead of falling back to the index
signature. This seems too complex to me.
* Update baselines
* Better error for block-scoped usage on globalThis
So that value-space references have as clear an error as type-space
references.
* Update fourslash tests
* Fix semi-colon lint
* Don't copy so much when filtering blockscoped vars
2019-03-25 14:07:48 -07:00
Anders Hejlsberg
de76d55ddd
Accept new baselines
2019-03-24 11:34:22 -07:00
Anders Hejlsberg
887b30682b
Add tests
2019-03-24 11:34:14 -07:00
Anders Hejlsberg
6dc8b5f8fb
Accept new baselines
2019-03-24 11:24:45 -07:00
Anders Hejlsberg
3d0e2f5f45
Introduce ContextFlags to propagate origin of request for contextual type
2019-03-24 11:15:51 -07:00
BigAru
2a15acbbfd
refactor creation of template expression
2019-03-24 19:14:19 +01:00
BigAru
29fc8c30ba
support case when variable is re-assigned
2019-03-24 16:52:26 +01:00
BigAru
1bcd8da415
clean test cases
2019-03-24 16:52:26 +01:00
BigAru
d2ab0bd05a
support single quotes when decoding raw string
2019-03-24 16:52:26 +01:00
BigAru
6a1df730c5
complete handling for octal escape
2019-03-24 16:52:26 +01:00
BigAru
806eb125d9
add skeleton for handling octal escape
2019-03-24 16:52:26 +01:00
BigAru
cf25c12d81
add test cases
2019-03-24 16:52:25 +01:00
BigAru
3ce216849a
extract getEdits for template literal
2019-03-24 16:52:25 +01:00
BigAru
16109dfd00
optimize templateLiteral check
2019-03-24 16:52:25 +01:00
BigAru
2b08bd3faf
change from tuple to object literal
2019-03-24 16:52:25 +01:00
BigAru
9b9aa350af
optimize getEdits string concatenation
2019-03-24 16:52:25 +01:00
BigAru
ad0614abea
extract getEdits for string concatenation
2019-03-24 16:52:25 +01:00
BigAru
08ed6cf8bd
optimize nodesToTemplate
2019-03-24 16:52:25 +01:00
BigAru
6721966504
extract creation of templateHead
2019-03-24 16:52:25 +01:00
BigAru
cba0ddcbde
only show toString if expression is not binary
2019-03-24 16:52:24 +01:00
BigAru
1594468250
add possibility to invoke from parentheses
2019-03-24 16:52:24 +01:00
BigAru
74e3cd758e
remove parentheses also when expression at ending
2019-03-24 16:52:24 +01:00
BigAru
7d9e8f4e21
treat corner cases
2019-03-24 16:52:24 +01:00
BigAru
882e616009
optimize preceding expression
2019-03-24 16:52:24 +01:00
BigAru
6de23d766a
do not offer refactoring for tagged templates
2019-03-24 16:52:24 +01:00
BigAru
6fe4663d92
combine preceding expressions to one
2019-03-24 16:52:24 +01:00
BigAru
76ce1c67ac
fix test case
2019-03-24 16:52:24 +01:00
BigAru
3b284886b1
add toString visibility from expression and from middle part
2019-03-24 16:52:23 +01:00
BigAru
576271ef55
catch empty head of template literal
2019-03-24 16:52:23 +01:00
BigAru
2b299943f9
complete toString
2019-03-24 16:52:23 +01:00
BigAru
3d2b552fd3
complete toTemplate
2019-03-24 16:52:23 +01:00
BigAru
fc13b2b43a
add test cases
2019-03-24 16:52:23 +01:00
BigAru
b84f95dc5d
add working conversion to template literal
2019-03-24 16:52:23 +01:00
BigAru
03f0f88101
add diagnostic messages
2019-03-24 16:52:23 +01:00
BigAru
6952b1f9a7
add visibility tests
2019-03-24 16:51:22 +01:00
BigAru
2bb2a8246a
add test cases
2019-03-24 16:51:22 +01:00
BigAru
7620615212
add test cases
2019-03-24 16:51:22 +01:00
BigAru
2db0745b64
add skeleton
2019-03-24 16:51:22 +01:00
Anders Hejlsberg
7ec7f02ec3
Instantiate contextual type using non-fixing mapper
2019-03-23 10:46:46 -07:00
Wesley Wigham and GitHub
e20b87f66d
Add script for posting perf results back to GH ( #30526 )
...
* Add script for posting perf results back to GH
* Slightly more logging, use html url, not api url, lol
* Log even more, nonzero exit code on error
2019-03-22 17:39:20 -07:00
Gabriela Araujo Britto and GitHub
0f6f3b79b5
Fix find all references of inherited constructor ( #30514 )
...
* recursively look for inherited constructor references
* add test
* remove outdated comment
* add tests
* move function
* improve tests
* minor refactor
* fix convert params refactoring to deal with inherited constructor calls
* simplify refactor test
2019-03-22 15:17:50 -07:00