diff --git a/apps/website/src/components/documentation/section/MethodsSection.tsx b/apps/website/src/components/documentation/section/MethodsSection.tsx
index 3d1dacc93..f8ad9d1c1 100644
--- a/apps/website/src/components/documentation/section/MethodsSection.tsx
+++ b/apps/website/src/components/documentation/section/MethodsSection.tsx
@@ -19,7 +19,7 @@ function isMethodLike(item: ApiItem): item is ApiMethod | ApiMethodSignature {
);
}
-export function MethodsSection({ item }: { item: ApiItemContainerMixin }) {
+export function MethodsSection({ item }: { readonly item: ApiItemContainerMixin }) {
const members = resolveMembers(item, isMethodLike);
const methodItems = useMemo(
diff --git a/apps/website/src/components/documentation/section/ParametersSection.tsx b/apps/website/src/components/documentation/section/ParametersSection.tsx
index a34d98705..0b0eb18c3 100644
--- a/apps/website/src/components/documentation/section/ParametersSection.tsx
+++ b/apps/website/src/components/documentation/section/ParametersSection.tsx
@@ -3,7 +3,7 @@ import { VscSymbolParameter } from '@react-icons/all-files/vsc/VscSymbolParamete
import { ParameterTable } from '../../ParameterTable';
import { DocumentationSection } from './DocumentationSection';
-export function ParameterSection({ item }: { item: ApiDocumentedItem & ApiParameterListMixin }) {
+export function ParameterSection({ item }: { readonly item: ApiDocumentedItem & ApiParameterListMixin }) {
return (
} padded title="Parameters">
diff --git a/apps/website/src/components/documentation/section/PropertiesSection.tsx b/apps/website/src/components/documentation/section/PropertiesSection.tsx
index 57a84765c..6ae6a34fb 100644
--- a/apps/website/src/components/documentation/section/PropertiesSection.tsx
+++ b/apps/website/src/components/documentation/section/PropertiesSection.tsx
@@ -3,7 +3,7 @@ import { VscSymbolProperty } from '@react-icons/all-files/vsc/VscSymbolProperty'
import { PropertyList } from '../../PropertyList';
import { DocumentationSection } from './DocumentationSection';
-export function PropertiesSection({ item }: { item: ApiItemContainerMixin }) {
+export function PropertiesSection({ item }: { readonly item: ApiItemContainerMixin }) {
return (
} padded title="Properties">
diff --git a/apps/website/src/components/documentation/section/SummarySection.tsx b/apps/website/src/components/documentation/section/SummarySection.tsx
index 27ef7f785..8bdd49ede 100644
--- a/apps/website/src/components/documentation/section/SummarySection.tsx
+++ b/apps/website/src/components/documentation/section/SummarySection.tsx
@@ -3,7 +3,7 @@ import { VscListSelection } from '@react-icons/all-files/vsc/VscListSelection';
import { TSDoc } from '../tsdoc/TSDoc';
import { DocumentationSection } from './DocumentationSection';
-export function SummarySection({ item }: { item: ApiDeclaredItem }) {
+export function SummarySection({ item }: { readonly item: ApiDeclaredItem }) {
return (
} padded separator title="Summary">
{item.tsdocComment?.summarySection ? (
diff --git a/apps/website/src/components/documentation/section/TypeParametersSection.tsx b/apps/website/src/components/documentation/section/TypeParametersSection.tsx
index afa94f13d..1471395c5 100644
--- a/apps/website/src/components/documentation/section/TypeParametersSection.tsx
+++ b/apps/website/src/components/documentation/section/TypeParametersSection.tsx
@@ -3,7 +3,7 @@ import { VscSymbolParameter } from '@react-icons/all-files/vsc/VscSymbolParamete
import { TypeParamTable } from '../../TypeParamTable';
import { DocumentationSection } from './DocumentationSection';
-export function TypeParameterSection({ item }: { item: ApiTypeParameterListMixin }) {
+export function TypeParameterSection({ item }: { readonly item: ApiTypeParameterListMixin }) {
return (
} padded title="Type Parameters">
diff --git a/apps/website/src/components/documentation/tsdoc/BlockComment.tsx b/apps/website/src/components/documentation/tsdoc/BlockComment.tsx
index f3fec803a..936dd6b97 100644
--- a/apps/website/src/components/documentation/tsdoc/BlockComment.tsx
+++ b/apps/website/src/components/documentation/tsdoc/BlockComment.tsx
@@ -1,7 +1,7 @@
import { Alert } from '@discordjs/ui';
import type { PropsWithChildren } from 'react';
-export function Block({ children, title }: PropsWithChildren<{ title: string }>) {
+export function Block({ children, title }: PropsWithChildren<{ readonly title: string }>) {
return (
{title}
@@ -13,7 +13,7 @@ export function Block({ children, title }: PropsWithChildren<{ title: string }>)
export function ExampleBlock({
children,
exampleIndex,
-}: PropsWithChildren<{ exampleIndex?: number | undefined }>): JSX.Element {
+}: PropsWithChildren<{ readonly exampleIndex?: number | undefined }>): JSX.Element {
return
{children};
}
diff --git a/apps/website/src/components/documentation/tsdoc/TSDoc.tsx b/apps/website/src/components/documentation/tsdoc/TSDoc.tsx
index ddf21ee41..74d48ad76 100644
--- a/apps/website/src/components/documentation/tsdoc/TSDoc.tsx
+++ b/apps/website/src/components/documentation/tsdoc/TSDoc.tsx
@@ -8,7 +8,7 @@ import { SyntaxHighlighter } from '../../SyntaxHighlighter';
import { resolveItemURI } from '../util';
import { DefaultValueBlock, DeprecatedBlock, ExampleBlock, RemarksBlock, ReturnsBlock, SeeBlock } from './BlockComment';
-export function TSDoc({ item, tsdoc }: { item: ApiItem; tsdoc: DocNode }): JSX.Element {
+export function TSDoc({ item, tsdoc }: { readonly item: ApiItem; readonly tsdoc: DocNode }): JSX.Element {
const createNode = useCallback(
(tsdoc: DocNode, idx?: number): ReactNode => {
switch (tsdoc.kind) {
diff --git a/apps/website/src/components/model/Class.tsx b/apps/website/src/components/model/Class.tsx
index ff791a033..22d219b69 100644
--- a/apps/website/src/components/model/Class.tsx
+++ b/apps/website/src/components/model/Class.tsx
@@ -10,7 +10,7 @@ import { ConstructorSection } from '../documentation/section/ConstructorSection'
import { TypeParameterSection } from '../documentation/section/TypeParametersSection';
// import { serializeMembers } from '../documentation/util';
-export function Class({ clazz }: { clazz: ApiClass }) {
+export function Class({ clazz }: { readonly clazz: ApiClass }) {
const constructor = clazz.members.find((member) => member.kind === ApiItemKind.Constructor) as
| ApiConstructor
| undefined;
diff --git a/apps/website/src/components/model/Interface.tsx b/apps/website/src/components/model/Interface.tsx
index a2856826e..6619b3573 100644
--- a/apps/website/src/components/model/Interface.tsx
+++ b/apps/website/src/components/model/Interface.tsx
@@ -7,7 +7,7 @@ import { ObjectHeader } from '../documentation/ObjectHeader';
import { TypeParameterSection } from '../documentation/section/TypeParametersSection';
// import { serializeMembers } from '../documentation/util';
-export function Interface({ item }: { item: ApiInterface }) {
+export function Interface({ item }: { readonly item: ApiInterface }) {
return (
diff --git a/apps/website/src/components/model/TypeAlias.tsx b/apps/website/src/components/model/TypeAlias.tsx
index 6d3501093..114e98613 100644
--- a/apps/website/src/components/model/TypeAlias.tsx
+++ b/apps/website/src/components/model/TypeAlias.tsx
@@ -4,7 +4,7 @@ import { Documentation } from '../documentation/Documentation';
import { Header } from '../documentation/Header';
import { SummarySection } from '../documentation/section/SummarySection';
-export function TypeAlias({ item }: { item: ApiTypeAlias }) {
+export function TypeAlias({ item }: { readonly item: ApiTypeAlias }) {
return (
diff --git a/apps/website/src/components/model/Variable.tsx b/apps/website/src/components/model/Variable.tsx
index 16168cd8e..8ac951e11 100644
--- a/apps/website/src/components/model/Variable.tsx
+++ b/apps/website/src/components/model/Variable.tsx
@@ -2,7 +2,7 @@ import type { ApiVariable } from '@microsoft/api-extractor-model';
import { Documentation } from '../documentation/Documentation';
import { ObjectHeader } from '../documentation/ObjectHeader';
-export function Variable({ item }: { item: ApiVariable }) {
+export function Variable({ item }: { readonly item: ApiVariable }) {
return (
diff --git a/apps/website/src/components/model/enum/Enum.tsx b/apps/website/src/components/model/enum/Enum.tsx
index 403394426..0728fe529 100644
--- a/apps/website/src/components/model/enum/Enum.tsx
+++ b/apps/website/src/components/model/enum/Enum.tsx
@@ -6,7 +6,7 @@ import { ObjectHeader } from '../../documentation/ObjectHeader';
import { DocumentationSection } from '../../documentation/section/DocumentationSection';
import { EnumMember } from './EnumMember';
-export function Enum({ item }: { item: ApiEnum }) {
+export function Enum({ item }: { readonly item: ApiEnum }) {
return (
diff --git a/apps/website/src/components/model/enum/EnumMember.tsx b/apps/website/src/components/model/enum/EnumMember.tsx
index 9d9afc754..7694c826d 100644
--- a/apps/website/src/components/model/enum/EnumMember.tsx
+++ b/apps/website/src/components/model/enum/EnumMember.tsx
@@ -3,7 +3,7 @@ import { SignatureText } from '../../SignatureText';
import { TSDoc } from '../../documentation/tsdoc/TSDoc';
import { CodeHeading } from '~/components/CodeHeading';
-export function EnumMember({ member }: { member: ApiEnumMember }) {
+export function EnumMember({ member }: { readonly member: ApiEnumMember }) {
return (
diff --git a/apps/website/src/components/model/function/Function.tsx b/apps/website/src/components/model/function/Function.tsx
index abbb5c443..059d9c68d 100644
--- a/apps/website/src/components/model/function/Function.tsx
+++ b/apps/website/src/components/model/function/Function.tsx
@@ -5,7 +5,7 @@ import { FunctionBody } from './FunctionBody';
const OverloadSwitcher = dynamic(async () => import('../../OverloadSwitcher'));
-export function Function({ item }: { item: ApiFunction }) {
+export function Function({ item }: { readonly item: ApiFunction }) {
const header = ;
if (item.getMergedSiblings().length > 1) {
diff --git a/apps/website/src/components/model/function/FunctionBody.tsx b/apps/website/src/components/model/function/FunctionBody.tsx
index 63291e433..0a4e5052e 100644
--- a/apps/website/src/components/model/function/FunctionBody.tsx
+++ b/apps/website/src/components/model/function/FunctionBody.tsx
@@ -10,7 +10,7 @@ export interface FunctionBodyProps {
overloadDocumentation: React.ReactNode[];
}
-export function FunctionBody({ item }: { item: ApiFunction }) {
+export function FunctionBody({ item }: { readonly item: ApiFunction }) {
return (
{/* @ts-expect-error async component */}
diff --git a/apps/website/src/components/model/method/Method.tsx b/apps/website/src/components/model/method/Method.tsx
index e407dbc26..30ee075eb 100644
--- a/apps/website/src/components/model/method/Method.tsx
+++ b/apps/website/src/components/model/method/Method.tsx
@@ -15,8 +15,8 @@ export function Method({
method,
inheritedFrom,
}: {
- inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined;
- method: ApiMethod | ApiMethodSignature;
+ readonly inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined;
+ readonly method: ApiMethod | ApiMethodSignature;
}) {
if (method.getMergedSiblings().length > 1) {
// We have overloads, use the overload switcher, but render
diff --git a/apps/website/src/components/model/method/MethodDocumentation.tsx b/apps/website/src/components/model/method/MethodDocumentation.tsx
index 3c0354b7d..9689c84ba 100644
--- a/apps/website/src/components/model/method/MethodDocumentation.tsx
+++ b/apps/website/src/components/model/method/MethodDocumentation.tsx
@@ -9,8 +9,8 @@ import { ParameterTable } from '../../ParameterTable';
import { TSDoc } from '../../documentation/tsdoc/TSDoc';
export interface MethodDocumentationProps {
- inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined;
- method: ApiMethod | ApiMethodSignature;
+ readonly inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined;
+ readonly method: ApiMethod | ApiMethodSignature;
}
export function MethodDocumentation({ method, inheritedFrom }: MethodDocumentationProps) {
diff --git a/apps/website/src/components/model/method/MethodHeader.tsx b/apps/website/src/components/model/method/MethodHeader.tsx
index 6c39095f8..136747acf 100644
--- a/apps/website/src/components/model/method/MethodHeader.tsx
+++ b/apps/website/src/components/model/method/MethodHeader.tsx
@@ -5,7 +5,7 @@ import { CodeHeading } from '~/components/CodeHeading';
import { ExcerptText } from '~/components/ExcerptText';
import { parametersString } from '~/components/documentation/util';
-export function MethodHeader({ method }: { method: ApiMethod | ApiMethodSignature }) {
+export function MethodHeader({ method }: { readonly method: ApiMethod | ApiMethodSignature }) {
const key = useMemo(
() => `${method.displayName}${method.overloadIndex && method.overloadIndex > 1 ? `:${method.overloadIndex}` : ''}`,
[method.displayName, method.overloadIndex],
diff --git a/packages/ui/src/lib/components/Alert.tsx b/packages/ui/src/lib/components/Alert.tsx
index e0822b40f..8fd099397 100644
--- a/packages/ui/src/lib/components/Alert.tsx
+++ b/packages/ui/src/lib/components/Alert.tsx
@@ -4,8 +4,8 @@ import { VscWarning } from '@react-icons/all-files/vsc/VscWarning';
import type { PropsWithChildren } from 'react';
export interface IAlert {
- title?: string | undefined;
- type: 'danger' | 'info' | 'success' | 'warning';
+ readonly title?: string | undefined;
+ readonly type: 'danger' | 'info' | 'success' | 'warning';
}
function resolveType(type: IAlert['type']) {
diff --git a/packages/ui/src/lib/components/Section.tsx b/packages/ui/src/lib/components/Section.tsx
index 8d90f00d9..ba5584256 100644
--- a/packages/ui/src/lib/components/Section.tsx
+++ b/packages/ui/src/lib/components/Section.tsx
@@ -5,14 +5,14 @@ import { Disclosure, DisclosureContent, useDisclosureState } from 'ariakit/discl
import type { PropsWithChildren } from 'react';
export interface SectionOptions {
- background?: boolean | undefined;
- buttonClassName?: string;
- className?: string;
- defaultClosed?: boolean | undefined;
- gutter?: boolean | undefined;
- icon?: JSX.Element | undefined;
- padded?: boolean | undefined;
- title: string;
+ readonly background?: boolean | undefined;
+ readonly buttonClassName?: string;
+ readonly className?: string;
+ readonly defaultClosed?: boolean | undefined;
+ readonly gutter?: boolean | undefined;
+ readonly icon?: JSX.Element | undefined;
+ readonly padded?: boolean | undefined;
+ readonly title: string;
}
export function Section({
diff --git a/packages/ui/src/lib/components/discord/Message.tsx b/packages/ui/src/lib/components/discord/Message.tsx
index f05868530..46872c903 100644
--- a/packages/ui/src/lib/components/discord/Message.tsx
+++ b/packages/ui/src/lib/components/discord/Message.tsx
@@ -4,14 +4,14 @@ import { DiscordMessageInteraction, type IDiscordMessageInteraction } from './Me
import { DiscordMessageReply, type IDiscordMessageReply } from './MessageReply.js';
export interface IDiscordMessage {
- author?: IDiscordMessageAuthor | undefined;
- authorNode?: ReactNode | undefined;
- followUp?: boolean;
- interaction?: IDiscordMessageInteraction | undefined;
- interactionNode?: ReactNode | undefined;
- reply?: IDiscordMessageReply | undefined;
- replyNode?: ReactNode | undefined;
- time?: string | undefined;
+ readonly author?: IDiscordMessageAuthor | undefined;
+ readonly authorNode?: ReactNode | undefined;
+ readonly followUp?: boolean;
+ readonly interaction?: IDiscordMessageInteraction | undefined;
+ readonly interactionNode?: ReactNode | undefined;
+ readonly reply?: IDiscordMessageReply | undefined;
+ readonly replyNode?: ReactNode | undefined;
+ readonly time?: string | undefined;
}
export function DiscordMessage({
diff --git a/packages/ui/src/lib/components/discord/MessageAuthor.tsx b/packages/ui/src/lib/components/discord/MessageAuthor.tsx
index 0e41f81bb..cb4009a6b 100644
--- a/packages/ui/src/lib/components/discord/MessageAuthor.tsx
+++ b/packages/ui/src/lib/components/discord/MessageAuthor.tsx
@@ -1,12 +1,12 @@
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
export interface IDiscordMessageAuthor {
- avatar: string;
- bot?: boolean;
- color?: string;
- time: string;
- username: string;
- verified?: boolean;
+ readonly avatar: string;
+ readonly bot?: boolean;
+ readonly color?: string;
+ readonly time: string;
+ readonly username: string;
+ readonly verified?: boolean;
}
export function DiscordMessageAuthor({ avatar, bot, verified, color, time, username }: IDiscordMessageAuthor) {
diff --git a/packages/ui/src/lib/components/discord/MessageAuthorReply.tsx b/packages/ui/src/lib/components/discord/MessageAuthorReply.tsx
index 78688fd61..410269d00 100644
--- a/packages/ui/src/lib/components/discord/MessageAuthorReply.tsx
+++ b/packages/ui/src/lib/components/discord/MessageAuthorReply.tsx
@@ -1,11 +1,11 @@
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
export interface IDiscordMessageAuthorReply {
- avatar: string;
- bot?: boolean;
- color?: string;
- username: string;
- verified?: boolean;
+ readonly avatar: string;
+ readonly bot?: boolean;
+ readonly color?: string;
+ readonly username: string;
+ readonly verified?: boolean;
}
export function DiscordMessageAuthorReply({ avatar, bot, verified, color, username }: IDiscordMessageAuthorReply) {
diff --git a/packages/ui/src/lib/components/discord/MessageBaseReply.tsx b/packages/ui/src/lib/components/discord/MessageBaseReply.tsx
index b6b4ec022..ee3c29218 100644
--- a/packages/ui/src/lib/components/discord/MessageBaseReply.tsx
+++ b/packages/ui/src/lib/components/discord/MessageBaseReply.tsx
@@ -5,7 +5,10 @@ export function DiscordMessageBaseReply({
author,
authorNode,
children,
-}: PropsWithChildren<{ author?: IDiscordMessageAuthorReply | undefined; authorNode?: ReactNode | undefined }>) {
+}: PropsWithChildren<{
+ readonly author?: IDiscordMessageAuthorReply | undefined;
+ readonly authorNode?: ReactNode | undefined;
+}>) {
return (
) {