Skip to content

Commit 8b9ebaf

Browse files
committed
Import
1 parent 9c12aa0 commit 8b9ebaf

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

README.Rmd

+3-10
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,10 @@ With this configuration, `rpp::rpp_to_dev()` and `rpp::rpp_to_prod()` will run t
140140

141141
In the case of {typed}, two more tweaks are necessary:
142142

143-
1. The package must be listed in the `Suggests` section of the `DESCRIPTION` file.
144-
2. It should be loaded, at least in development mode, to enable the overload of the `?` operator.
143+
1. The package must be listed in the `Imports` section of the `DESCRIPTION` file.
144+
2. It should be imported to enable the overload of the `?` operator and to access the type declarations.
145145

146-
For the latter, you can add the following snippet to your project's `.onLoad()` function:
147-
148-
```r
149-
.onLoad <- function(libname, pkgname) {
150-
# Called for the side effect of loading but not attaching the typed package:
151-
requireNamespace("typed", quietly = TRUE)
152-
}
153-
```
146+
For the latter, add `import(typed)` to `NAMESPACE`, or `#' @import typed` to an `.R` source file if you are using roxygen2.
154147

155148
### {roxygen2} integration
156149

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,10 @@ With this configuration, [`rpp::rpp_to_dev()`](https://rpp.q-lang.org/reference/
113113

114114
In the case of {typed}, two more tweaks are necessary:
115115

116-
1. The package must be listed in the `Suggests` section of the `DESCRIPTION` file.
117-
2. It should be loaded, at least in development mode, to enable the overload of the `?` operator.
116+
1. The package must be listed in the `Imports` section of the `DESCRIPTION` file.
117+
2. It should be imported to enable the overload of the `?` operator and to access the type declarations.
118118

119-
For the latter, you can add the following snippet to your project’s [`.onLoad()`](https://rdrr.io/r/base/ns-hooks.html) function:
120-
121-
<pre class='chroma'>
122-
<span class='nv'>.onLoad</span> <span class='o'>&lt;-</span> <span class='kr'>function</span><span class='o'>(</span><span class='nv'>libname</span>, <span class='nv'>pkgname</span><span class='o'>)</span> <span class='o'>{</span>
123-
<span class='c'># Called for the side effect of loading but not attaching the typed package:</span>
124-
<span class='nf'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span><span class='o'>(</span><span class='s'>"typed"</span>, quietly <span class='o'>=</span> <span class='kc'>TRUE</span><span class='o'>)</span>
125-
<span class='o'>}</span></pre>
119+
For the latter, add `import(typed)` to `NAMESPACE`, or `#' @import typed` to an `.R` source file if you are using roxygen2.
126120

127121
### {roxygen2} integration
128122

0 commit comments

Comments
 (0)