28628 Commits

Author SHA1 Message Date
Andrew Branch
f98c00ab9d
Add more tests, special handling for mapped types 2019-04-18 16:05:05 -07:00
Andrew Branch
af3d0f0248
Start smart select API 2019-04-18 16:05:05 -07:00
Matt Bierner
7ccc89b0d7 Check to make sure default npm exists at path before trying to use it (#30910)
* Check to make sure default npm exists at path before trying to use it

**Bug**
If the typings installer is run under a copy of node that does not include npm—but on a machine that does have npm installed—it will incorrectly try to use the npm that does not exist next to its running version of node

**Fix**
Make sure that we check that npm we select exists before trying to use it as the default. Otherwise, fall back to using plain old `npm`

* Add command line flag to gate new behavior

* Fix missing semicolon
2019-04-18 14:24:41 -07:00
Andrew Branch
680d18207c
Add tests for destructuring from variable with inferrable type 2019-04-18 12:01:11 -07:00
Andrew Branch
af498eb6ca
Clean up synthetic binding name creation and discriminating 2019-04-18 11:50:26 -07:00
Anders Hejlsberg
4ce0d202e9 Accept new baselines 2019-04-18 11:39:36 -07:00
Wesley Wigham
d987907d2b
Remove no longer extant gulp command from README (#31019) 2019-04-18 11:38:01 -07:00
Andrew Branch
e7fb18e395
Handle case where you have to add a destructuring after a try/catch block 2019-04-18 11:36:47 -07:00
Anders Hejlsberg
3a89fead70 Merge branch 'master' into ignoreStringIndexSignaturesOnly
# Conflicts:
#	tests/baselines/reference/keyofAndIndexedAccess2.errors.txt
#	tests/baselines/reference/keyofAndIndexedAccess2.js
#	tests/baselines/reference/keyofAndIndexedAccess2.symbols
#	tests/baselines/reference/keyofAndIndexedAccess2.types
#	tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts
2019-04-18 11:31:06 -07:00
Nathan Shively-Sanders
c3a9429420
Handle JSDoc backticks in the parser, not scanner (#30939)
* Scan backticks in jsdoc as a single token less often

Previously, matching backticks in jsdoc would always be scanned as one
token to aid parsing incorrect jsdoc that uses backticks for parameter
names:

``js
/** @param {string} `nope`
 * @param {number} `not needed`
 */
```

However, this is wrong for code fences, which use triple backticks. This
fix parses a single backtick as a single token if it's immediately
followed by another backtick or by a newline. It retains the
questionable tokenisation of backticks-as-pairs in other cases, however.
A better fix might be to have the parser ignore backticks in jsdoc
instead.

* Add test case

* Handle jsdoc backticks in the parser, not scanner

Previously, the jsdoc scanner had ad-hoc handling of backticks that was
similar in structure to the normal scanner's handling, but much simpler.
This was a smaller code change, but is handled backwards: the special
case of backtick-quoted parameter names was handled in the scanner
instead of in the jsdoc identifier parsing code. That made it overapply
and block correct handling of asterisks across newlines, which was most
obvious in code fences inside jsdoc, as in #23517.

Fixes #23517

* More cleanup
2019-04-18 09:35:40 -07:00
Wesley Wigham
0574c1fae1
Hide the table of perf results from the bot inside an expando element (#31007) 2019-04-18 09:09:22 -07:00
Andrew Branch
92f0ac7efc
Remove unnecessary change 2019-04-17 18:48:01 -07:00
Andrew Branch
08bb58b0c1
Enable renaming object binding patterns when needed 2019-04-17 18:43:01 -07:00
Andrew Branch
ef18453166
Add tests for binding elements that need to be renamed 2019-04-17 18:43:01 -07:00
Andrew Branch
42c9b47add
Fix let/const selection for binding patterns 2019-04-17 18:43:01 -07:00
Andrew Branch
06c8506f96
Add new baselines 2019-04-17 18:43:01 -07:00
Andrew Branch
4c73b2e7bd
Basic support for binding patterns in async/await code fix 2019-04-17 18:43:00 -07:00
Anders Hejlsberg
33c3ce9cd0
Merge pull request #31002 from Microsoft/fixIsStringIndexSignatureOnlyType
Fix isStringIndexSignatureOnlyType function
2019-04-17 17:19:34 -07:00
Sheetal Nandi
2a29880c61 Handle simple lib file in the test case 2019-04-17 16:43:10 -07:00
Sheetal Nandi
d5100bb95e Merge branch 'master' into dtsSignatureChange 2019-04-17 16:36:09 -07:00
Sheetal Nandi
4a55025f20 Code review feedback 2019-04-17 16:32:33 -07:00
Sheetal Nandi
ea2331bcfb
Merge pull request #31005 from Microsoft/tsbuildTestPerf
Improve tsbuild tests perf by not including all built libFiles but dummy lib File
2019-04-17 16:22:35 -07:00
Sheetal Nandi
83941c4655 Fix lateBoundSymbol test case to handle the simple lib file for the test 2019-04-17 16:19:34 -07:00
Sheetal Nandi
b337565747 Merge branch 'master' into tsbuildTestPerf 2019-04-17 16:05:00 -07:00
Sheetal Nandi
058cb91d03
Merge pull request #30970 from Microsoft/incrementalLateSymbol
When adding resolvedMembers ensure lateBoundSymbol is added whether it was previously checked or not
2019-04-17 16:04:12 -07:00
Sheetal Nandi
0c18d032e7 Merge branch 'master' into incrementalLateSymbol 2019-04-17 15:41:53 -07:00
Sheetal Nandi
acbedade42 No need to fix hash of lib files since the content is now fixed 2019-04-17 15:37:56 -07:00
Sheetal Nandi
dc7d77f2c7 Make the tsbuild tests use simple libFile instead of bigger lib file set 2019-04-17 15:35:00 -07:00
Sheetal Nandi
b9145f98e1
Merge pull request #30980 from Microsoft/configChangeForEmit
Make sure to emit again if change in compiler option affects emit
2019-04-17 15:14:12 -07:00
Sheetal Nandi
d919f2c113 Add test for #28334 2019-04-17 15:13:09 -07:00
Anders Hejlsberg
a40b08d1d7
Merge pull request #30944 from Microsoft/fixInferenceToMappedType
Fix inference from enum object type to generic mapped type
2019-04-17 15:10:34 -07:00
Anders Hejlsberg
462caf8d8e Accept new baselines 2019-04-17 15:06:06 -07:00
Anders Hejlsberg
4d0244c798 Add regression test 2019-04-17 15:05:57 -07:00
Anders Hejlsberg
9b3b8e3203 Ignore generic mapped types in isStringIndexSignatureOnlyType 2019-04-17 14:59:28 -07:00
Nathan Shively-Sanders
4420d1083b
Add diagnostics for relation cache size (#30999)
* Add diagnostics for relation cache size

* Move to extendedDiagnostics

* Single method that returns a 3-property object

* Fix double-space lint
2019-04-17 14:32:18 -07:00
Anders Hejlsberg
50fdeccd7f One more iteration 2019-04-17 13:58:05 -07:00
Sheetal Nandi
3af78ae77a Revert and always use merged symbol to get members of late bound symbol
Fixes #30891
2019-04-17 12:58:12 -07:00
Anders Hejlsberg
f9a55ac55e Accept new baselines 2019-04-17 12:37:10 -07:00
Anders Hejlsberg
07d259593a Add regression test 2019-04-17 12:37:01 -07:00
Anders Hejlsberg
68585f2a1e Ignore string (but keep numeric) index signatures coming from constraints 2019-04-17 11:20:50 -07:00
Wesley Wigham
169e485d90
Perform excess property checking on intersection and union members (#30853)
* Perform excess property checking on intersection and union members

* Allow partial union props to contain the undefined type

* Add test case from #30771

* Un-terse getPossiblePropertiesOfUnionType side-effecting code

* Fix bug exposed in RWC

* Cache results of getPossiblePropertiesOfUnionType

* Fix whitespace
2019-04-16 21:58:48 -07:00
Anders Hejlsberg
3435451dcc Even more succinct 2019-04-16 18:26:24 -07:00
Anders Hejlsberg
efa16ac11f Address CR feedback 2019-04-16 17:41:33 -07:00
Sheetal Nandi
15ae8a7273 Make sure to emit again if change in compiler option affects emit
Fixes #30736
2019-04-16 16:18:37 -07:00
Sheetal Nandi
ae7e00e741 Combine semantic diagnostics of files using exported entities from modules and their dts emit 2019-04-16 14:18:03 -07:00
Sheetal Nandi
17d2c8bcfb Handle dts change as well as signature update when exported module affects dts but not js file 2019-04-16 13:27:51 -07:00
Sheetal Nandi
db8c6ee67a When exported types from module change, the modules exporting these types indirectly mean d.ts change too (not just semantic diagnostics) 2019-04-16 13:05:23 -07:00
Sheetal Nandi
0be9a22dbf Remove unnecessary check since seenEmittedFiles is set when getting pending affected files 2019-04-16 12:53:45 -07:00
Sheetal Nandi
707cb93891 Write test case that baselines the incremental build result
Testcase for #30780
2019-04-16 12:50:37 -07:00
Sheetal Nandi
3c67608715 When interfaces are merged, always ensure that the parent symbol of the late bound member symbol is declared symbol containing the node.
Ensure that resolvedMembers adds the late bound symbol even when its resolved sunce lateBoundMember may or may not be added to resolved members depending on when its checked
Fixes #30891
2019-04-16 12:36:46 -07:00