Browse Source

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 year ago
parent
commit
07f1373fb4
1 changed files with 1 additions and 1 deletions
  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',
     name: 'Orange',
   },
   },
-];
+] as const;
 
 
 /**
 /**
  * For every render, we push all injected params into `autoCompleteState`, we probably want to
  * For every render, we push all injected params into `autoCompleteState`, we probably want to