-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
I just found this project and it sounds awesome, but one feature that is missing for me is a strongly-typed .betterer.ts
file. It would be awesome if you could expose the BettererTestMap
type somehow. Either directly and we can use it to enforce the export structure, or via something like a typed identity bettererConfig
function (name not final). For example see how vite does strongly typed config.
Basically what I'm proposing is adding:
export type BettererConfig = BettererTestMap;
// AND / OR
export type { BettererTestMap };
// AND / OR
export function bettererConfig(tests: BettererTestMap): BettererTestMap {
return tests;
}
That way we could write our .betterer.ts
files as:
export default bettererConfig({
'test name': () => someTest(),
});
// OR
export default {
'test name': () => someTest(),
} satisfies BettererConfig;
// OR (for js)
/** @type {import('@betterer/betterer').BettererConfig} */
export default {
'test name': () => someTest(),
};
Metadata
Metadata
Assignees
Labels
No labels