Tighten typings from review feedback
Agent-Logs-Url: https://github.com/hykilpikonna/corner/sessions/5ad4b623-9a6b-480e-80fa-d83eee774f01 Co-authored-by: hykilpikonna <22280294+hykilpikonna@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
41297fbd2f
commit
f05accc968
@@ -5,8 +5,8 @@ export const hosts = {
|
||||
content: production ? 'https://profile-content.hydev.org' : 'http://localhost:8082'
|
||||
}
|
||||
|
||||
export const $ = (...args: any[]) => {
|
||||
const jquery = (globalThis as any).jQuery
|
||||
export const $ = (...args: unknown[]): unknown => {
|
||||
const jquery = (globalThis as { jQuery?: ((...innerArgs: unknown[]) => unknown) }).jQuery
|
||||
if (!jquery) throw new Error('jQuery is not available')
|
||||
return jquery(...args)
|
||||
}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ const post = computed(() => typeof route.query.post === 'string' ? route.query.p
|
||||
const category = computed(() => typeof route.query.category === 'string' ? route.query.category : undefined)
|
||||
const tag = computed(() => typeof route.query.tag === 'string' ? route.query.tag : undefined)
|
||||
|
||||
const clearQuery = (): Promise<void> => router.push({query: {}})
|
||||
const clearQuery = () => router.push({query: {}})
|
||||
|
||||
const filteredPosts = computed(() => {
|
||||
const posts = meta.value.posts.filter(it => it.pinned || (tag.value ? it.tags.includes(tag.value) :
|
||||
|
||||
Reference in New Issue
Block a user