Skip to content

Commit c34df46

Browse files
authoredJan 9, 2024
docs: projects.md to include type information (#2250)
1 parent 63c0a99 commit c34df46

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎docs/projects.md

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ A project can define a `react-native.config.js` at the root with custom configur
1111
For example, below configuration informs CLI about a source directory with iOS files.
1212

1313
```js
14+
/** @type import("@react-native-community/cli-types").Config */
1415
module.exports = {
1516
project: {
1617
ios: {
@@ -27,6 +28,7 @@ You can check all available options below.
2728
## Project interface
2829

2930
```ts
31+
// referenced from @react-native-community/cli-types
3032
type ProjectConfigT = {
3133
reactNativePath: ?string;
3234
project: {
@@ -62,6 +64,7 @@ In most cases, as a React Native developer, you should not need to define any of
6264
The following settings are available on iOS and Android:
6365

6466
```ts
67+
// referenced from @react-native-community/cli-types
6568
type IOSProjectParams = {
6669
sourceDir?: string;
6770
watchModeCommandParams?: string[];
@@ -163,6 +166,7 @@ Dependencies is a map where key is the name of the dependency and value is an ob
163166
For example, you could set:
164167

165168
```js
169+
/** @type import("@react-native-community/cli-types").Config */
166170
module.exports = {
167171
dependencies: {
168172
'react-native-webview': {
@@ -179,6 +183,7 @@ in order to disable linking of React Native WebView on iOS.
179183
or you could set:
180184

181185
```js
186+
/** @type import("@react-native-community/cli-types").Config */
182187
module.exports = {
183188
dependencies: {
184189
'react-native-brownfield': {
@@ -198,6 +203,7 @@ in order to use something else than `implementation` _(default scope method)_
198203
Another use-case would be supporting local libraries that are not discoverable for autolinking, since they're not part of your `dependencies` or `devDependencies`:
199204

200205
```js
206+
/** @type import("@react-native-community/cli-types").Config */
201207
module.exports = {
202208
dependencies: {
203209
'local-rn-library': {

0 commit comments

Comments
 (0)
Please sign in to comment.