Anders Hejlsberg
1818218d59
Move substitution type elimination to getActualTypeVariable
2019-04-30 09:23:52 -07:00
Anders Hejlsberg
0759bc67a4
Fix inference to indexed access type containing substitution type
2019-04-27 16:19:50 -07:00
Wenlu Wang
454b4280b1
check more case for empty binding patten ( #25263 )
...
* check more case for empty binding patten
* refactor binding pattern checking getWidenedType
* fix spelling
* fix merge and rebase
2019-04-26 14:00:04 -07:00
Sheetal Nandi
94ee0dc769
Merge pull request #31100 from Microsoft/tsBuildCacheModuleResolution
...
Cache module resolutions across tsbuild to be able to resolve the modules faster
2019-04-26 07:33:59 -07:00
Jack Williams
0949ad1130
Fix #24991 : Weaken narrowing for == ( #29840 )
...
Spelling
2019-04-25 19:30:03 -07:00
Anders Hejlsberg
95413f0a24
Merge pull request #31000 from Microsoft/ignoreStringIndexSignaturesOnly
...
Ignore string (but keep numeric) index signatures from constraints
2019-04-25 17:01:46 -07:00
Klaus Meinhardt
d865ea774a
resolveName: remove useless case ( #28669 )
...
PropertySignature cannot occur in a class.
The condition inside the clause required the parent to be a class, so it was never true.
This removes the case clause and the part of the condition that is now useless.
2019-04-25 15:43:43 -07:00
Max Heiber
f9d12ed54b
fix 31012 allow noEmitOnError with isolatedModules ( #34 ) ( #31043 )
...
fix #31012
Since the purpose of isolatedModules: true is to
do extra validation to ensure that separate
compilation is safe
Allowing emit in the presence of errors is
compatible with that intention.
Signed-off-by: Max Heiber <max.heiber@gmail.com>
2019-04-25 15:31:03 -07:00
amaksimovich2
5b79b942e8
add action for enabling experimentalDescorators option in user config… ( #30484 )
...
* add action for enabling experimentalDescorators option in user config file, change error message for this case #29035
* add missing changes in tests
* Add "experimental decorators" tests for jsconfig file
2019-04-25 14:55:04 -07:00
Wenlu Wang
b8e3c41ee1
fix jsdoc iterator on expression of export assignment ( #30558 )
2019-04-25 14:53:06 -07:00
Kagami Sascha Rosylight
1a75d525fa
add ES2020 matchAll APIs ( #30936 )
2019-04-25 14:11:50 -07:00
Klaus Meinhardt
b45df892a8
emit error on destructuring of rest property ( #29609 )
...
Fixes : #26005
2019-04-25 13:33:49 -07:00
Andy Hanson
9168bd4845
Simplify hasExportDeclarations ( #27846 )
2019-04-25 13:25:48 -07:00
Ely Alamillo
591b25593d
update error message and update baselines ( #27628 )
2019-04-25 13:16:41 -07:00
Andy Hanson
aafba363e4
Avoid recalculating versionPaths in loadNodeModuleFromDirectory ( #27537 )
...
* Avoid recalculating versionPaths in loadNodeModuleFromDirectory
* Update baselines
2019-04-25 11:06:31 -07:00
Andy Hanson
6e4c150d6b
When function parameters span multiple lines, make the function span start at the ( ( #26907 )
...
* When function parameters span multiple lines, make the function span start at the `(`
* Undo unnecessary change
2019-04-25 10:53:39 -07:00
Wenlu Wang
583edce6b0
fix compiler crash ( #25925 )
2019-04-25 10:51:36 -07:00
Andy Hanson
e007ccf97b
Simplify chaining of transforms ( #22994 )
2019-04-25 10:38:20 -07:00
Wenlu Wang
bc46c770bf
allow literan enum const assertions ( #30700 )
...
* allow literan enum const assertions
* update desc
2019-04-25 10:09:21 -07:00
Sheetal Nandi
93b958e0ea
Share module resolution cache among different program
2019-04-24 12:47:01 -07:00
Sheetal Nandi
3264b64f08
Reuse map if module resolution is same for redirected and own files
2019-04-24 11:57:59 -07:00
Andrew Branch
4b81e37941
Merge pull request #31093 from andrewbranch/bug/30997
...
Fix crash getting error for type alias index signature without a type
2019-04-24 11:36:38 -07:00
Sheetal Nandi
f27cf9b34e
Merge pull request #30971 from Microsoft/dtsSignatureChange
...
Handle when change in type of dts may result in only dts emit but not js emit
2019-04-24 11:16:22 -07:00
Andrew Branch
956436853e
Fix crash getting error for type alias index signature without a type
2019-04-24 10:35:23 -07:00
Ron Buckton
e2310f2831
Merge pull request #26151 from Kingwl/PropertyDeclarationExclamationToken
...
visit exclamation token
2019-04-23 21:21:58 -07:00
Ron Buckton
6e0b39e399
Update src/compiler/visitor.ts
...
Co-Authored-By: Kingwl <kingwenlu@gmail.com>
2019-04-23 21:27:06 -05:00
Wesley Wigham
d7f03fb0fa
Parse generic function types in import type argument lists ( #31079 )
...
* Parenthesize in import type node factory
* And now parse unparenthesized generic functions so we can handle parsing the older output
2019-04-23 14:48:31 -07:00
David Sherret
8fc6640f55
Rename _objectLiteralBrandBrand to _objectLiteralBrand. ( #30797 )
2019-04-23 14:33:54 -07:00
Wenlu Wang
27075555c8
fix generate typenode from negative numerical literal ( #30610 )
2019-04-23 14:20:53 -07:00
Ryan Cavanaugh
885d4d63c8
Remove "generate types" code ( #31075 )
2019-04-23 13:51:47 -07:00
Wesley Wigham
b47194bfa1
Fix contextual types for a single jsx child ( #31040 )
2019-04-23 13:51:39 -07:00
Andrii Dieiev
54fa950757
Skip primitive types comparison with array and object types ( #31077 )
2019-04-23 13:49:32 -07:00
Wesley Wigham
b02b823f03
Track parameter references errors in resolve name rather than secondary pass ( #30349 )
2019-04-23 13:46:19 -07:00
Klaus Meinhardt
760393f893
fix false positive 'variable is used before being assigned' in destructuring ( #29636 )
...
Fixes : #29458
2019-04-23 13:22:37 -07:00
Matt McCutchen
6487d1ffe0
Remove the rule that replaces a union of literal types with the base type when comparing equality to a type that isn't a union of literal types. ( #27588 )
...
type when comparing equality to a type that isn't a union of literal
types.
The rule is redundant because a primitive type is already directed-
comparable to a value of that primitive type, and it causes errors to be
missed when comparing a type parameter _constrained_ by a union of
literal types to another union of literal types.
The baseline changes look like improvements to me.
Fixes #26758 .
2019-04-23 12:59:07 -07:00
Wenlu Wang
bd178746de
improve error message when type have same name ( #27065 )
...
* improve error message when type have same name
* fix lint and function name
* update test case
* accept baseline
2019-04-23 12:56:03 -07:00
Daniel Rosenwasser
c74d25c115
30837 - Bad error message when default 'import'-ing an 'export =' without 'esModuleInterop' ( #30847 )
...
30837 - Bad error message when default 'import'-ing an 'export =' without 'esModuleInterop'
2019-04-23 11:23:06 -04:00
Daniel Rosenwasser
6427711f99
Better erreor messages for properties mis-handled as shorthand property declarations ( #31039 )
...
Better erreor messages for properties mis-handled as shorthand property declarations
2019-04-22 16:14:21 -04:00
Wesley Wigham
7a3e68fc5c
Only return the substitute in substitution instantiation when assignability fails (rather than subtype) ( #31027 )
...
* Only return the substitute in substitution instantiation when assignability fails (rather than subtype)
* Add test from issue
2019-04-19 16:02:11 -07:00
Wesley Wigham
40a2eb2b4b
Unify couldContainTypeVariables and the similar check done during instantiation ( #30969 )
...
* Stop symbol based filtering in couldContainTypeVariables
* Unify couldContainTypeVariables and the similar check done during instantiation
2019-04-19 16:01:53 -07:00
Wesley Wigham
1a4c15fb11
handle generic types in getArrayifiedType ( #30606 )
2019-04-19 14:32:33 -07:00
karthikkp
181d126b02
diagnostic messages conflicts resolved
2019-04-20 01:38:17 +05:30
Daniel Rosenwasser
2eea21636b
Merge pull request #29242 from Kingwl/attach_property_to_default_export
...
add transformer for emit add property to default export
2019-04-18 23:30:48 -04:00
Andrew Branch
b6a0988052
Merge pull request #30776 from andrewbranch/feature/10178
...
Add flag to allow access to UMD globals from modules
2019-04-18 18:05:44 -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
Anders Hejlsberg
33c3ce9cd0
Merge pull request #31002 from Microsoft/fixIsStringIndexSignatureOnlyType
...
Fix isStringIndexSignatureOnlyType function
2019-04-17 17:19:34 -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
0c18d032e7
Merge branch 'master' into incrementalLateSymbol
2019-04-17 15:41:53 -07:00