mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-17 13:38:07 +01:00
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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user