mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
The type checking introduced in #75935 wasn't actually failing the build, because `find ... -exec ...` seems to eat non-zero exit codes. This is fixed by using `xargs` instead. Also fixes some files that were failing typechecking but no one noticed due to the above bug.
55 lines
1.2 KiB
TypeScript
55 lines
1.2 KiB
TypeScript
declare module 'database' {
|
|
export const db: {
|
|
serialize<T>(cb: () => T): T
|
|
run(
|
|
statement: string,
|
|
args: Record<string, any>,
|
|
onComplete: (this: { lastID: string }, error?: Error) => void
|
|
): void
|
|
}
|
|
}
|
|
|
|
declare module 'db' {
|
|
export default function deleteFromDb(arg: any, ...args: any[]): Promise<void>
|
|
}
|
|
|
|
declare module 'auth' {
|
|
export function validator<TFn extends (...args: any[]) => any>(fn: TFn): TFn
|
|
export function another<TFn extends (...args: any[]) => any>(fn: TFn): TFn
|
|
}
|
|
|
|
declare module 'anything' {
|
|
const ANYTHING: any
|
|
export default ANYTHING
|
|
}
|
|
|
|
declare module 'foo' {
|
|
const f: any
|
|
export default f
|
|
export const f1: any
|
|
export const f2: any
|
|
}
|
|
|
|
declare module 'components' {
|
|
import React from 'react'
|
|
|
|
export function Button(
|
|
props: {
|
|
action: () => Promise<any>
|
|
} & React.ComponentProps<'button'>
|
|
): React.ReactNode
|
|
|
|
export function Form(
|
|
props: React.PropsWithChildren<{ action: () => Promise<any> }>
|
|
): React.ReactNode
|
|
|
|
export function Client(props: Record<string, any>): React.ReactNode
|
|
}
|
|
|
|
declare module 'navigation' {
|
|
export function redirect(href: string): void
|
|
}
|
|
|
|
// Some tests generate `data:text/javascript,...` imports
|
|
declare module 'data:text/*'
|