Skip to content

Commit

Permalink
fix: fix types in ConsoleMixin
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Nov 5, 2024
1 parent b2f3b8f commit 2eb5c4b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/mixins/console.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import Vue from 'vue'
import Component from 'vue-class-component'
import { CommandHelp } from '@/store/printer/types'
import { GuiConsoleStateFilter } from '@/store/gui/console/types'

@Component
export default class ConsoleMixin extends Vue {
get helplist(): CommandHelp[] {
const commands = this.$store.state.printer.gcode?.commands ?? {}
const helplist: { command: string; help: string } = []
get helplist() {
const commands: { [key: string]: { help?: string } } = this.$store.state.printer.gcode?.commands ?? {}
const helplist: { command: string; help: string }[] = []

for (const [key, values] of Object.entries(commands)) {
helplist.push({ command: key, help: values.help ?? '' })
Expand Down

0 comments on commit 2eb5c4b

Please sign in to comment.