mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 19:00:35 +01:00
docs: typecheck
This commit is contained in:
@@ -7,7 +7,7 @@ const groups = [{
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
const users = await $fetch<any[]>('https://jsonplaceholder.typicode.com/users', { params: { q } })
|
const users: any[] = await $fetch('https://jsonplaceholder.typicode.com/users', { params: { q } })
|
||||||
|
|
||||||
return users.map(user => ({ id: user.id, label: user.name, suffix: user.email }))
|
return users.map(user => ({ id: user.id, label: user.name, suffix: user.email }))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const selected = ref()
|
|||||||
async function search (q: string) {
|
async function search (q: string) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|
||||||
const users = await $fetch<any[]>('https://jsonplaceholder.typicode.com/users', { params: { q } })
|
const users: any[] = await $fetch('https://jsonplaceholder.typicode.com/users', { params: { q } })
|
||||||
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const selected = ref([])
|
|||||||
async function search (q: string) {
|
async function search (q: string) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|
||||||
const users = await $fetch<any[]>('https://jsonplaceholder.typicode.com/users', { params: { q } })
|
const users: any[] = await $fetch('https://jsonplaceholder.typicode.com/users', { params: { q } })
|
||||||
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user