Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
fix: isFeature uses the find method
Browse files Browse the repository at this point in the history
  • Loading branch information
yudukikun5120 committed Jan 10, 2023
1 parent 3c68723 commit 4f23a05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/types/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const Feature = [

type Feature = (typeof Feature)[number]

const isFeature = (key: string): key is Feature => key in Feature
const isFeature = (key: string): key is Feature =>
Feature.find((feature) => feature === key) !== undefined

export { Feature, isFeature }

0 comments on commit 4f23a05

Please sign in to comment.