-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.d.ts
43 lines (37 loc) · 948 Bytes
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { ReactNode } from 'react'
declare module 'next' {
export interface MetaData {
/**
* Leaving title empty will default it to the site title.
*/
title?: string
description?: string
image?: string
}
export type GetNextPageLayout<P> = (page: ReactNode, props: P) => ReactNode
export type GetMeta<P> = (props: P) => MetaData
export interface NextPage<Props = {}, InitialProps = Props> {
getLayout?: GetNextPageLayout<Props>
getMeta?: GetMeta<Props>
}
export interface NextPageContext {
getLayout?: GetNextPageLayout
getMeta?: GetMeta
}
export interface NextComponentType<
C extends NextPageContext,
IP = C['initialProps'],
P = {},
> {
getLayout?: GetNextPageLayout
getMeta?: GetMeta
}
}
declare global {
declare namespace NodeJS {
export interface ProcessEnv {
NODE_ENV: 'development' | 'production' | 'test'
SITE_URL: string
}
}
}