|
- import { NextPage as DefaultNextPage } from 'next/types';
- import { NextApiRequest, NextApiResponse } from '../common';
-
- export const FormDerivedElementComponent = 'form' as const;
-
- export type FormDerivedElement = HTMLElementTagNameMap[typeof FormDerivedElementComponent];
-
- export const ALLOWED_SERVER_METHODS = ['get', 'post'] as const;
-
- export type AllowedServerMethod = typeof ALLOWED_SERVER_METHODS[number];
-
- export const ALLOWED_CLIENT_METHODS = [
- ...ALLOWED_SERVER_METHODS,
- 'put',
- 'patch',
- 'delete',
- ] as const;
-
- export type AllowedClientMethod = typeof ALLOWED_CLIENT_METHODS[number];
-
- export type NextPage<T = NonNullable<unknown>, U = T> = DefaultNextPage<
- T & {
- res: NextApiResponse;
- req: NextApiRequest;
- }, U
- >
|