Skip to content

Commit 313b9bf

Browse files
committed
Remove unnecessary casts
1 parent 6900cd0 commit 313b9bf

File tree

1 file changed

+4
-4
lines changed
  • packages/theme/src/cli/services

1 file changed

+4
-4
lines changed

packages/theme/src/cli/services/init.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export async function createAIInstructions(themeRoot: string, aiInstruction: AII
8787

8888
const instructions = (
8989
aiInstruction === 'all'
90-
? (Object.keys(SUPPORTED_AI_INSTRUCTIONS).filter((key) => key !== 'all') as AIInstruction[])
90+
? Object.keys(SUPPORTED_AI_INSTRUCTIONS).filter((key) => key !== 'all')
9191
: [aiInstruction]
9292
) as Exclude<AIInstruction, 'all'>[]
9393

@@ -130,7 +130,7 @@ export async function createAIInstructions(themeRoot: string, aiInstruction: AII
130130
export async function createAIInstructionFiles(
131131
themeRoot: string,
132132
agentsPath: string,
133-
instruction: AIInstruction,
133+
instruction: Exclude<AIInstruction, 'all'>,
134134
): Promise<{copiedFile?: string}> {
135135
if (instruction === 'cursor') {
136136
// Cursor natively supports AGENTS.md, so no symlink needed
@@ -140,9 +140,9 @@ export async function createAIInstructionFiles(
140140
const symlinkMap = {
141141
github: 'copilot-instructions.md',
142142
claude: 'CLAUDE.md',
143-
} as const
143+
}
144144

145-
const symlinkName = symlinkMap[instruction as Exclude<AIInstruction, 'all' | 'cursor'>]
145+
const symlinkName = symlinkMap[instruction]
146146
const symlinkPath = joinPath(themeRoot, symlinkName)
147147

148148
try {

0 commit comments

Comments
 (0)