Merge pull request #31480 from schultzp2020/fix/erasable-syntax-enums

feat: convert all enums to erasable-syntax compliant patterns
This commit is contained in:
Fredrik Adelöw
2025-11-04 13:39:59 +01:00
committed by GitHub
26 changed files with 500 additions and 159 deletions
+13 -3
View File
@@ -61,11 +61,21 @@ export type ExternalDependency = {
};
// @public (undocumented)
export enum ExternalDependencyStatus {
export const ExternalDependencyStatus: {
readonly healthy: 'Healthy';
readonly unhealthy: 'Unhealthy';
};
// @public (undocumented)
export type ExternalDependencyStatus =
(typeof ExternalDependencyStatus)[keyof typeof ExternalDependencyStatus];
// @public (undocumented)
export namespace ExternalDependencyStatus {
// (undocumented)
healthy = 'Healthy',
export type healthy = typeof ExternalDependencyStatus.healthy;
// (undocumented)
unhealthy = 'Unhealthy',
export type unhealthy = typeof ExternalDependencyStatus.unhealthy;
}
// @public (undocumented)
+19 -3
View File
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* We want to maintain the same information as an enum, so we disable the redeclaration warning */
/* eslint-disable @typescript-eslint/no-redeclare */
import { JsonValue } from '@backstage/types';
@@ -48,9 +50,23 @@ export type PackageDependency = {
};
/** @public */
export enum ExternalDependencyStatus {
healthy = 'Healthy',
unhealthy = 'Unhealthy',
export const ExternalDependencyStatus = {
healthy: 'Healthy',
unhealthy: 'Unhealthy',
} as const;
/**
* @public
*/
export type ExternalDependencyStatus =
(typeof ExternalDependencyStatus)[keyof typeof ExternalDependencyStatus];
/**
* @public
*/
export namespace ExternalDependencyStatus {
export type healthy = typeof ExternalDependencyStatus.healthy;
export type unhealthy = typeof ExternalDependencyStatus.unhealthy;
}
/** @public */