UNPKG

declapract

Version:

A tool to declaratively define best practices, maintainable evolve them, and scalably enforce them.

18 lines (17 loc) 700 B
/** * grabs the `x.y.z` part from strings that match the shape `@declapract{check.minVersion('x.y.z')}` * * returns null if no match */ export declare const getMinVersionFromCheckMinVersionExpression: (value: string) => string | null; /** * checks whether the string matches the form "@declapract{check.minVersion('x.y.z')}" (with nothing before and nothing after, too) */ export declare const isCheckMinVersionExpression: (value: string) => boolean; /** * evaluates a foundValue against a minVersion, to check if it passes it or not */ export declare const checkDoesFoundValuePassesMinVersionCheck: ({ foundValue, minVersion, }: { foundValue: any; minVersion: string; }) => boolean;