Skip to content

Commit

Permalink
Frontend: make tsc type-check happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Sep 18, 2024
1 parent 611cacc commit c209e40
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 28 deletions.
4 changes: 2 additions & 2 deletions core/frontend/src/one-more-time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class OneMoreTime {
const id = setInterval(() => {
// Check if object does not exist anymore or if it was destroyed by vue
// eslint-disable-next-line
if (!ref.deref() || ref.deref()._isDestroyed) {
if (!ref.deref() || (ref.deref() as any)._isDestroyed) {
this.stop()
clearInterval(id)
}
Expand Down Expand Up @@ -131,7 +131,7 @@ export class OneMoreTime {
}

// Celebrate and dance so free
[Symbol.dispose](): void {
[(Symbol as any).dispose](): void {
this.stop()
}

Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions core/frontend/src/style/colors/vuetify.js

This file was deleted.

2 changes: 1 addition & 1 deletion core/frontend/src/types/autopilot/parameter-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default class ParametersTable {
console.log(`ignoring ${name} : ${parameter}`)
continue
}
this.metadata[name] = parameter
this.metadata[name] = (parameter as Metadata)
}
}
}
Expand Down
14 changes: 1 addition & 13 deletions core/frontend/src/types/shims-general.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
declare module '*.svg' {
const value: string
export default value
}

declare module '*.jpg' {
const value: string
export default value
}

declare module '*.png' {
const value: string
export default value
}

declare module '*.glb' {
const value: string
export default value
}

declare module 'vue-tooltip-directive'

declare module '@/assets/colors/default'
declare module '@/assets/colors/blue_robotics'
declare module '@/assets/colors/vuetify'
declare module 'vue-tooltip-directive'
3 changes: 1 addition & 2 deletions core/frontend/src/utils/ardupilot_mavlink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@ export function getMode(): number {
}

export async function setMode(mode: number, tries?: number): Promise<void> {
tries = tries || 5
let current_try = 0
return new Promise<void>(async (resolve, reject) => {
while (getMode() !== mode && current_try < tries) {
while (getMode() !== mode && current_try < (tries ?? 5)) {
current_try += 1
mavlink2rest.sendCommandLong(
MavCmd.MAV_CMD_DO_SET_MODE,
Expand Down

0 comments on commit c209e40

Please sign in to comment.