Skip to content

Commit

Permalink
chore: type issue in crnl index (#681)
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
atlj authored Nov 8, 2024
1 parent 194296b commit ee6dd59
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/create-react-native-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,24 @@ const EXAMPLE_CHOICES = (
title: 'Vanilla',
value: 'vanilla',
description: "provides access to app's native code",
disabled: false,
},
// The test app is disabled for now until proper
// Codegen spec shipping is implemented
process.env.CRNL_ENABLE_TEST_APP && {
{
title: 'Test app',
value: 'test-app',
description: "app's native code is abstracted away",
// The test app is disabled for now until proper
// Codegen spec shipping is implemented
disabled: !process.env.CRNL_ENABLE_TEST_APP,
},
{
title: 'Expo',
value: 'expo',
description: 'managed expo project with web support',
disabled: false,
},
] as const
).filter(Boolean);
).filter((choice) => !choice.disabled);

const NEWARCH_DESCRIPTION = 'requires new arch (experimental)';
const BACKCOMPAT_DESCRIPTION = 'supports new arch (experimental)';
Expand Down

0 comments on commit ee6dd59

Please sign in to comment.