File tree 1 file changed +12
-1
lines changed
src/playground/components
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,13 @@ export default function Configuration({
134
134
value : ecmaFeature ,
135
135
label : ecmaFeature ,
136
136
} ) ) ;
137
+ const ECMAFeaturesOptionsForTypeScriptParser = ECMA_FEATURES . slice (
138
+ 0 ,
139
+ - 1 ,
140
+ ) . map ( ecmaFeature => ( {
141
+ value : ecmaFeature ,
142
+ label : ecmaFeature ,
143
+ } ) ) ;
137
144
const ECMAVersionsOptions = [
138
145
defaultOption ,
139
146
...ECMA_VERSIONS . map ( ecmaVersion => ( {
@@ -374,7 +381,11 @@ export default function Configuration({
374
381
isSearchable = { false }
375
382
styles = { customStyles }
376
383
theme = { theme => customTheme ( theme ) }
377
- options = { ECMAFeaturesOptions }
384
+ options = {
385
+ options . languageOptions . parser
386
+ ? ECMAFeaturesOptionsForTypeScriptParser
387
+ : ECMAFeaturesOptions
388
+ }
378
389
onChange = { selectedOptions => {
379
390
options . languageOptions . parserOptions . ecmaFeatures =
380
391
{ } ;
You can’t perform that action at this time.
0 commit comments