Skip to content

Commit

Permalink
Add test type-hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane MEAUDRE committed Mar 26, 2024
1 parent d498279 commit 0234210
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions front/components/Content/DsoBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ const dsoGeoJson = computed(() => geoJsonDso(listDso))
*/
const filtersBy = computed(() => {
return Object.keys(response?.value?.filters || {})
.reduce<{[type: string ]: Filters[] }>((acc, key: string) => {
.reduce<{[type: string ]: Filters[] }>((acc, key) => {
if (key !== defaultFilterName.value) {
acc[key] = response?.value?.filters![key]
}
return acc;
}, { } as any)
}, { })
});
/**
Expand Down
8 changes: 4 additions & 4 deletions front/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ declare global {
label: string
}
interface Filters {
constellation: ValueFilter[],
catalog: ValueFilter[],
magnitude: ValueFilter[],
type: ValueFilter[]
constellation: {[type: string ]: ValueFilter[]},
catalog: {[type: string ]: ValueFilter[]},
magnitude: {[type: string ]: ValueFilter[]},
type: {[type: string ]: ValueFilter[]}
}

interface BrowserResponse {
Expand Down

0 comments on commit 0234210

Please sign in to comment.