cohabit_mail/types.ts

31 lines
512 B
TypeScript

import type { FunctionComponent, JSX } from 'preact'
import type { Contact } from './src/contact.ts'
export type Mail = {
from: Contact
to: Contact[]
subject: string
body: JSX.Element
options: {
cc: Contact[]
cci: Contact[]
attachments: string[]
}
}
export type Template<
T extends FunctionComponent<P>,
P extends Record<string, unknown>,
> = {
name: string
description: string
builder: T
props: {
name: string
description: string
required: boolean
multiline: boolean
tag: P
}[]
}