Skip to content

exporting box::use() #252

Answered by klmr
mmuurr asked this question in Q&A
Sep 23, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

That’s right, I forgot to document this publicly; the relevant documentation exists, but it’s package internal and thus not indexed. Here it is: https://klmr.me/box/reference/parse_export_specs.html#note

There are two situations in which the @export tag can be applied:

  1. When applied to assignments, the assigned name is exported.

  2. When applied to a box::use call, the imported names are exported. This can be the module name itself, any attached names, or both. All names introduced by the box::use call are exported. See use for the rules governing what names are introduced into the scope, and thus exported.

In any other situation, applying the @export tag is an error.

I should also add…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mmuurr
Comment options

Answer selected by mmuurr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants