You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// a.tsexportconstX=1234;// b.tsimport{X}from"./a"exporttypeX=number// c.tsimport{X}from"./b";constx: X=X;// ~// Today, we report// 'X' only refers to a type and not a value.
There are some weird mechanics at play here. We stop at the first non-export/import.
Our usual alias resolution strategy - where we keep going until we find some non-alias - is wrong, because somewhere deeper, you might end up with an alias.
Some similar weird stuff with namespaces/internal modules was the only case we could think of where stuff broke.
The skipping behavior we have here - should we provide that to a user?
You always need the non-skipping behavior, API consumers can build the skipping behavior on top of that.
/** Follow all aliases to get the original symbol. */getAliasedSymbol(symbol: Symbol): Symbol;/** Follow a *single* alias to get the immediately aliased symbol. */getImmediateAliasedSymbol(symbol: Symbol): Symbol|undefined;
getAliasedSymbol is more like getFirstNonAliasedSymbol
Is this a break? Seems like these are just bug fixes?
Uh oh!
There was an error while loading. Please reload this page.
More Accurate Checking on Merged Aliases
#50853
You always need the non-skipping behavior, API consumers can build the skipping behavior on top of that.
getAliasedSymbol
is more likegetFirstNonAliasedSymbol
Module Resolution
--minimal
#50153
node_modules
../node_modules/@types
@types
.@types
scheme doesn't work for this mode.typesVersions
andtypes@
selectors inexports
don't work with this.package.json
anymore.relativePaths
option suggested in the issue can do that - map to the specific subdirectory that targets a version in a package.node_modules
here?@types
and hope the packages perfectly mirror?node_modules
?node_modules
will be the thing lots of people just want to fall back to, right?node_modules
, then DefinitelyTyped needs to really enforce the file structure that a package was authored in.The text was updated successfully, but these errors were encountered: