File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,7 @@ const isSupported = (
1919 return false ;
2020 }
2121
22- const categories = ( platformOrGuide . categories ||
23- [ ] ) as unknown as `${PlatformCategory } `;
22+ const categories = platformOrGuide . categories || [ ] ;
2423
2524 if ( supported . length && ! supported . some ( v => categories . includes ( v ) ) ) {
2625 return false ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {PlatformSection} from '../platformSection';
1010type Props = {
1111 name : string ;
1212 type : string ;
13- categorySupported ?: `${ PlatformCategory } ` [ ] ;
13+ categorySupported ?: PlatformCategory [ ] ;
1414 children ?: React . ReactNode ;
1515 defaultValue ?: string ;
1616 envVar ?: string ;
@@ -25,7 +25,6 @@ export function SdkOption({
2525 envVar,
2626 categorySupported = [ ] ,
2727} : Props ) {
28-
2928 const { showBrowserOnly, showServerLikeOnly} = getPlatformHints ( categorySupported ) ;
3029
3130 return (
@@ -102,7 +101,7 @@ export function SdkOption({
102101 ) ;
103102}
104103
105- function getPlatformHints ( categorySupported : `${ PlatformCategory } ` [ ] ) {
104+ function getPlatformHints ( categorySupported : PlatformCategory [ ] ) {
106105 const { rootNode, path} = serverContext ( ) ;
107106 const currentPlatformOrGuide = getCurrentPlatformOrGuide ( rootNode , path ) ;
108107 const currentCategories = currentPlatformOrGuide ?. categories || [ ] ;
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ export interface PlatformConfig {
104104 /**
105105 * The categories the platform belongs to.
106106 */
107- categories ?: `${ PlatformCategory } ` [ ] ;
107+ categories ?: PlatformCategory [ ] ;
108108 /**
109109 * Useful to define the "parent" platform. When specified the Platform will
110110 * inherit configuration values from the parent platform.
You can’t perform that action at this time.
0 commit comments