Cotton Hou
9a8e1bf8a6
Add ES2017 string padding ( #12152 )
...
* add es2017.string.d.ts for String.prototype.{padStart,padEnd}
* append es2017.string.d.ts into es2017.d.ts
* add es2017.string into commandLineParser
* append es2017.string into error message for unit tests of commandLineParser
* append es2017.string into Gulpfile
* append es2017.string into Jakefile
2016-11-10 12:43:51 -08:00
Nathan Shively-Sanders
205ce3247f
Merge pull request #12154 from Microsoft/import-helpers-reports-errors-for-__rest
...
Import helpers reports errors for __rest
2016-11-10 12:29:39 -08:00
Vladimir Matveev
3ecb60146b
synthesize complete import declaration for tslib ( #12151 )
2016-11-10 11:57:37 -08:00
Nathan Shively-Sanders
d6bf27d6b6
Correctly check spread assignments in strict mode
...
Previously it crashed in the binder.
2016-11-10 11:46:10 -08:00
Nathan Shively-Sanders
0d4ac01574
Report errors for import helpers missing __rest
2016-11-10 11:45:56 -08:00
Sheetal Nandi
c87bce1119
Merge pull request #11978 from Microsoft/errorReportingInJsFile
...
Report all the js file errors and skip only the nodes that are not allowed in JS file
2016-11-10 10:37:16 -08:00
Sheetal Nandi
c458576553
Merge pull request #12135 from Microsoft/jsxFactory
...
Support for --jsxFactory option
2016-11-10 09:49:57 -08:00
Sheetal Nandi
2eba10a25b
Updated condition for more readability
2016-11-10 09:40:50 -08:00
Nathan Shively-Sanders
be5e5fb872
Merge pull request #11150 from Microsoft/object-spread
...
Object spread/rest
2016-11-10 09:28:58 -08:00
Nathan Shively-Sanders
6398e0d6dd
Merge pull request #11633 from Microsoft/fix-comparable-in-switch
...
Fix comparable in switch
2016-11-10 09:20:46 -08:00
Nathan Shively-Sanders
25462c9571
Merge pull request #12028 from Microsoft/object-rest
...
Object rest
2016-11-10 09:18:13 -08:00
Sheetal Nandi
dd7f00f20b
Parse the jsxFactory again in the checker instead of using cached value in the program
2016-11-10 08:54:13 -08:00
Sheetal Nandi
3d6950d023
When emitting use jsx factory entity expression if provided
2016-11-09 16:40:11 -08:00
Sheetal Nandi
06affa6672
Resolve first identifier of the jsxFactory as part of type check
2016-11-09 15:35:54 -08:00
Sheetal Nandi
f7bac98948
Verify that jsxFactory is either identifier or qualified name
2016-11-09 14:32:42 -08:00
Nathan Shively-Sanders
fcf32c444f
Treat | undefined like optionality in spread type
2016-11-09 13:39:42 -08:00
Sheetal Nandi
4b8a55793a
Add support for taking in jsxFactory option and report errors for invalid combinations
2016-11-09 12:23:59 -08:00
Sheetal Nandi
78bb276216
Merge branch 'master' into errorReportingInJsFile
2016-11-09 11:38:11 -08:00
Nathan Shively-Sanders
214ce38a6a
Downlevel array destructuring to ES6 in object rest
...
Previously array destructuring inside an object destructuring with an
object rest would downlevel the array destructuring to ES5. This breaks
if the code that targets ES2015 is using iterators instead of arrays
since iterators don't support [0] or .slice that the ES5 emit uses.
2016-11-09 10:47:54 -08:00
Sheetal Nandi
6456325973
Handle abstract and const modifiers
2016-11-09 10:39:46 -08:00
Anders Hejlsberg
2282477012
Merge pull request #12068 from Microsoft/fixTypeAliasDisplay
...
Fix type alias display
2016-11-08 06:43:38 -08:00
Vladimir Matveev
9e3d6efb19
reduce set of files being watched, increase polling interval ( #12054 ) ( #12092 )
2016-11-07 21:13:11 -08:00
Anders Hejlsberg
8f568d4740
Merge pull request #12064 from Microsoft/cacheSignatureInstantiations
...
Cache generic signature instantiations
2016-11-07 17:16:05 -08:00
Ron Buckton
ddc4ae7eac
Reuse subtree transform flags for incrementally parsed nodes ( #12088 )
2016-11-07 16:03:04 -08:00
Vladimir Matveev
0173a3fa79
return empty file watcher in case if target directory does not exist ( #12091 )
...
* return empty file watcher in case if target directory does not exist
* linter
2016-11-07 15:48:46 -08:00
Nathan Shively-Sanders
e1c50e1c40
Address more PR comments
2016-11-07 13:57:26 -08:00
Nathan Shively-Sanders
bd5ce284c9
Set spread type symbols in checkObjectLiteral
...
Instead of getSpreadType.
Also clean up special-case handling inside getSpreadType to be more
readable.
2016-11-07 13:35:36 -08:00
Nathan Shively-Sanders
567f5636e3
Create spread property types eagerly
...
This avoids the need for a synthetic symbol and later code called from
getTypeOfSymbol.
2016-11-07 13:02:05 -08:00
Nathan Shively-Sanders
9977936190
Do not emit __rest for --target esnext
2016-11-07 11:34:37 -08:00
Nathan Shively-Sanders
1866d0580c
Rename variable in checkSwitchStatement per PR
2016-11-07 11:16:54 -08:00
Nathan Shively-Sanders
609cd0016b
Merge branch 'object-spread' into object-rest
2016-11-07 11:10:29 -08:00
Nathan Shively-Sanders
f03fecbd31
Merge branch 'master' into object-spread
2016-11-07 11:02:49 -08:00
Nathan Shively-Sanders
83e95d43f8
Revert unneeded change and comments per PR
2016-11-07 11:00:24 -08:00
Nathan Shively-Sanders
7b9a42f995
Add --target esnext
...
Currently, this disables the rest and spread transforms. This will
change as proposals enter and leave stage 3.
2016-11-07 09:54:48 -08:00
Nathan Shively-Sanders
6a82ae4cbb
Add SpreadAssignment to visitors
...
1. visitNode
2. reduceNode
3. emit
This fixes an emit bug for setters.
2016-11-07 09:04:00 -08:00
Nathan Shively-Sanders
a84c7aeea4
Rename SpreadElementExpression -> SpreadAssignment
...
and SpreadExpression (formerly SpreadElementExpression) -> SpreadElement
2016-11-07 08:36:03 -08:00
Anders Hejlsberg
2bf4bad0e1
Revert incorrect logic from #11392
2016-11-06 16:00:41 -08:00
Anders Hejlsberg
da7f11fe4b
Properly instantiate aliasTypeArguments
2016-11-05 17:36:00 -07:00
Anders Hejlsberg
61b9da548a
Cache generic signature instantiations
2016-11-05 08:20:02 -07:00
Vladimir Matveev
ed4fead087
add missing bind calls to properly set parent on token nodes ( #12057 )
2016-11-04 21:54:22 -07:00
Nathan Shively-Sanders
a55ed26d2b
Spread any types to any
2016-11-04 16:06:33 -07:00
Nathan Shively-Sanders
4c365bd76a
Move transformFunctionBody to factory
...
It is shared by es2015 and esNext transformers.
This commit just adds a convertObjectRest flag to be passed on to
flattenDestructuring functions, as well as adding necessary parameters
to use the code outside a transformer.
2016-11-04 13:56:28 -07:00
Nathan Shively-Sanders
cc342d12e7
Move convertForOf to factory for esnext and es2015
...
Saves a lot of duplicated code
2016-11-04 11:06:56 -07:00
Sheetal Nandi
4a906143c6
Merge pull request #11998 from Microsoft/unusedProperty
...
Mark property referenced in the destructuring as referenced
2016-11-04 10:42:05 -07:00
Nathan Shively-Sanders
71f3157a35
Address PR comments
...
1. Remove extra line in __rest shim.
2. Improve __rest vs __assign check for destructuring assignment.
2016-11-04 09:03:03 -07:00
Ron Buckton
defc0537ae
Merge pull request #12039 from Microsoft/fix12010
...
Ensure transformFlags are correct before visiting a node.
2016-11-03 23:38:52 -07:00
Zhengbo Li
1c004bf317
Port #12027 , #11980 and #11932 to master ( #12037 )
...
* add test for the fix for overwrite emitting error
* cr feedback
2016-11-03 21:13:41 -07:00
Ron Buckton
cbec19afd7
Ensure transformFlags are correct before visiting a node.
2016-11-03 17:21:36 -07:00
Nathan Shively-Sanders
c9c5f49a24
Improve readability of ES next destructuring emit
2016-11-03 13:36:35 -07:00
Anders Hejlsberg
6a5de5d00e
Fix linting errors
2016-11-03 10:55:58 -07:00