Skip to content

Commit d806855

Browse files
committed
fix type errors
1 parent aecaf22 commit d806855

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

via-ui/src/api/gtfs/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class Service {
5252
ORDER BY RANDOM()
5353
LIMIT 1
5454
`)
55-
return rows[0]
55+
return rows[0]!!
5656
}
5757

5858
/** Looks up a single stop by id. Returns null if not found. */
@@ -167,7 +167,7 @@ export class Service {
167167
[tripId, tripId, fromStopId ?? ''],
168168
)
169169

170-
return { ...meta[0], stops }
170+
return { ...meta[0]!!, stops }
171171
}
172172

173173
// --------------------------------------------------------------------------

via-ui/src/components/SBBClock.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<script setup lang="ts">
2+
// @ts-expect-error importing legacy js
23
import SBBClock from '@/assets/sbbclock'
3-
import { onMounted, onUnmounted, ref, watch } from 'vue'
4+
import { onMounted, ref, watch } from 'vue'
45
56
const canvasRef = ref<HTMLCanvasElement | null>(null)
67
let clock: SBBClock | null = null
78
89
const props = defineProps<{
910
time: Date
10-
}>();
11+
}>()
1112
1213
onMounted(() => {
1314
if (canvasRef.value) {
@@ -17,10 +18,12 @@ onMounted(() => {
1718
}
1819
})
1920
20-
watch(() => props.time, (newTime) => {
21-
clock.time = newTime
22-
})
23-
21+
watch(
22+
() => props.time,
23+
(newTime) => {
24+
clock.time = newTime
25+
},
26+
)
2427
</script>
2528

2629
<template>

via-ui/src/components/SwissMap.vue

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const cities = computed(() => {
1515
if (trips.length === 0) return []
1616
1717
const first = {
18-
name: trips[0].start_station.stop_name,
19-
lat: trips[0].start_station.stop_lat,
20-
lon: trips[0].start_station.stop_lon,
21-
distance: trips[0].distance_before,
18+
name: trips[0]!!.start_station.stop_name,
19+
lat: trips[0]!!.start_station.stop_lat,
20+
lon: trips[0]!!.start_station.stop_lon,
21+
distance: trips[0]!!.distance_before,
2222
}
2323
const rest = trips.map((t) => ({
2424
name: t.end_station.stop_name,
@@ -226,11 +226,8 @@ function resetZoom() {
226226
max-width: 100%;
227227
aspect-ratio: 4 / 3;
228228
box-sizing: border-box;
229-
//background: linear-gradient(135deg, #ffffff 0%, #f4f4f4 100%);
230229
position: relative;
231-
//border: 1px solid #d7d7d7;
232230
border-radius: 16px;
233-
//box-shadow: 0 10px 20px rgba(22, 33, 62, 0.06);
234231
overflow: hidden;
235232
padding: 24px;
236233
}

0 commit comments

Comments
 (0)