Просмотр исходного кода

Type a test fixture as constant

This way index access on it will succeed since TypeScript knows how many
elements are in it
George Gritsouk 1 год назад
Родитель
Сommit
07f1373fb4
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      static/app/components/autoComplete.spec.tsx

+ 1 - 1
static/app/components/autoComplete.spec.tsx

@@ -15,7 +15,7 @@ const items = [
   {
     name: 'Orange',
   },
-];
+] as const;
 
 /**
  * For every render, we push all injected params into `autoCompleteState`, we probably want to