nuxt + TypeScriptでのmiddlewareの型

  • contextを型化して指定する
import { Context } from '@nuxt/types'

export default ({ redirect, store }: Context) => {
  //
}