Skip to content

Commit ee6dd59

Browse files
authored
chore: type issue in crnl index (#681)
### Summary We had a type issue in the `create-react-native-library` index due to using `as const` with a conditional array. I merged this code without checking the CI since it was already failing. ### Test plan 1. Make sure `yarn typecheck` passes.
1 parent 194296b commit ee6dd59

File tree

1 file changed

+7
-4
lines changed
  • packages/create-react-native-library/src

1 file changed

+7
-4
lines changed

packages/create-react-native-library/src/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,21 +150,24 @@ const EXAMPLE_CHOICES = (
150150
title: 'Vanilla',
151151
value: 'vanilla',
152152
description: "provides access to app's native code",
153+
disabled: false,
153154
},
154-
// The test app is disabled for now until proper
155-
// Codegen spec shipping is implemented
156-
process.env.CRNL_ENABLE_TEST_APP && {
155+
{
157156
title: 'Test app',
158157
value: 'test-app',
159158
description: "app's native code is abstracted away",
159+
// The test app is disabled for now until proper
160+
// Codegen spec shipping is implemented
161+
disabled: !process.env.CRNL_ENABLE_TEST_APP,
160162
},
161163
{
162164
title: 'Expo',
163165
value: 'expo',
164166
description: 'managed expo project with web support',
167+
disabled: false,
165168
},
166169
] as const
167-
).filter(Boolean);
170+
).filter((choice) => !choice.disabled);
168171

169172
const NEWARCH_DESCRIPTION = 'requires new arch (experimental)';
170173
const BACKCOMPAT_DESCRIPTION = 'supports new arch (experimental)';

0 commit comments

Comments
 (0)