Sheetal Nandi
1a2fda0f56
Add support to update module resolutions on watches from mono repo like setup with path mapping
...
Fixes #22349
2018-05-04 15:39:06 -07:00
Sheetal Nandi
528bf84a7a
Create a test case for module resolution when symlinked folder contents change and resolve modules
...
Test case for #22349
2018-05-04 15:14:28 -07:00
Sheetal Nandi
5ecfa782fc
Few renames to distinguish between fs File and File in the test case to load in the VFS with watch
2018-05-04 15:10:23 -07:00
Wesley Wigham
618da24d6a
Look at simplified types when checking distributive conditional constraints ( #23884 )
2018-05-04 14:35:39 -07:00
Andy
df9e2621d2
Fix find-all-refs for import("mod").Foo where Foo is a typedef ( #23881 )
...
* Fix find-all-refs for import("mod").Foo where Foo is a typedef
* Add Debug.assertNever message
* Ensure SemanticMeaning is matched
2018-05-04 13:32:40 -07:00
Sheetal Nandi
5133c70e7e
Merge pull request #22167 from Microsoft/requireJson
...
Resolve the modue names with "modulename.json" to json files when doing node module resolution
2018-05-04 12:42:10 -07:00
Sheetal Nandi
ec19733f61
Merge pull request #22072 from Microsoft/configFileWithIncorrectProjectRoot
...
Search till root just like tsc when the projectRootPath specified doesnt contain the info.path
2018-05-04 12:23:56 -07:00
Mohamed Hegazy
2d725feb51
Add outlining span for named bindings in import declarations
2018-05-04 11:26:03 -07:00
Sheetal Nandi
c4143ae0c1
Update the message for resolveJsonModule as per PR feedback
2018-05-04 11:14:39 -07:00
Sheetal Nandi
4e6586deb8
PR feedback
2018-05-04 10:45:46 -07:00
Mohamed Hegazy
de13cc4692
Merge remote-tracking branch 'origin/master' into importOutlining
2018-05-04 10:40:58 -07:00
Mohamed Hegazy
f1713c92d3
Add outlining spans for import declarations
2018-05-04 10:39:47 -07:00
Mohamed Hegazy
1a320fcd5e
Merge pull request #23883 from Microsoft/outliningSpanKind
...
Fix #22419 : Add `kind` field to `OutliningSpan`
2018-05-04 09:16:01 -07:00
Artem Tyurin
3e4279195f
Resolve promise inside async generator
2018-05-04 12:15:58 +02:00
Ron Buckton
b172311778
Merge pull request #23882 from Microsoft/reduceStackDepthPart1
...
Minor changes to reduce stack depth during emit
2018-05-03 16:46:11 -07:00
Ron Buckton
4c6e93b166
Merge pull request #23878 from Microsoft/vfsBaselines
...
New vfs baselines follow-up
2018-05-03 16:35:48 -07:00
Mohamed Hegazy
e52efb04f3
Fix #22419 : Add kind
field to OutliningSpan
2018-05-03 16:28:55 -07:00
Ron Buckton
de10e82e8a
Add assertion message
2018-05-03 16:27:15 -07:00
Ron Buckton
a7074e2054
Minor changes to reduce stack depth during emit
2018-05-03 16:04:52 -07:00
Sheetal Nandi
92d08738d5
Merge branch 'master' into configFileWithIncorrectProjectRoot
2018-05-03 15:56:00 -07:00
Sheetal Nandi
15f9ea3d14
Merge branch 'master' into requireJson
2018-05-03 15:35:54 -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
Ron Buckton
9891b699a7
Unpatch project tests
2018-05-03 14:05:06 -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
616e6e6ca3
Move symbol instance type to es5 to follow PropertyKey ( #23864 )
...
* Move symbol instance type to es5
* Accept baseline changes from moving Symbol
2018-05-03 10:50:10 -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
Sheetal Nandi
a196f163a7
Merge branch 'master' into sourceFileChangeAssert
2018-05-03 09:45:11 -07:00
Andy
724e656acb
Don't show a definition at a 'require' call ( #23822 )
2018-05-03 08:02:56 -07:00
csigs
3387be886f
LEGO: check in for master to temporary branch.
2018-05-03 10:10:31 +00:00
csigs
e06c12e2a9
LEGO: check in for master to temporary branch.
2018-05-03 04:10:20 +00:00
Armando Aguirre
1d593fd81e
Merge pull request #23191 from armanio123/AddVueSupport
...
Added deferred ScriptKind and renamed JsFileExtensionInfo to FileExte…
2018-05-02 18:13:34 -07:00
Ron Buckton
5b7bec898b
Merge pull request #23839 from Microsoft/libsJson
...
Centralize lib management for build
2018-05-02 18:10:34 -07:00
Ron Buckton
88d5d6fccc
Merge pull request #23834 from Microsoft/generateNamesEarlier
...
Pre-generate names ahead of time
2018-05-02 17:51:37 -07:00
Armando Aguirre
b8ddc0dabb
Rollback fileExtensionIs
2018-05-02 17:17:55 -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
Ron Buckton
147aeaba9d
Centralize lib management for build
2018-05-02 15:49:52 -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
Andy
5aa0a79dac
Use 'firstDefined' in 'enablePlugin' ( #23825 )
2018-05-02 15:37:22 -07:00
Sheetal Nandi
55c5e8cb47
Fix the assert for orphan script info source change event
2018-05-02 15:11:39 -07:00
csigs
e3fc4446b5
LEGO: check in for master to temporary branch.
2018-05-02 22:10:30 +00:00
Ron Buckton
ab8c3fa3ac
Pre-generate names ahead of time
2018-05-02 13:34:14 -07:00
Ron Buckton
66c11c527a
Update completion order in test
2018-05-02 10:51:09 -07:00
csigs
ac3ee5356c
LEGO: check in for master to temporary branch.
2018-05-02 16:10:20 +00:00
Ron Buckton
860f9f88f6
Update documentation comments
2018-05-01 19:02:35 -07:00
Ron Buckton
d62a11ffc0
Merge branch 'master' into vfs
2018-05-01 18:58:31 -07:00
Ron Buckton
1dff0af646
More path cleanup
2018-05-01 18:53:54 -07:00
Wesley Wigham
c663645c91
Inform getDeclarationSpaces about how an imported exportAssignment may merge ( #23816 )
2018-05-01 17:24:30 -07:00
csigs
11ef342b92
LEGO: check in for master to temporary branch.
2018-05-01 22:10:44 +00: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
Andy
9f4abe2d79
Improve completions testing ( #23591 )
2018-05-01 13:00:13 -07:00
Anders Hejlsberg
1de8c65678
Unconstrained type parameter not assignable to 'object'
2018-05-01 12:38:29 -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 b1a728fdac
.
2018-05-01 09:24:02 -07:00
Sheetal Nandi
97df079feb
PR feedback
2018-04-30 17:05:22 -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
csigs
7eb6a8f803
LEGO: check in for master to temporary branch.
2018-04-30 22:10:57 +00: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
Mohamed Hegazy
0bbf4d5c48
Merge pull request #23785 from dsifford/dsifford-lib-intl-fix
...
add lib.es2018.intl + fix lib.es2017.intl
2018-04-30 14:45:15 -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
Sheetal Nandi
96b2cf8aba
Merge pull request #23597 from Microsoft/inferredProjects
...
Do not remove inferred project till next file open so we can reuse them
2018-04-30 12:54:15 -07:00
Sheetal Nandi
cec5aafcbf
Merge pull request #23783 from Microsoft/tscWatchInfo
...
More detailed log during watch in tsc showing what the watcher is invoked for.
2018-04-30 12:53:59 -07:00
Derek P Sifford
cc0c82c014
add lib.es2018.intl + fix lib.es2017.intl
...
closes #23691
2018-04-30 15:17:00 -04: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
Sheetal Nandi
c7b2d9228a
PR feedback
2018-04-30 11:52:49 -07:00
Sheetal Nandi
579748bc2b
Merge branch 'master' into requireJson
2018-04-30 11:44:09 -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
672d2144fa
Check for null type instead of null keyword
2018-04-30 10:43:43 -07:00
Sheetal Nandi
33ba2509a2
Merge pull request #23753 from Microsoft/emptyOptions
...
Handle the test case when tsconfig file changes without needing to update the program
2018-04-30 10:42:14 -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
fc2f16ca3c
Treat unconstrained T[K] the same as unconstrained T
2018-04-29 07:46:57 -07:00
Ken703
4e401ca361
update string template rule and test
2018-04-28 19:59:41 -04:00
csigs
db9685c645
LEGO: check in for master to temporary branch.
2018-04-28 22:10:35 +00: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
Anders Hejlsberg
5a7eb1cbc8
Fix typo
2018-04-28 08:24:41 -07:00
csigs
88dcdf9e38
LEGO: check in for master to temporary branch.
2018-04-28 10:10:32 +00:00
Daniel Rosenwasser
443c1c7965
Merge pull request #23327 from Microsoft/importDotMeta
...
Support 'import.meta'
2018-04-27 20:52:28 -07:00
Sheetal Nandi
2e4f37849c
More logs in tsc.js
2018-04-27 18:49:16 -07:00
Daniel Rosenwasser
161535bc84
Check for both 'module' and 'target'.
2018-04-27 17:51:18 -07:00
Daniel Rosenwasser
bc0d3e1297
Look for top-level imports/exports before diving into the tree.
2018-04-27 17:25:23 -07:00
Sheetal Nandi
44066d6c7a
Handle the test case when tsconfig file changes without needing to update the program
...
Fixes #23687
2018-04-27 16:59:50 -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
cfe7284876
Merge branch 'master' into reduceIntersectionTypes
2018-04-27 15:54:17 -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
csigs
5756c34457
LEGO: check in for master to temporary branch.
2018-04-27 22:11:01 +00: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
Ron Buckton
8424c4d1ab
Partial migration of some shared vpath functionality to core
2018-04-27 13:58:45 -07:00
Wesley Wigham
d5ef1174bd
Copy consistient valueDeclarations on union/intersection symbols ( #23190 )
2018-04-27 13:12:35 -07:00
Anders Hejlsberg
d25a6ec9ad
Remove redundant primitive types from intersections with literal types
2018-04-27 10:40:16 -07:00
Andy
bcb5599bf2
Fix typo ( #23725 )
2018-04-26 16:18:47 -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
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
Andy
aa102435b3
Fix insertNodeAtClassStart
for empty class with comment ( #23342 )
2018-04-26 08:00:38 -07:00
Daniel Rosenwasser
9672116d8c
Merge remote-tracking branch 'origin/master' into importDotMeta
2018-04-25 22:21:56 -07:00
csigs
096f65c05d
LEGO: check in for master to temporary branch.
2018-04-26 04:10:18 +00:00
Ken703
d9bc436788
Auto format: no space between closing parenthesis and string template
2018-04-25 21:10:35 -04:00
Andy
cdfd92b90d
Don't add import completion from a re-export in "./index" ( #23623 )
...
* Don't add import completion from a re-export in "./index"
* Simpler heuristic
2018-04-25 16:15:49 -07:00
Wesley Wigham
4a6888a850
There exist type parameters with symbols but without TypeParameterDeclaration nodes ( #23690 )
...
* There exist type parameters with symbols but without TypeParameterDeclaration nodes
* Add test
2018-04-25 15:53:06 -07:00
Andy
4dc4b8d777
Remove unused property 'referencedDiagnostics' ( #23688 )
2018-04-25 15:24:36 -07:00
Nathan Shively-Sanders
b2bfccfce4
Prototype-property assignment:fix name resolution crash ( #23680 )
2018-04-25 13:59:40 -07:00
Andy
9b05bd5cd7
Remove unnecessary check for ElementAccessExpression#argumentExpression being defined ( #23685 )
2018-04-25 13:30:34 -07:00
Wesley Wigham
ec05f29632
Make signature help node building cancellable ( #23543 )
...
* Make token building cancellable
* Scope cancellation token, make find all refs and quickinfo cancellable
* Make completion entry details cancellable
* Actually accept public API update
* Add test verifying cancellations within checker for select language service operations
* Document runWithCancellationToken a bit more
* Add post-cancellation verification to test
2018-04-25 11:44:13 -07:00
Anders Hejlsberg
3707f7dfbe
Handle more situations involving combined constraints of intersections
2018-04-25 10:58:08 -07:00
Andy
583bcea603
Always parse an argument for an ElementAccessExpression ( #23683 )
2018-04-25 10:08:35 -07:00
Andy
5280d23b63
importNameCodeFix: consistently put fixes to use existing imports before fixes for existing imports ( #23663 )
2018-04-25 08:04:20 -07:00
csigs
16c24bd57c
LEGO: check in for master to temporary branch.
2018-04-25 04:10:19 +00:00
Anders Hejlsberg
d90d6b9277
Remove more intersections with empty value domains from union types
2018-04-24 15:55:15 -07:00
csigs
dfbc842164
LEGO: check in for master to temporary branch.
2018-04-24 22:11:15 +00:00
Anders Hejlsberg
ef8d5094b4
Properly check relationships for intersections with union constraints
2018-04-24 14:57:27 -07:00
Daniel Rosenwasser
a55febda77
Make 'ImportMeta' more minimal.
2018-04-24 12:38:42 -07:00
Sheetal Nandi
d6dfd9a217
Do not remove inferred project immediately and try to reuse it on next file open
2018-04-24 11:53:36 -07:00
Sheetal Nandi
616458261c
Detach the removed typing files from the project
2018-04-24 11:53:36 -07:00
Sheetal Nandi
13d993b954
Helper for getting string comparer
2018-04-24 11:53:36 -07:00
Sheetal Nandi
4b19d12e0e
Rearrange code such that project Root path of open file is always used in watching and removing the config file watches
2018-04-24 11:53:35 -07:00
Alexader
a20e59cae4
Add warn that user can not use --strictPropertyInitialization without --strictNullChecks
2018-04-24 21:48:46 +03:00
Sheetal Nandi
ce5d5d8f72
Merge pull request #23636 from Microsoft/getErrWithInferredProject
...
Fix the crash when reporting errors of file that was referenced by inferred project root, is opened right after closing the root file
2018-04-24 11:33:29 -07:00
Anders Hejlsberg
ad4f83a281
Merge branch 'master' into fixIndexTypeTargetConstraint
...
# Conflicts:
# tests/baselines/reference/keyofAndIndexedAccess.js
# tests/baselines/reference/keyofAndIndexedAccess.symbols
# tests/baselines/reference/keyofAndIndexedAccess.types
# tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts
2018-04-24 11:08:08 -07:00
Ron Buckton
c9c562afac
Reorganize and remove duplication
2018-04-24 10:48:55 -07:00
Anders Hejlsberg
5d67f8ef68
Merge pull request #23645 from Microsoft/distributeKeyofUnion2
...
Distribute 'keyof' union types (take 2)
2018-04-24 10:09:45 -07:00
Anders Hejlsberg
e71afc32ad
Reinstate type simplification for 'keyof T[K]' as target in relation
2018-04-24 10:02:34 -07:00
Andy
59765e2d86
goToDefinition: Also add definitions for symbol if it does not match the signature symbol ( #23657 )
2018-04-24 09:41:47 -07:00
csigs
b72abdb120
LEGO: check in for master to temporary branch.
2018-04-24 16:10:31 +00:00
Andy
969aa45ea5
Improve error message for unused type ( #23633 )
2018-04-24 08:54:42 -07:00
Andy
eca17ac243
Support import fix even when the error is that a type is used as a value ( #23655 )
2018-04-24 08:54:14 -07:00
csigs
0e5ea2c8f6
LEGO: check in for master to temporary branch.
2018-04-24 10:10:45 +00:00
Ron Buckton
bb26ab5556
Merge branch 'master' into vfs
2018-04-23 22:48:48 -07:00
Ron Buckton
e422365870
Fix issues with runtests-browser
2018-04-23 21:52:16 -07:00
csigs
90500e88df
LEGO: check in for master to temporary branch.
2018-04-24 04:10:22 +00:00
Anders Hejlsberg
09590bc041
Transform 'keyof (A | B)' to 'keyof A & keyof B'
2018-04-23 20:57:11 -07:00
Andy
fc30bd10e3
Suggestion to convert to ES6 module should only trigger in projects which express some intent to use ES6 ( #23576 )
2018-04-23 16:05:37 -07:00
Sheetal Nandi
6ec763884e
Fix the crash when reporting errors of file that was referenced by inferred project root, is opened right after closing the root file
...
Fixes the crash reported in https://github.com/Microsoft/TypeScript/issues/23255#issuecomment-382653325
2018-04-23 15:36:32 -07:00
Nathan Shively-Sanders
905f9a02ad
module.exports = Entity
is an alias, just like export = Entity
(#23570 )
...
* Make `module.export =` an alias like `export=` is
This breaks a couple of tests for previous workarounds. Fix in upcoming
commits.
* Basically fixes all the breaks, but needs cleanup
* More notes to myself
* Clean up TODOs
* Call mergeSymbolTable and delete export= afterward
instead of basically copying the code myself.
* More cleanup
* Remove unnecessary check in import type checking
* Revert to DIY code.
It is more correct and will go away in a few days.
* Exported class expressions can be used as type
In both JS and TS
* Do not require named class expressions
2018-04-23 15:24:31 -07:00
csigs
1f753b3962
LEGO: check in for master to temporary branch.
2018-04-23 22:10:46 +00:00
Andy
222f35d927
Make symbol display at ExportSpecifier use 'export', not 'import' ( #23629 )
2018-04-23 13:29:14 -07:00
Anders Hejlsberg
0179d97403
Merge pull request #23592 from Microsoft/improveIndexTypes
...
Support number and symbol named properties with keyof and mapped types
2018-04-23 13:22:56 -07:00
Andy
645258cc7d
Allow getting import completion details with misspelled name ( #23624 )
2018-04-23 11:24:51 -07:00
Andy
2e78d1ef21
getEditsForFileRename: Update tsconfig "files" ( #23625 )
2018-04-23 11:11:06 -07:00
Wesley Wigham
eb112ab492
Deduplicate declarations in combined type/value symbols ( #23593 )
2018-04-21 12:50:05 -07:00
Mohamed Hegazy
7f34340dcf
Merge pull request #21476 from Kingwl/concat-string-in-enum-member
...
allow string concat in enum member declaration
2018-04-21 12:42:10 -07:00
Anders Hejlsberg
652e4932f6
Address CR feedback
2018-04-21 09:32:46 -07:00
csigs
cb96e3fad5
LEGO: check in for master to temporary branch.
2018-04-21 10:10:32 +00:00
csigs
5b2f4ac380
LEGO: check in for master to temporary branch.
2018-04-21 04:10:23 +00:00
Armando Aguirre
5434c4146e
Added deferred project context test, marked JsFileExtension as deprecated
2018-04-20 16:50:57 -07:00
csigs
ec0e04f853
LEGO: check in for master to temporary branch.
2018-04-20 22:10:46 +00:00
Andy
699ea246ff
Skip arrow functions in checkAndReportErrorForMissingPrefix ( #23584 )
2018-04-20 15:02:18 -07:00
Andy
5c94bef0e1
Add 'renameFile' command to services ( #23573 )
...
* Add 'renameFile' command to services
* renameFile -> getEditsForFileRename
* Support `<reference path>` directives
2018-04-20 13:43:09 -07:00
Nathan Shively-Sanders
e65681a2b7
Fix assert in getjsdochost ( #23575 )
...
* Fix assert in getJSDocHost
* Update public API to add wider type
* Remove now-unnecessary type assertion
2018-04-20 10:41:58 -07:00
Andy
22f2b118b7
Add 'triggerCharacter' option for completions requests ( #23491 )
...
* Add 'triggerCharacter' option for completions requests
* mhegazy code review
* More code review
* Handle '<' in comment
2018-04-20 10:25:58 -07:00
Mohamed Hegazy
2826bc72b8
Merge pull request #23470 from JoshuaKGoldberg/standardized-non-pretty-newlines
...
Adjusted newlines in non-pretty output for consistency
2018-04-20 10:01:03 -07:00
Anders Hejlsberg
eb7bbfb28e
Properties with numeric names have numeric literal types in keyof T
2018-04-20 09:55:59 -07:00
Andy
18c3f5ffa0
Use getFirstConstructorWithBody in one more place, and simplify other class members iteration ( #23567 )
2018-04-20 09:43:38 -07:00
Andy
94cc59ca60
Support getting JSDoc comment starting at a FunctionType node ( #23546 )
...
* Support getting JSDoc comment starting at a FunctionType node
* Move || to end of line
2018-04-20 09:43:20 -07:00
Mohamed Hegazy
c8e4b7ba50
Merge pull request #23566 from ajafff/generator-cfa
...
binder: don't inline control flow of generator function
2018-04-20 09:11:50 -07:00
csigs
760f8b85ab
LEGO: check in for master to temporary branch.
2018-04-20 16:10:25 +00:00
Klaus Meinhardt
f57ba59a77
resolveEntityName: don't return false ( #23563 )
...
Fixes : #23562
2018-04-20 08:42:29 -07:00
Klaus Meinhardt
4827728b16
binder: don't inline generator function's control flow
...
Fixes : #23565
2018-04-20 16:26:53 +02:00
csigs
ee834a270a
LEGO: check in for master to temporary branch.
2018-04-20 10:10:36 +00:00
Josh Goldberg
7812e5180f
Trailing whitespace, oh no!
2018-04-19 22:01:08 -07:00
Josh Goldberg
351251193d
Simplified to one output line
2018-04-19 21:54:08 -07:00
Josh Goldberg
8d6c2bc1b1
Used return value from clearScreenIfNotWatchingForFiles
2018-04-19 21:53:01 -07:00
csigs
8740045d8e
LEGO: check in for master to temporary branch.
2018-04-20 04:10:18 +00:00
Ron Buckton
370107ed7b
Merge branch 'master' into vfs
2018-04-19 16:55:35 -07:00
Ron Buckton
6b79161f65
More cleanup and reorganization
2018-04-19 16:48:50 -07:00
Nathan Shively-Sanders
8d969a23cb
In JS, class supports @template
tag for declaring type parameters ( #23511 )
...
* Support @template as a class type parameter
Still need to do the following:
1. Correctly get jsdoc host in predicate.
2. Make this work for constructor functions too.
3. Scan rest of codebase for other usages of the type parameters
property that should be calls to getEffectiveTypeParameterDeclarations.
4. Rename tp to something more readable, like typar or ts'.
* Use jsdoc host declaration to find container
* Longer names for type parameters
* Fix renaming operation
* Update fourslash test
* Support @template for JS constructors
* Look for both outer and tag type parameters
* Improve naming to improve code clarity
2018-04-19 15:58:43 -07:00
Daniel Rosenwasser
84b12910e8
Merge pull request #23430 from Microsoft/taggedTemplateTypeArguments
...
Allow type arguments in generic tagged templates
2018-04-19 15:50:19 -07:00
Andy
a7c08e4691
Make code fix to add 'this.' work for statics ( #23527 )
...
* Make code fix to add 'this.' work for statics
* Add 'C.' instead of 'this.'
* DanielRosenwasser code review
2018-04-19 15:39:44 -07:00
Andy
c258d6e1b6
Fix bug: Don't rename 'default' in export { default as x } from "m";
( #23434 )
...
* Fix bug: Don't rename 'default' in `export { default as x } from "m";`
* Rename `foo` in `{ default as foo }` if that's the original export name
2018-04-19 15:35:25 -07:00
Andy
bc7979c174
quickInfo: Get JSDoc tags from aliased symbol ( #23526 )
...
* quickInfo: Get JSDoc tags from aliased symbol
* Add test with existing tags
2018-04-19 15:33:36 -07:00
Daniel Rosenwasser
70feb7b10b
Avoid duplicate code when checking for tagged templates.
2018-04-19 15:16:25 -07:00
csigs
0f861bbfa8
LEGO: check in for master to temporary branch.
2018-04-19 22:10:53 +00:00
Ron Buckton
6aab09a82f
Revert change to PromiseConstructor in #22772
2018-04-19 11:42:57 -07:00
Ron Buckton
0322d71515
Cleanup and reorganize fakes
2018-04-19 11:30:03 -07:00
Wesley Wigham
557a34e897
Visit typedef type expressions so they contribute to referenced-ness ( #23525 )
2018-04-19 10:28:30 -07:00
Sheetal Nandi
0526ff5fad
Merge pull request #23484 from Microsoft/typingInstallerWatch
...
Use watch recursive directories instead of watchFile for node_modules and bower components
2018-04-19 09:59:58 -07:00
csigs
b8425fc596
LEGO: check in for master to temporary branch.
2018-04-19 16:10:34 +00:00
王文璐
2455405b02
allow string concat in enum member declaration
2018-04-19 21:48:51 +08:00
Daniel Rosenwasser
6ee4989674
Merge pull request #23408 from Microsoft/autoPretty
...
--pretty-er output by default
2018-04-18 23:10:02 -07:00
Josh Goldberg
d1b044b72f
Standardized for --preserveWatchOutput too
2018-04-18 17:08:43 -07:00
Wesley Wigham
238ed7a94c
Visit EOF to collect jsdoc import types ( #23521 )
...
* Visit EOF to collect jsdoc import types
* Add flag to prevent jsdoc import types from influencing compilation set
2018-04-18 19:52:34 -04:00
Ron Buckton
1658770015
Trim unused functionality
2018-04-18 16:12:58 -07:00
Armando Aguirre
db08a77c3f
Merge branch 'master' into AddVueSupport
2018-04-18 15:51:58 -07:00
Ron Buckton
f7163a0a75
Merge pull request #23466 from falsandtru/lib/Promise.reject
...
Fix Promise.reject
2018-04-18 15:51:15 -07:00
Ron Buckton
1a3e88c62b
Merge pull request #22772 from falsandtru/lib/promise
...
Fix Promise interfaces
2018-04-18 15:50:58 -07:00
Anders Hejlsberg
9e4e215a03
Revise IndexType to have stringsOnly property
2018-04-18 15:43:22 -07:00
Andy
2f6b59eab9
Misc. improvements to addImplementationReferences ( #23507 )
...
* Misc. improvements to addImplementationReferences
* Test typeHavingNode.type === typeNode
* Fix bug: refNode.parent -> refNode
2018-04-18 15:24:19 -07:00
Andy
8f1bdc7e18
findAllReferences: Reduce node.getSourceFile() calls ( #23524 )
...
* findAllReferences: Reduce node.getSourceFile() calls
* Don't create extra object
2018-04-18 15:24:02 -07:00
falsandtru
55a3c22d43
Revert "Improve PromiseConstructor"
...
This reverts commit 4318f0d9a0
.
2018-04-19 05:11:00 +09:00
Armando Aguirre
f17603d318
Addressed PR comments
2018-04-18 12:58:40 -07:00
Andy
b271df1639
Simplify getParentSymbolsOfPropertyAccess ( #23513 )
2018-04-18 12:58:40 -07:00
Andy
0e9b815956
Improve performance of duplicate check ( #23516 )
2018-04-18 12:58:16 -07:00
Daniel Rosenwasser
320cb40f12
Address CR feedback.
2018-04-18 12:33:38 -07:00
Sheetal Nandi
56b618b9fc
Use indexOf and substr to exclude node_modules and bowerComponents instead of using loop
2018-04-18 11:44:28 -07:00
Sheetal Nandi
b0d6896235
Merge pull request #23438 from Microsoft/typingsFiles
...
Better handling of typing installer events and consuming typing files in tsserver
2018-04-18 11:34:46 -07:00
Sheetal Nandi
67bb67edf1
Cache canonical global cache's package.json path
2018-04-18 11:22:02 -07:00
Sheetal Nandi
7c5f5249ae
Renames as per PR feedback
2018-04-18 11:05:56 -07:00
Anders Hejlsberg
b14d389085
For 'T extends { [x: string]: XXX }' constraint of T[keyof T] is XXX
2018-04-18 11:01:09 -07:00
Andrew Casey
a2f494ab57
Merge pull request #23494 from amcasey/PropagateUnnecessary
...
Propagage reportsUnnecessary in convertToDiagnosticsWithLinePosition
2018-04-18 09:55:45 -07:00
Andy
afde2b5bf3
MissingDeclaration is only ever a Statement ( #23485 )
2018-04-18 07:55:57 -07:00
csigs
81b347d61d
LEGO: check in for master to temporary branch.
2018-04-18 04:10:18 +00:00
falsandtru
0303d14a1f
Merge remote-tracking branch 'master/master' into lib/promise
2018-04-18 12:05:32 +09:00
falsandtru
4318f0d9a0
Improve PromiseConstructor
2018-04-18 11:45:01 +09:00
Andrew Casey
26c836b12a
Propagage reportsUnnecessary in convertToDiagnosticsWithLinePosition
2018-04-17 19:44:52 -07:00
Ron Buckton
8b86423521
Trim unused functionality
2018-04-17 19:39:54 -07:00
falsandtru
563660a83a
Revert the change of PromiseLikeConstructor
2018-04-18 11:22:22 +09:00
Ron Buckton
154f09bee9
Reorganize project structure.
2018-04-17 18:42:59 -07:00
Mohamed Hegazy
52192006cf
Merge pull request #20671 from Kingwl/fix-import-not-existed-module
...
error if import empty object form module not existed
2018-04-17 17:29:07 -07:00
Daniel Rosenwasser
6953fa1732
flags--;
2018-04-17 17:06:50 -07:00
Anders Hejlsberg
b11be80349
Don't widen unique symbol types during type inference
2018-04-17 16:29:42 -07:00
Andy
f5101e21c3
Find-all-references: Don't crash on 'typeof import' ( #23448 )
...
* Find-all-references: Don't crash on 'typeof import'
* Move `| ImportTypeNode` out of `AnyImportOrReExport`
2018-04-17 15:01:36 -07:00
Ron Buckton
1cbe930e06
Merge branch 'master' into vfs
2018-04-17 14:39:20 -07:00
Sheetal Nandi
db9620d8f0
Use watch recursive directories instead of watchFile for node_modules and bower components
2018-04-17 14:27:21 -07:00
Sheetal Nandi
d64f2483e4
Update to respond to PR feedback
2018-04-17 14:17:15 -07:00
Daniel Rosenwasser
4bfb1a3aa1
Avoid breaking change by introducing overloads for 'createTaggedTemplate'/'updateTaggedTemplate'.
2018-04-17 14:09:42 -07:00
Andy
d1fde3786c
Symbol kind for a method on a mapped type should still be 'method' ( #23478 )
2018-04-17 14:07:59 -07:00
Andy
b00e370605
Add '?' in quick info for optional properties/methods ( #23480 )
2018-04-17 12:42:23 -07:00
Andy
56d83f9572
Rename pushTypePart
to pushSymbolKind
( #23481 )
2018-04-17 12:41:39 -07:00
Benjamin Lichtman
48f98bdd4d
Merge pull request #23452 from uniqueiniquity/normalizeDocumentHighlightsPaths
...
Normalize document highlights paths
2018-04-17 12:31:00 -07:00
Andy
f6510bd6b9
goToDefinition: Remove isSignatureDeclaration, use isFunctionLike ( #23475 )
2018-04-17 11:53:41 -07:00
Andy
0c17a2b2a8
goToDefinition: Reduce duplicate code around createDefinitionInfo ( #23473 )
...
* goToDefinition: Reduce duplicate code around createDefinitionInfo
* Use '[]' instead of 'emptyArray'
* Remove comment
2018-04-17 11:28:12 -07:00
Nathan Shively-Sanders
db68075b67
Add create-react-app and puppeteer user tests ( #23471 )
...
* Add create-react-app
* Add puppeteer
Everything is broken now. I am going back to master to see if that fixes
things.
* Add puppeteer baseline
* Add chalk override (gitignore was ignoring it)
2018-04-17 11:21:11 -07:00
Andy
d009d8efcf
Fix bug: IfStatement#elseStatement can be undefined ( #23467 )
2018-04-17 10:41:53 -07:00
Mohamed Hegazy
ca53993e41
Merge pull request #23462 from JoshuaKGoldberg/combined-pretty-summaries
...
Combined "Found X error(s)" and "Compilation complete" --watch messages
2018-04-17 10:37:07 -07:00
uniqueiniquity
12f6e5232b
Remove unnecessary allocation
2018-04-17 09:41:26 -07:00
uniqueiniquity
160356317b
Treat expectedRanges as readonly
2018-04-17 09:20:52 -07:00
uniqueiniquity
3a8d66ba29
Only normalize for purposes of assert
2018-04-17 09:20:34 -07:00
Andy
e50b24a83b
convertFunctionToEs6Class: Copy comment from variable declaration ( #23445 )
2018-04-17 09:15:05 -07:00
Andy
55f9a6ffc2
Fix bug: VariableDeclaration initiazer may be undefined ( #23439 )
2018-04-17 08:59:07 -07:00
Josh Goldberg
c974b2ced7
Helps to check in the test changes, too
2018-04-17 08:57:05 -07:00
Josh Goldberg
bc9ad90a81
Adjusted newlines in non-pretty output for consistency
...
Fixes #23469
2018-04-17 08:28:12 -07:00
Andy
bc285aa9a1
findAllReferences: Mark *every* search symbol as seen, not just search.symbol ( #23451 )
2018-04-17 07:53:43 -07:00
falsandtru
6798d56472
Fix Promise.reject
2018-04-17 23:08:06 +09:00
csigs
e35336c118
LEGO: check in for master to temporary branch.
2018-04-17 10:10:39 +00:00
Josh Goldberg
9dff614bd2
Combined the "Found X error(s)" and "Compilation" complete --watch messages
2018-04-17 01:47:43 -07:00
csigs
1e6e679a53
LEGO: check in for master to temporary branch.
2018-04-17 04:10:48 +00:00
Andy
40fd6aebdc
Shrink span for convert-to-es6-module suggestion ( #23441 )
2018-04-16 16:46:27 -07:00
Benjamin Lichtman
221ac50c4c
Merge pull request #23437 from Microsoft/getOutliningSpansDepthElseIf
...
In outliningElementsCollector, treat 'else if' as having same depth as the 'if'
2018-04-16 16:25:57 -07:00
uniqueiniquity
606492b677
Fix lint error and normalization issue
2018-04-16 16:20:12 -07:00