Skip to content

Uncalled-function check misses usage of complex property access #41588

Closed
@sandersn

Description

@sandersn

Code

Based on chrome-app on Definitely Typed:

    var chrome = {
        platformKeys: {
            subtleCrypto() {
                return {
                    sign() {},
                    exportKey() { return true }
                }
            }
        }
    }
    // ok
    if (chrome.platformKeys.subtleCrypto().exportKey) {
        chrome.platformKeys.subtleCrypto().exportKey
    }

Expected behavior:
No error

Actual behavior:
Error: "Did you mean to call 'exportKey'?"

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions