Skip to content

Instantly share code, notes, and snippets.

@cullylarson
cullylarson / config.ts
Last active January 30, 2024 14:23
Example configuration file
const stages = ['production', 'staging', 'development', 'test'] as const;
type Stage = typeof stages[number];
function getStage(stages: Stage[]) {
if (!stages.length) return 'production';
for (const stage of stages) {
// if any of the provided stages is production, assume we are in production
if (stage === 'production') {