Ron Buckton
4c6e93b166
Merge pull request #23878 from Microsoft/vfsBaselines
...
New vfs baselines follow-up
2018-05-03 16:35:48 -07:00
Wesley Wigham
0d7d75ec64
Add formatting rule for import type import keyword and open paren ( #23872 )
2018-05-03 14:57:01 -07:00
Andy
406ca06e8e
Fix bug: JSDocPropertyTag is a declaration ( #23876 )
2018-05-03 14:19:15 -07:00
Ron Buckton
f67afa098f
Unpatch vfs resolver and default lib rename
2018-05-03 14:18:50 -07:00
Andy
38016f9300
Implement feedback on "Improve completions testing" ( #23842 )
2018-05-03 13:04:08 -07:00
Andy
bad3a44bb2
In insertNodeAfter, handle file with no trailing newline ( #23814 )
2018-05-03 12:58:42 -07:00
Wesley Wigham
eb80e9a51c
node builder should strive to preserve mapped type keyofness ( #23815 )
2018-05-03 12:38:31 -07:00
Wesley Wigham
23b9a23455
Ensure properties with computed names are visited ( #23787 )
2018-05-03 11:21:29 -07:00
Wesley Wigham
19a985eb24
Dont consider global augmentation top-level members as having the export modifier ( #23846 )
...
* Dont consider global argumentation top-level members as having the export modifier
* Remove unneeded test parts from repro
2018-05-03 11:21:11 -07:00
Wesley Wigham
b467cd8a99
Move property errors to the name for the error span ( #23865 )
2018-05-03 10:55:44 -07:00
Wesley Wigham
41182c2f0b
Stop using circularity-unchecked-caching ( #23808 )
...
* Stop using circularity-unchecked-caching
* Add comment
2018-05-03 10:44:17 -07:00
Ron Buckton
56648ad0f1
Merge pull request #20763 from Microsoft/vfs
...
Update harness to use single robust virtual file system for tests.
2018-05-03 10:25:20 -07:00
Andy
724e656acb
Don't show a definition at a 'require' call ( #23822 )
2018-05-03 08:02:56 -07:00
Wesley Wigham
9c40d276ab
Downlevel destructuring in module transformer if destructured variable has multiple names ( #23832 )
...
* Downlevel destructuring in module transformer if destructured variable has multiple names
* Alter indentation
2018-05-02 16:20:47 -07:00
Wesley Wigham
b5b7fc4f1d
Flag default imports with named imports as needing importStar ( #23795 )
...
* Flag default imports with named imports as needing importStar
* Restructure helpers a bit, add double-default testcase
2018-05-02 16:20:34 -07:00
Andy
306418e171
fixAddMissingMember: Add a new PropertyDeclaration at the end of the first set ( #23837 )
2018-05-02 15:42:05 -07:00
Ron Buckton
66c11c527a
Update completion order in test
2018-05-02 10:51:09 -07:00
Ron Buckton
d62a11ffc0
Merge branch 'master' into vfs
2018-05-01 18:58:31 -07:00
Wesley Wigham
c663645c91
Inform getDeclarationSpaces about how an imported exportAssignment may merge ( #23816 )
2018-05-01 17:24:30 -07:00
Andy
333b8ff028
Fix typo: || should be parenthesized ( #23811 )
2018-05-01 14:59:58 -07:00
Andy
a1f9a4fb24
fixCannotFindModule: Special handling for node core modules like "fs" ( #23807 )
...
* fixCannotFindModule: Special handling for node core modules like "fs"
* Hardcode @types/node
2018-05-01 14:33:42 -07:00
Anders Hejlsberg
3bfbe68b5a
Merge pull request #23806 from Microsoft/objectAndUnconstrainedTypeParameter
...
Unconstrained type variable not assignable to 'object'
2018-05-01 13:24:16 -07:00
Anders Hejlsberg
4c933aef9a
Check that test cases produce expected types
2018-05-01 13:05:49 -07:00
Andy
9f4abe2d79
Improve completions testing ( #23591 )
2018-05-01 13:00:13 -07:00
Anders Hejlsberg
59355cbfdb
Add regression tests
2018-05-01 12:44:46 -07:00
Andy
cee4289f58
Add code fix to convert 'require' in a '.ts' file to an 'import' ( #23711 )
...
* Add code fix to convert 'require' in a '.ts' file to an 'import'
* Only add suggestion for modules
* Revert "Only add suggestion for modules"
This reverts commit b1a728fdacacf7089e8995f6a5caddac27ef5e62.
2018-05-01 09:24:02 -07:00
Nathan Shively-Sanders
5ea4d3b2bb
No error for require, module.exports or exports in Javascript ( #23743 )
...
* No error for require
Still errors for module and exports, and require's type is now
incorreclty 'any'; I broke module resolution somehow. Needs
investigation.
* module/exports symbols+update isCommonJsRequire
Everything passes the tests but the code can be improved
* Update baselines
* Cleanup
* Update baselines of new tests
* Get rid of exports symbol
It wasn't doing anything anyway.
2018-04-30 15:47:59 -07:00
Nathan Shively-Sanders
7cda045d52
Always export typedefs ( #23723 )
...
* Always export typedefs
This actually just required deleting a check in declareModuleMembers
and checking for external AND commonjs modules in a couple of places.
However, while experimenting with this feature, I discovered that even
previously-exported typedefs would only be exported if they came after a
commonjs export node. So I added a commonjs check to the pass in the
parser. It will not catch nested module.exports, but it will catch
top-level assignments.
The new test tests both changes.
* Post-bind typedef instead of pre-checking for commonjs
* Duplicate identifier errors
* Fix class type reference resolution+update baselines
* Move to a type-based check for duplicate identifiers
2018-04-30 14:55:26 -07:00
Wesley Wigham
0c244d86b3
Add used-before-declaration errors for class refs inside computed names ( #23784 )
2018-04-30 12:55:30 -07:00
Mohamed Hegazy
2c956af927
Merge pull request #23664 from a-tarasyuk/feature/strictPropertyInitialization-can-not-be-used-without-strictNullChecks
...
Add warn that user can not use --strictPropertyInitialization without --strictNullChecks
2018-04-30 12:10:54 -07:00
Anders Hejlsberg
83bc70dd63
Merge pull request #23782 from Microsoft/controlFlowNullTypeAndLiteral
...
Control flow for null type vs. literal
2018-04-30 11:38:00 -07:00
Anders Hejlsberg
0dc42fea74
Add regression tests
2018-04-30 10:43:55 -07:00
Mohamed Hegazy
8793b8c56b
Merge pull request #23697 from Ken703/bug/23047
...
Formatting: fix unwanted space between closing parenthesis and string template
2018-04-30 10:19:17 -07:00
Anders Hejlsberg
936444ad7b
Add tests
2018-04-29 07:55:23 -07:00
Ken703
4e401ca361
update string template rule and test
2018-04-28 19:59:41 -04:00
Anders Hejlsberg
25d5952096
Merge pull request #23751 from Microsoft/reduceIntersectionTypes
...
Remove redundant primitive types from intersections
2018-04-28 11:42:56 -07:00
Daniel Rosenwasser
443c1c7965
Merge pull request #23327 from Microsoft/importDotMeta
...
Support 'import.meta'
2018-04-27 20:52:28 -07:00
Daniel Rosenwasser
12a3e39dca
Specify ESNext module in test.
2018-04-27 18:17:49 -07:00
Anders Hejlsberg
38d1f7f0d2
Add tests
2018-04-27 16:50:09 -07:00
Wesley Wigham
8c5ad2429a
Relax switch-case narrowing restrictions ( #23522 )
...
* Allow switch case narrowing even when individual clauses are nonunit
* And remove unit type restriction
* Rename
2018-04-27 16:30:43 -07:00
Wesley Wigham
47385b29e0
Actually visit expression node on empty destructuring assignment ( #23744 )
2018-04-27 15:55:53 -07:00
Wesley Wigham
6d3b6e21da
Add implicit any errors for destructuring computed names which aren't late bound and have no corresponding index ( #23489 )
...
* Add implicit any errors for destructuring computed names which arent late bound and have no corresponding index
* Add string fallback for number
* Expand test case, make functionality mimic other (buggy) areas
* Add symbol name errors to bring in line with new indexing rules
2018-04-27 15:55:32 -07:00
Anders Hejlsberg
6c28da328e
Merge pull request #23672 from Microsoft/intersectionWithUnionConstraint
...
Type relationships for intersections with union constraints
2018-04-27 15:53:00 -07:00
Anders Hejlsberg
5ecd03e8c0
Merge pull request #23660 from Microsoft/fixIndexTypeTargetConstraint
...
Fix constraint of 'keyof T[K]' in target position
2018-04-27 15:52:21 -07:00
Nathan Shively-Sanders
3631af6486
Remove readonly from object rest properties ( #23746 )
...
* Remove readonly from object rest properties
Works the same as removing it from object spread properties
* Fix bug number in test
2018-04-27 14:54:59 -07:00
Ron Buckton
4863d55d01
Merge branch 'master' into vfs
2018-04-27 14:03:42 -07:00
Wesley Wigham
d5ef1174bd
Copy consistient valueDeclarations on union/intersection symbols ( #23190 )
2018-04-27 13:12:35 -07:00
Nathan Shively-Sanders
1595f7fe83
Add prettier user test and fix associated crash ( #23715 )
...
* Add prettier and fix crash bug
Name resolution would crash when resolving a type name inside a
typedef's property tag.
* Update tsconfig and thefore prettier baseline
2018-04-26 14:03:18 -07:00
Alexander T
f04a18ae5b
Add tests
2018-04-26 20:18:24 +03:00
Nathan Shively-Sanders
1541599ea0
Check base type for special property declarations ( #23671 )
...
If the base type has a property by that name, add it to the list
constructor types to make it as authoritative as special assignments
found in the constructor.
2018-04-26 08:14:22 -07:00