Move custom types to types.d.ts
This commit is contained in:
parent
50829d32e0
commit
4635a17e3b
|
@ -27,6 +27,7 @@
|
|||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"types.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx"
|
||||
],
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
declare module "*.event.mdx" {
|
||||
import { ComponentType } from "react";
|
||||
|
||||
interface EventMetadata {
|
||||
name: string;
|
||||
short: string;
|
||||
date: Date;
|
||||
online: boolean;
|
||||
location: string;
|
||||
poster?: string;
|
||||
registerLink?: string;
|
||||
}
|
||||
|
||||
const ReactComponent: ComponentType;
|
||||
|
||||
export const metadata: EventMetadata;
|
||||
export default ReactComponent;
|
||||
}
|
||||
|
||||
declare module "*.news.mdx" {
|
||||
import { ComponentType } from "react";
|
||||
|
||||
interface NewsMetadata {
|
||||
author: string;
|
||||
date: Date;
|
||||
}
|
||||
|
||||
const ReactComponent: ComponentType;
|
||||
|
||||
export const metadata: NewsMetadata;
|
||||
export default ReactComponent;
|
||||
}
|
||||
|
||||
declare module "*.team-member.mdx" {
|
||||
import { ComponentType } from "react";
|
||||
|
||||
interface TeamMemberMetadata {
|
||||
name: string;
|
||||
role: string;
|
||||
image?: string;
|
||||
}
|
||||
|
||||
const ReactComponent: ComponentType;
|
||||
|
||||
export const metadata: TeamMemberMetadata;
|
||||
export default ReactComponent;
|
||||
}
|
||||
|
||||
declare module "*.section.mdx" {
|
||||
import { ComponentType } from "react";
|
||||
|
||||
interface SectionMetadata {
|
||||
title: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
const ReactComponent: ComponentType;
|
||||
|
||||
export const metadata: SectionMetadata;
|
||||
export default ReactComponent;
|
||||
}
|
||||
|
||||
declare module "*.mdx" {
|
||||
import { ComponentType } from "react";
|
||||
|
||||
const ReactComponent: ComponentType;
|
||||
|
||||
export default ReactComponent;
|
||||
}
|
Loading…
Reference in New Issue