chore: improve types (#115)

* wip: improve types

* feat: improve types

* Apply suggestions from code review

Co-authored-by: Sylvain Marroufin <marroufin.sylvain@gmail.com>

* chore: update

* chore: enable ci typecheck

* chore: fix

Co-authored-by: Sylvain Marroufin <marroufin.sylvain@gmail.com>
This commit is contained in:
Anthony Fu
2022-11-23 18:30:18 +08:00
committed by GitHub
parent 32d1f21299
commit edc1bd677b
30 changed files with 114 additions and 64 deletions

View File

@@ -1,9 +1,8 @@
import type { Ref } from 'vue'
import { defineNuxtPlugin, useState } from '#app'
import type { ToastNotification } from '../types'
export default defineNuxtPlugin(() => {
const notifications: Ref<ToastNotification[]> = useState('notifications', () => [])
const notifications = useState<ToastNotification[]>('notifications', () => [])
function addNotification (notification: Partial<ToastNotification>) {
const body = {