Skip to content

Commit f853594

Browse files
committed
fix: narrow stage config types
1 parent 4bb3caf commit f853594

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/rstack/src/config.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import { loadConfig, type RsbuildConfigDefinition } from '@rsbuild/core';
22
import type { ConfigParams as RslibConfigParams, RslibConfig } from '@rslib/core';
33
import type { RstestConfigExport } from '@rstest/core';
4-
import type { Configuration as StagedConfig } from 'lint-staged';
54

65
export type ConfigType = 'app' | 'lib' | 'test' | 'staged';
76

87
export type RslibConfigDefinition =
98
| RslibConfig
109
| ((params: RslibConfigParams) => RslibConfig | Promise<RslibConfig>);
1110

11+
export type StagedTask = string | string[];
12+
13+
export type StagedConfig = Record<string, StagedTask>;
14+
1215
type Config = RsbuildConfigDefinition | RslibConfigDefinition | RstestConfigExport | StagedConfig;
1316

1417
const registry = new Map<ConfigType, Config>();

0 commit comments

Comments
 (0)