From 52ce32af5066f3157106230dd2f18f923d2db51f Mon Sep 17 00:00:00 2001 From: Bryant Kelley Date: Fri, 15 Nov 2024 14:51:24 -0800 Subject: [PATCH] Featured Badge Names Type (#97) * Add FeaturedBadgeNames type * Remove string array of featured badge names * Add changeset --- .changeset/orange-apples-push.md | 6 ++++++ src/index.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/orange-apples-push.md diff --git a/.changeset/orange-apples-push.md b/.changeset/orange-apples-push.md new file mode 100644 index 0000000..3d35772 --- /dev/null +++ b/.changeset/orange-apples-push.md @@ -0,0 +1,6 @@ +--- +"formidable-oss-badges": minor +--- + +Remove featuredBadgeNames string array and replace with a type for narrowing +purposes diff --git a/src/index.ts b/src/index.ts index 1800c7b..6113c3e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,4 +4,4 @@ export { default as ProjectBadge } from "./ProjectBadge" export { default as FeaturedBadge } from "./FeaturedBadge" export * from "./featuredProjectBadges" -export const featuredBadgeNames = Object.keys(featuredLogos.default) +export type FeaturedBadgeNames = keyof typeof featuredLogos.default