fix(module): boolean types and bump nuxt to 3.8.2 (#1006)

This commit is contained in:
Daniel Roe
2023-11-21 17:32:51 +00:00
committed by GitHub
parent 16663887ca
commit ca62ce13d3
5 changed files with 1078 additions and 1414 deletions

View File

@@ -7,7 +7,7 @@ import { useShortcuts } from './useShortcuts'
export interface ShortcutConfig {
handler: Function
usingInput?: string | boolean
whenever?: WatchSource<Boolean>[]
whenever?: WatchSource<boolean>[]
}
export interface ShortcutsConfig {
@@ -20,7 +20,7 @@ export interface ShortcutsOptions {
interface Shortcut {
handler: Function
condition: ComputedRef<Boolean>
condition: ComputedRef<boolean>
chained: boolean
// KeyboardEvent attributes
key: string
@@ -149,7 +149,7 @@ export const defineShortcuts = (config: ShortcutsConfig, options: ShortcutsOptio
}
// Create shortcut computed
const conditions: ComputedRef<Boolean>[] = []
const conditions: ComputedRef<boolean>[] = []
if (!(shortcutConfig as ShortcutConfig).usingInput) {
conditions.push(logicNot(usingInput))
} else if (typeof (shortcutConfig as ShortcutConfig).usingInput === 'string') {