/** `check-declaration-order.mjs` 的类型声明:脚本本身是 .mjs(构建期工具), * 这里只声明被测试引用的那几个导出,让 vue-tsc 能对测试文件做类型检查。 */ export interface OrderViolation { /** 违规所在的文件(相对扫描根目录)。 */ file: string /** 发生「注册期求值」的行号(1 基)。 */ line: number /** 会被求值到的 const 名。 */ name: string /** 该 const 的声明行号(1 基),一定大于 line。 */ declaredAt: number } export function scriptBlocksOf(fileName: string, source: string): Array<{ offsetLine: number; code: string }> export function constDeclarations( code: string, offsetLine?: number, ): Map }> export function eagerWatchRefs(code: string, offsetLine?: number): Array<{ expr: string; line: number }> export function findOrderViolations(fileName: string, source: string): OrderViolation[] export function sourceFilesUnder(root: string): string[] export function scanWebSources(root: string): OrderViolation[]