Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jan 14, 2025
1 parent cf905a2 commit 4b9f6cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/lib/create-storybook/src/ink/Init.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import { Box, Text, useInput } from 'ink';

import type { Input } from './app';

type GitResult = 'loading' | 'clean' | 'none' | 'unclean';
function getKeys<T extends Record<string, unknown>>(obj: T): (keyof T)[] {
return Object.keys(obj) as (keyof T)[];
}

type GitResult = 'loading' | 'clean' | 'none' | 'unclean';
/** Check if the user has pending changes */
async function checkGitStatus(): Promise<GitResult> {
// slow delay for demo effect
Expand Down Expand Up @@ -121,9 +124,6 @@ const steps = {
} satisfies Record<string, FC<{ state: State; dispatch: any }>>;

const keys = getKeys(steps);
function getKeys<T extends Record<string, unknown>>(obj: T): (keyof T)[] {
return Object.keys(obj) as (keyof T)[];
}

const ACTIONS = {
NEXT: 'NEXT',
Expand Down

0 comments on commit 4b9f6cf

Please sign in to comment.