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
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
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
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
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
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
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
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
Daniel Rosenwasser
70feb7b10b
Avoid duplicate code when checking for tagged templates.
2018-04-19 15:16:25 -07:00
Wesley Wigham
557a34e897
Visit typedef type expressions so they contribute to referenced-ness ( #23525 )
2018-04-19 10:28:30 -07: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
Anders Hejlsberg
9e4e215a03
Revise IndexType to have stringsOnly property
2018-04-18 15:43:22 -07:00
Daniel Rosenwasser
320cb40f12
Address CR feedback.
2018-04-18 12:33:38 -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
Anders Hejlsberg
b14d389085
For 'T extends { [x: string]: XXX }' constraint of T[keyof T] is XXX
2018-04-18 11:01:09 -07:00
Andy
afde2b5bf3
MissingDeclaration is only ever a Statement ( #23485 )
2018-04-18 07:55:57 -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
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
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
Josh Goldberg
9dff614bd2
Combined the "Found X error(s)" and "Compilation" complete --watch messages
2018-04-17 01:47:43 -07:00
Anders Hejlsberg
16cd5580a6
Merge branch 'master' into improveIndexTypes
...
# Conflicts:
# src/compiler/checker.ts
# src/server/utilities.ts
2018-04-16 16:18:29 -07:00
Andy
cc6bc763bc
Simplify getConvertibleFieldAtPosition ( #23315 )
2018-04-16 09:30:10 -07:00
Anders Hejlsberg
8cb515ab13
Add members for numeric and symbol named properties in mapped types
2018-04-16 07:16:26 -07:00
Daniel Rosenwasser
eb8eeafc22
Allow parsing tagged templates with type arguments in new expressions.
2018-04-15 16:04:25 -07:00
Anders Hejlsberg
c344e6d0ba
Fixes and improvements to indexed access type relationships
2018-04-14 17:10:05 -10:00
Daniel Rosenwasser
299002d597
Fix spacing.
2018-04-14 11:53:27 -07:00
Daniel Rosenwasser
82e09c908e
Perform checking and resolution of tagged template type arguments.
2018-04-13 23:45:17 -07:00
Daniel Rosenwasser
7aa916a5cb
Strip away type arguments from tagged templates when emitting.
2018-04-13 23:45:16 -07:00
Daniel Rosenwasser
da7967a3cf
Added basic support for parsing/emitting type arguments in tagged template expressions.
2018-04-13 23:45:16 -07:00