Create VERSIONING_STRATEGIES constant

Signed-off-by: Erik Engervall <erik.engervall@gmail.com>
This commit is contained in:
Erik Engervall
2021-04-21 18:20:01 +02:00
parent aa81eaf7e1
commit fe0faf6b7a
2 changed files with 10 additions and 1 deletions
@@ -29,3 +29,11 @@ export const DISABLE_CACHE = {
'If-None-Match': '',
},
} as const;
export const VERSIONING_STRATEGIES: {
semver: 'semver';
calver: 'calver';
} = {
semver: 'semver',
calver: 'calver',
} as const;
@@ -16,6 +16,7 @@
import { createContext, useContext } from 'react';
import { VERSIONING_STRATEGIES } from '../constants/constants';
import { GitHubReleaseManagerError } from '../errors/GitHubReleaseManagerError';
export interface Project {
@@ -39,7 +40,7 @@ export interface Project {
*
* Default: false
*/
versioningStrategy: 'calver' | 'semver';
versioningStrategy: keyof typeof VERSIONING_STRATEGIES;
/**
* Project props was provided via props
*