Skip to content

Usage references can't be found for symbols exported through an exported namespaceΒ #62348

@Andarist

Description

@Andarist

πŸ”Ž Search Terms

references exports namespace usage definition

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

https://www.typescriptlang.org/play/?module=1#code/PTAEAEFsHsBMFcA2BTAXKAxtSMB2ArAZwChkAPAB2gCcAXUAXlACVkBDDWgbmONmQyI21ZKFxtIyQhQ6jWHegG9ioUADN4uTgEtouUMABUARkNghALwCeACgCU6AG7RtsHgF9e2yFTqhFoJZWoO7q1NigAEQAdMDauBTwtJE8xEYATGaBbNb2PEA

πŸ’» Code

/// <reference path="fourslash.ts" />

// @module: commonjs

// @Filename: /mod.d.ts
//// export = React;
////
//// declare namespace React {
////   function /*1*/lazy(): void;
//// }

// @Filename: /index.ts
//// import { /*2*/lazy } from "./mod"
//// /*3*/lazy();

verify.baselineFindAllReferences("1", "2", "3");

πŸ™ Actual behavior

No usage references are found at 1 but the original definition gets nicely found on both 2 and 3

πŸ™‚ Expected behavior

I'd expect all 3 markers to return consistent results.

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions