3
0
Fork 0
mirror of https://gitea.com/docker/metadata-action.git synced 2024-11-29 07:29:32 +01:00
docker-metadata/src/pep440.d.ts

40 lines
1 KiB
TypeScript
Raw Normal View History

interface ExplainedVersion {
epoch: number;
release: [number, number, number];
pre?: [string, number];
post?: number;
dev?: number;
local?: string;
public: string;
base_version: string;
is_prerelease: boolean;
is_devrelease: boolean;
is_postrelease: boolean;
}
interface Version {
epoch: number;
release: [number, number, number];
pre?: [string, number] | null;
post?: [string, number] | null;
dev?: [string, number] | null;
local?: Array<number> | null;
public: string;
base_version: string;
}
declare module '@renovate/pep440' {
function valid(version: string): string | null;
function clean(version: string): string;
function explain(version: string): ExplainedVersion;
function major(input: string): string;
function minor(input: string): string;
function patch(input: string): string;
function inc(input: string, release: string, preReleaseIdentifier?: string): string;
}
declare module '@renovate/pep440/lib/version' {
function stringify(parsed: Version): string;
function parse(version: string): Version;
}