Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[api-extractor] Add an experimental new ApiItem.canonicalReference property #1406
[api-extractor] Add an experimental new ApiItem.canonicalReference property #1406
Changes from 5 commits
6e980e4
efaf045
b108208
8f9550b
9846fc3
36774d6
6e515f4
aaf4d13
d772f41
5a280f5
6da8406
3889972
dec3e00
d3ff003
1d5ebe0
1049df1
7a76ff6
8c247c0
fc7c49a
238711f
132c874
519e330
32fb006
75fe2c3
55a4264
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you only have
ApiEnum
nodes that are guaranteed to be exported, or do you anticipate non-exported enums? This is perfectly legal TypeScript:The return type of
f
should have the referencefoo!~NotExported:enum
, but this indicates the enum will always be an export and not a local (i.e. non-export).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today API Extractor considers
NotExported
to be essentially nameless (e.g. its name is free to be mangled in the .d.ts rollup). We don't expect there to be a documentation page for it. The ae-forgotten-export warning is reported, and currently it does not appear in the .api.json file at all.The philosophy is like:
"If the type is so important that you'd make a website page for it, then shouldn't it have a name so we can talk about it? Shouldn't that name be exported so that developers can defer to it in a type annotation?"
This is subjective, however. If people can provide compelling justifications, we may need to support
~
in the future.