Klaus Meinhardt
5bc8a8dddf
JSDocTypeTag.typeExpression is not optional ( #30452 )
2019-04-30 09:46:32 -07:00
Andrew Branch
90d3acf6c7
Merge pull request #31078 from andrewbranch/bug/30752
...
Fix symbol merging of augmentations to pattern ambient modules
2019-04-30 06:18:23 -10:00
Anders Hejlsberg
90054497bd
Merge pull request #31116 from Microsoft/higherOrderConstructorTypes
...
Support higher order inferences for constructor functions
2019-04-30 08:41:58 -07:00
Josh Goldberg
6e736c120e
Added custom error message when trying to assign constraint type to generic type parameter ( #30394 )
...
* Added custom error message when trying to assign constraint type to generic type parameter
Fixes #29049 .
This also adds the new message in chained error messages. `typeParameterDiamond4.errors.txt` shows it appearing twice in the "diamond" scenario. I can't tell if this severely increased amount of nested messages is good or bad...?
* Updated diagnostic message per suggestion
* Align formatting with local custom
2019-04-30 08:35:22 -07:00
Collins Abitekaniza
7016d45447
Better errors for indexing gettable/settable values ( #26446 )
...
* give suggestions when index signature given
* add tests for noImplicitAny indexing on Object
* remove comments regarding error messages
* recommend set if el is on RHS of assignment else get
* add new baseline tests
2019-04-30 08:31:37 -07:00
Anders Hejlsberg
be409fad84
Merge pull request #31137 from Microsoft/fixConditionalInference
...
Fix conditional type inference involving any or unknown
2019-04-30 06:26:02 -07:00
Anders Hejlsberg
31551fd0ae
Only instantiate types if we need to
2019-04-29 17:17:16 -07:00
Anders Hejlsberg
a539887893
Merge pull request #31150 from Microsoft/fixReadonlyIndexedAccess
...
Fix readonly indexed access used in indexed access type
2019-04-29 16:59:13 -07:00
Ron Buckton
2d8527f3f0
Merge pull request #30779 from Microsoft/relateDiscriminants
...
Relate source types covered by a target discriminated union
2019-04-29 16:58:27 -07:00
Ron Buckton
26fd6dafa6
Relate a source type that is sufficiently covered by a target discriminated union
2019-04-29 15:46:37 -07:00
Anders Hejlsberg
9c401b4dbb
Remove over-eager check of AccessFlags.Writing in getIndexedAccessType
2019-04-28 13:56:11 -07:00
Ron Buckton
57a8ee1507
Fix binder performance regression
2019-04-27 16:47:27 -07:00
Anders Hejlsberg
5a567ad56d
Properly instantiate true type when extends type is any or unknown
2019-04-27 09:56:01 -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
Jack Williams
0949ad1130
Fix #24991 : Weaken narrowing for == ( #29840 )
...
Spelling
2019-04-25 19:30:03 -07:00
Anders Hejlsberg
be88d53ab3
Only defer function type inference when contextual type is function type
2019-04-25 17:32:27 -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
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
Klaus Meinhardt
b45df892a8
emit error on destructuring of rest property ( #29609 )
...
Fixes : #26005
2019-04-25 13:33:49 -07:00
Ely Alamillo
591b25593d
update error message and update baselines ( #27628 )
2019-04-25 13:16:41 -07:00
Anders Hejlsberg
4fe59dc705
Only defer pure functions and pure constructor functions during inference
2019-04-25 13:02:02 -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
Anders Hejlsberg
4384c90670
Support higher order inferences for constructor functions
2019-04-25 09:58:39 -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
Andrew Branch
973c3cac8d
When unidirectionally merging symbols, do so recursively
2019-04-24 09:07:08 -07:00
Wenlu Wang
27075555c8
fix generate typenode from negative numerical literal ( #30610 )
2019-04-23 14:20:53 -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
Andrew Branch
7409a04010
Fix merging module augmentations to pattern ambient modules
2019-04-23 12:06:56 -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
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
Anders Hejlsberg
33c3ce9cd0
Merge pull request #31002 from Microsoft/fixIsStringIndexSignatureOnlyType
...
Fix isStringIndexSignatureOnlyType function
2019-04-17 17:19:34 -07:00
Sheetal Nandi
0c18d032e7
Merge branch 'master' into incrementalLateSymbol
2019-04-17 15:41:53 -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
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
68585f2a1e
Ignore string (but keep numeric) index signatures coming from constraints
2019-04-17 11:20:50 -07:00