Skip to content

Commit 81c1d51

Browse files
committed
Improve type safety: Replace 'any' with PromptComponent type for customPrompts parameter
- Add PromptComponent import from @roo-code/types - Update exportModeWithRules method signature to use proper typing - Enhances code maintainability and type safety
1 parent acc6bb3 commit 81c1d51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/config/CustomModesManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as fs from "fs/promises"
55
import * as yaml from "yaml"
66
import stripBom from "strip-bom"
77

8-
import { type ModeConfig, customModesSettingsSchema, modeConfigSchema } from "@roo-code/types"
8+
import { type ModeConfig, type PromptComponent, customModesSettingsSchema, modeConfigSchema } from "@roo-code/types"
99

1010
import { fileExistsAtPath } from "../../utils/fs"
1111
import { getWorkspacePath } from "../../utils/path"
@@ -620,7 +620,7 @@ export class CustomModesManager {
620620
* @param customPrompts - Optional custom prompts to merge into the export
621621
* @returns Success status with YAML content or error message
622622
*/
623-
public async exportModeWithRules(slug: string, customPrompts?: any): Promise<ExportResult> {
623+
public async exportModeWithRules(slug: string, customPrompts?: PromptComponent): Promise<ExportResult> {
624624
try {
625625
// Import modes from shared to check built-in modes
626626
const { modes: builtInModes } = await import("../../shared/modes")

0 commit comments

Comments
 (0)