mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
feat(website): add support for type parameter documentation (#8237)
This commit is contained in:
@@ -9,7 +9,13 @@ export interface ClassProps {
|
||||
|
||||
export function Class({ data }: ClassProps) {
|
||||
return (
|
||||
<DocContainer name={data.name} kind={data.kind} excerpt={data.excerpt} summary={data.summary}>
|
||||
<DocContainer
|
||||
name={data.name}
|
||||
kind={data.kind}
|
||||
excerpt={data.excerpt}
|
||||
summary={data.summary}
|
||||
typeParams={data.typeParameters}
|
||||
>
|
||||
<>
|
||||
{data.properties.length ? <PropertyList data={data.properties} /> : null}
|
||||
{data.methods.length ? <MethodList data={data.methods} /> : null}
|
||||
|
||||
@@ -8,7 +8,13 @@ export interface FunctionProps {
|
||||
|
||||
export function Function({ data }: FunctionProps) {
|
||||
return (
|
||||
<DocContainer name={data.name} kind={data.kind} excerpt={data.excerpt} summary={data.summary}>
|
||||
<DocContainer
|
||||
name={data.name}
|
||||
kind={data.kind}
|
||||
excerpt={data.excerpt}
|
||||
summary={data.summary}
|
||||
typeParams={data.typeParameters}
|
||||
>
|
||||
<ParameterTable data={data.parameters} />
|
||||
</DocContainer>
|
||||
);
|
||||
|
||||
@@ -9,7 +9,13 @@ export interface InterfaceProps {
|
||||
|
||||
export function Interface({ data }: InterfaceProps) {
|
||||
return (
|
||||
<DocContainer name={data.name} kind={data.kind} excerpt={data.excerpt} summary={data.summary}>
|
||||
<DocContainer
|
||||
name={data.name}
|
||||
kind={data.kind}
|
||||
excerpt={data.excerpt}
|
||||
summary={data.summary}
|
||||
typeParams={data.typeParameters}
|
||||
>
|
||||
<>
|
||||
{data.properties.length ? <PropertyList data={data.properties} /> : null}
|
||||
{data.methods.length ? <MethodList data={data.methods} /> : null}
|
||||
|
||||
@@ -7,7 +7,13 @@ export interface TypeAliasProps {
|
||||
|
||||
export function TypeAlias({ data }: TypeAliasProps) {
|
||||
return (
|
||||
<DocContainer name={data.name} kind={data.kind} excerpt={data.excerpt} summary={data.summary}>
|
||||
<DocContainer
|
||||
name={data.name}
|
||||
kind={data.kind}
|
||||
excerpt={data.excerpt}
|
||||
summary={data.summary}
|
||||
typeParams={data.typeParameters}
|
||||
>
|
||||
<div>WIP</div>
|
||||
</DocContainer>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user