示例工程 27-framework-comparison
27-framework-comparison/app/.tsc/src/lib/decision.d.ts
export type FrameworkId = "react" | "vue" | "svelte";
export type Weights = {
bundle: number;
ecosystem: number;
team: number;
migration: number;
};
export type FrameworkScore = {
id: FrameworkId;
label: string;
scores: Weights;
};
export type RankedFramework = {
id: FrameworkId;
label: string;
total: number;
};
export declare const DEFAULT_WEIGHTS: Weights;
export declare const PRESET_WEIGHTS: Record<"balanced" | "team" | "bundle", Weights>;
export declare const FRAMEWORKS: FrameworkScore[];
export declare function score(framework: FrameworkScore, weights: Weights): number;
export declare function rankFrameworks(weights: Weights): RankedFramework[];
export declare function winner(weights: Weights): RankedFramework;
//# sourceMappingURL=decision.d.ts.map