Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive type references #33050

Merged
merged 29 commits into from
Sep 25, 2019
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
643351c
Support deferred resolution of type arguments in type references
ahejlsberg Aug 23, 2019
b24fcd0
Recursive tuple types + fix instantiation of recursive type references
ahejlsberg Aug 24, 2019
52a1a14
Instantiate deferred type references like anonymous types
ahejlsberg Aug 26, 2019
dd47fff
Properly handle recursive array and tuple types in printback
ahejlsberg Aug 26, 2019
7753f7b
Merge branch 'master' into recursiveTypeReferences
ahejlsberg Aug 26, 2019
5310fd0
Minor fixes
ahejlsberg Aug 27, 2019
5c21f43
Accept new baselines
ahejlsberg Aug 27, 2019
bf0debb
Handle missing global array type
ahejlsberg Aug 27, 2019
b18c70f
Fix fourslash test
ahejlsberg Aug 27, 2019
c2d0aa8
Only defer aliased array and tuple types
ahejlsberg Aug 27, 2019
8f3a917
Accept new baselines
ahejlsberg Aug 27, 2019
842c588
Exclude method symbols when relating tuple types
ahejlsberg Aug 28, 2019
fd8f990
Fix instantiation of alias type arguments for deferred type references
ahejlsberg Aug 29, 2019
6270ccc
Accept new baselines
ahejlsberg Aug 29, 2019
2f0ac25
Defer resolution of type arguments in aliased type references
ahejlsberg Aug 30, 2019
81bfa6f
Accept new baselines
ahejlsberg Aug 30, 2019
a92d599
Tweak isAliasedType
ahejlsberg Aug 30, 2019
b9cb3a6
Accept new baselines
ahejlsberg Aug 31, 2019
db7c03d
Merge branch 'master' into recursiveTypeReferences
ahejlsberg Sep 21, 2019
8604d4e
Include type operators in aliased type checks
ahejlsberg Sep 21, 2019
bf08d3b
Fix linting issues
ahejlsberg Sep 23, 2019
e3d23cc
Add tests
ahejlsberg Sep 24, 2019
3aa3326
Accept new baselines
ahejlsberg Sep 24, 2019
5962a5c
Merge branch 'master' into recursiveTypeReferences
ahejlsberg Sep 24, 2019
f0bf72f
Fix linting issue
ahejlsberg Sep 24, 2019
b2f4af4
Fix that works with both LKG and built compilers
ahejlsberg Sep 24, 2019
27752c6
Merge branch 'master' into recursiveTypeReferences
ahejlsberg Sep 24, 2019
3061a41
Add getTypeArguments method to TypeChecker interface
ahejlsberg Sep 24, 2019
7fd93fd
Accept API baseline changes
ahejlsberg Sep 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Exclude method symbols when relating tuple types
  • Loading branch information
ahejlsberg committed Aug 28, 2019
commit 842c588f3ef5b56bde3f71265d7bc7c243c539f6
6 changes: 4 additions & 2 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14123,9 +14123,11 @@ namespace ts {
// We only call this for union target types when we're attempting to do excess property checking - in those cases, we want to get _all possible props_
// from the target union, across all members
const properties = target.flags & TypeFlags.Union ? getPossiblePropertiesOfUnionType(target as UnionType) : getPropertiesOfType(target);
const numericNamesOnly = isTupleType(source) && isTupleType(target);
for (const targetProp of excludeProperties(properties, excludedProperties)) {
if (!(targetProp.flags & SymbolFlags.Prototype)) {
const sourceProp = getPropertyOfType(source, targetProp.escapedName);
const name = targetProp.escapedName;
if (!(targetProp.flags & SymbolFlags.Prototype) && (!numericNamesOnly || isNumericLiteralName(name) || name === "length")) {
const sourceProp = getPropertyOfType(source, name);
if (sourceProp && sourceProp !== targetProp) {
const related = propertyRelatedTo(source, target, sourceProp, targetProp, getTypeOfSymbol, reportErrors, isIntersectionConstituent);
if (!related) {
Expand Down