0.0.3.0
This commit is contained in:
Vendored
+94
@@ -0,0 +1,94 @@
|
||||
// This file is generated automatically by Next.js
|
||||
// Do not edit this file manually
|
||||
|
||||
type AppRoutes = "/" | "/auth/register" | "/auth/signin" | "/members" | "/members/[id]" | "/members/new" | "/settings" | "/timeline" | "/tree" | "/trees/new"
|
||||
type AppRouteHandlerRoutes = "/api/auth/[...nextauth]" | "/api/auth/register" | "/api/trees" | "/api/trees/[treeId]" | "/api/trees/[treeId]/activity-logs" | "/api/trees/[treeId]/collaborators" | "/api/trees/[treeId]/import" | "/api/trees/[treeId]/invite" | "/api/trees/[treeId]/members" | "/api/trees/[treeId]/members/[memberId]" | "/api/user/activity-logs" | "/api/user/change-password" | "/api/user/profile"
|
||||
type PageRoutes = never
|
||||
type LayoutRoutes = "/"
|
||||
type RedirectRoutes = never
|
||||
type RewriteRoutes = never
|
||||
type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes | AppRouteHandlerRoutes
|
||||
|
||||
|
||||
interface ParamMap {
|
||||
"/": {}
|
||||
"/api/auth/[...nextauth]": { "nextauth": string[]; }
|
||||
"/api/auth/register": {}
|
||||
"/api/trees": {}
|
||||
"/api/trees/[treeId]": { "treeId": string; }
|
||||
"/api/trees/[treeId]/activity-logs": { "treeId": string; }
|
||||
"/api/trees/[treeId]/collaborators": { "treeId": string; }
|
||||
"/api/trees/[treeId]/import": { "treeId": string; }
|
||||
"/api/trees/[treeId]/invite": { "treeId": string; }
|
||||
"/api/trees/[treeId]/members": { "treeId": string; }
|
||||
"/api/trees/[treeId]/members/[memberId]": { "treeId": string; "memberId": string; }
|
||||
"/api/user/activity-logs": {}
|
||||
"/api/user/change-password": {}
|
||||
"/api/user/profile": {}
|
||||
"/auth/register": {}
|
||||
"/auth/signin": {}
|
||||
"/members": {}
|
||||
"/members/[id]": { "id": string; }
|
||||
"/members/new": {}
|
||||
"/settings": {}
|
||||
"/timeline": {}
|
||||
"/tree": {}
|
||||
"/trees/new": {}
|
||||
}
|
||||
|
||||
|
||||
export type ParamsOf<Route extends Routes> = ParamMap[Route]
|
||||
|
||||
interface LayoutSlotMap {
|
||||
"/": never
|
||||
}
|
||||
|
||||
|
||||
export type { AppRoutes, PageRoutes, LayoutRoutes, RedirectRoutes, RewriteRoutes, ParamMap, AppRouteHandlerRoutes }
|
||||
|
||||
declare global {
|
||||
/**
|
||||
* Props for Next.js App Router page components
|
||||
* @example
|
||||
* ```tsx
|
||||
* export default function Page(props: PageProps<'/blog/[slug]'>) {
|
||||
* const { slug } = await props.params
|
||||
* return <div>Blog post: {slug}</div>
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
interface PageProps<AppRoute extends AppRoutes> {
|
||||
params: Promise<ParamMap[AppRoute]>
|
||||
searchParams: Promise<Record<string, string | string[] | undefined>>
|
||||
}
|
||||
|
||||
/**
|
||||
* Props for Next.js App Router layout components
|
||||
* @example
|
||||
* ```tsx
|
||||
* export default function Layout(props: LayoutProps<'/dashboard'>) {
|
||||
* return <div>{props.children}</div>
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
type LayoutProps<LayoutRoute extends LayoutRoutes> = {
|
||||
params: Promise<ParamMap[LayoutRoute]>
|
||||
children: React.ReactNode
|
||||
} & {
|
||||
[K in LayoutSlotMap[LayoutRoute]]: React.ReactNode
|
||||
}
|
||||
|
||||
/**
|
||||
* Context for Next.js App Router route handlers
|
||||
* @example
|
||||
* ```tsx
|
||||
* export async function GET(request: NextRequest, context: RouteContext<'/api/users/[id]'>) {
|
||||
* const { id } = await context.params
|
||||
* return Response.json({ id })
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
interface RouteContext<AppRouteHandlerRoute extends AppRouteHandlerRoutes> {
|
||||
params: Promise<ParamMap[AppRouteHandlerRoute]>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,268 @@
|
||||
// This file is generated automatically by Next.js
|
||||
// Do not edit this file manually
|
||||
// This file validates that all pages and layouts export the correct types
|
||||
|
||||
import type { AppRoutes, LayoutRoutes, ParamMap, AppRouteHandlerRoutes } from "./routes.js"
|
||||
import type { ResolvingMetadata, ResolvingViewport } from "next/types.js"
|
||||
import type { NextRequest } from 'next/server.js'
|
||||
|
||||
type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
|
||||
default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
|
||||
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
|
||||
generateMetadata?: (
|
||||
props: { params: Promise<ParamMap[Route]> } & any,
|
||||
parent: ResolvingMetadata
|
||||
) => Promise<any> | any
|
||||
generateViewport?: (
|
||||
props: { params: Promise<ParamMap[Route]> } & any,
|
||||
parent: ResolvingViewport
|
||||
) => Promise<any> | any
|
||||
metadata?: any
|
||||
viewport?: any
|
||||
}
|
||||
|
||||
type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
|
||||
default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
|
||||
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
|
||||
generateMetadata?: (
|
||||
props: { params: Promise<ParamMap[Route]> } & any,
|
||||
parent: ResolvingMetadata
|
||||
) => Promise<any> | any
|
||||
generateViewport?: (
|
||||
props: { params: Promise<ParamMap[Route]> } & any,
|
||||
parent: ResolvingViewport
|
||||
) => Promise<any> | any
|
||||
metadata?: any
|
||||
viewport?: any
|
||||
}
|
||||
|
||||
type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRoutes> = {
|
||||
GET?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
||||
POST?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
||||
PUT?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
||||
PATCH?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
||||
DELETE?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
||||
HEAD?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
||||
OPTIONS?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
||||
}
|
||||
|
||||
|
||||
// Validate ../../app/auth/register/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/auth/register">> = Specific
|
||||
const handler = {} as typeof import("../../app/auth/register/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/auth/signin/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/auth/signin">> = Specific
|
||||
const handler = {} as typeof import("../../app/auth/signin/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/members/[id]/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/members/[id]">> = Specific
|
||||
const handler = {} as typeof import("../../app/members/[id]/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/members/new/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/members/new">> = Specific
|
||||
const handler = {} as typeof import("../../app/members/new/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/members/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/members">> = Specific
|
||||
const handler = {} as typeof import("../../app/members/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/">> = Specific
|
||||
const handler = {} as typeof import("../../app/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/settings/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/settings">> = Specific
|
||||
const handler = {} as typeof import("../../app/settings/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/timeline/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/timeline">> = Specific
|
||||
const handler = {} as typeof import("../../app/timeline/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/tree/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/tree">> = Specific
|
||||
const handler = {} as typeof import("../../app/tree/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/trees/new/page.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends AppPageConfig<"/trees/new">> = Specific
|
||||
const handler = {} as typeof import("../../app/trees/new/page.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/auth/[...nextauth]/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/[...nextauth]">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/auth/[...nextauth]/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/auth/register/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/register">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/auth/register/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/trees/[treeId]/activity-logs/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/trees/[treeId]/activity-logs">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/trees/[treeId]/activity-logs/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/trees/[treeId]/collaborators/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/trees/[treeId]/collaborators">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/trees/[treeId]/collaborators/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/trees/[treeId]/import/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/trees/[treeId]/import">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/trees/[treeId]/import/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/trees/[treeId]/invite/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/trees/[treeId]/invite">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/trees/[treeId]/invite/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/trees/[treeId]/members/[memberId]/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/trees/[treeId]/members/[memberId]">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/trees/[treeId]/members/[memberId]/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/trees/[treeId]/members/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/trees/[treeId]/members">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/trees/[treeId]/members/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/trees/[treeId]/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/trees/[treeId]">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/trees/[treeId]/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/trees/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/trees">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/trees/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/user/activity-logs/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/user/activity-logs">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/user/activity-logs/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/user/change-password/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/user/change-password">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/user/change-password/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
// Validate ../../app/api/user/profile/route.ts
|
||||
{
|
||||
type __IsExpected<Specific extends RouteHandlerConfig<"/api/user/profile">> = Specific
|
||||
const handler = {} as typeof import("../../app/api/user/profile/route.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Validate ../../app/layout.tsx
|
||||
{
|
||||
type __IsExpected<Specific extends LayoutConfig<"/">> = Specific
|
||||
const handler = {} as typeof import("../../app/layout.js")
|
||||
type __Check = __IsExpected<typeof handler>
|
||||
// @ts-ignore
|
||||
type __Unused = __Check
|
||||
}
|
||||
Reference in New Issue
Block a user