@halospv3/hce.shared-config
Version:
Automate commit message quality, changelogs, and CI/CD releases. Its `main` entry point is a Semantic Release config. Functions and classes are exposed for customization. An ESLint config, a Commitlint config, and addl. resources for .NET projects are als
18 lines (12 loc) • 697 B
text/typescript
import { type, type Type } from 'arktype';
export const tBooleanString: Type<'false' | 'true'> = type('"true" | "false"');
export type BooleanString = typeof tBooleanString.infer;
export const tEmptyOrBooleanString: Type<'' | 'false' | 'true'> = type(tBooleanString.or('""'));
export type EmptyOrBooleanString = typeof tEmptyOrBooleanString.infer;
export type Integer<N extends number> = `${N}` extends `${number}.${number}` ? never : N;
/**
* @see https://stackoverflow.com/a/73920140/14894786
*/
export type TupleIndices<T extends readonly unknown[]>
= Extract<keyof T, `${number}`> extends `${infer N extends number}` ? N : never;
export type InstanceOrStatic = 'Instance' | 'Static';