Skip to content

Commit

Permalink
chore: add types
Browse files Browse the repository at this point in the history
  • Loading branch information
lauramargar committed May 30, 2024
1 parent 0f3004c commit 594e384
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
</template>

<script lang="ts">
import { computed, defineComponent } from 'vue';
import { computed, ComputedRef, defineComponent } from 'vue';
import { HistoryQuery } from '@empathyco/x-types';
import BaseSwitch from '../../../components/base-switch.vue';
import { historyQueriesXModule } from '../x-module';
import { isArrayEmpty } from '../../../utils/array';
Expand Down Expand Up @@ -38,7 +39,9 @@
/**
* The history queries from the state.
*/
const historyQueries = useState('historyQueries', ['historyQueries']).historyQueries;
const historyQueries: ComputedRef<HistoryQuery[] | undefined> = useState('historyQueries', [
'historyQueries'
]).historyQueries;
/**
* Checks if there are history queries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<script lang="ts">
import { HistoryQuery as HistoryQueryType } from '@empathyco/x-types';
import { Dictionary } from '@empathyco/x-utils';
import { computed, defineComponent, inject } from 'vue';
import { computed, ComputedRef, defineComponent, inject } from 'vue';
import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';
import { groupItemsBy, isArrayEmpty } from '../../../utils/array';
import { SnippetConfig } from '../../../x-installer/api/api.types';
Expand Down Expand Up @@ -117,7 +117,9 @@
*
* @internal
*/
const historyQueries = useState('historyQueries', ['historyQueries']).historyQueries;
const historyQueries: ComputedRef<HistoryQueryType[]> = useState('historyQueries', [
'historyQueries'
]).historyQueries;
/**
* The provided {@link SnippetConfig}.
Expand Down

0 comments on commit 594e384

Please sign in to comment.