Skip to content

DeepTeam is a framework to red team LLMs and AI agents.

update all themes from js to ts

A-Vamshi70cc77000d69
diff --git a/docs/src/theme/DocSidebar/index.js b/docs/src/theme/DocSidebar/index.tsx
similarity index 84%
rename from docs/src/theme/DocSidebar/index.js
rename to docs/src/theme/DocSidebar/index.tsx
index 3496e8af..042cf387 100644
--- a/docs/src/theme/DocSidebar/index.js
+++ b/docs/src/theme/DocSidebar/index.tsx
@@ -1,11 +1,12 @@
-import React from 'react';
+import React, {type ReactNode} from 'react';
import { useWindowSize } from '@docusaurus/theme-common';
import DocSidebarDesktop from '@theme/DocSidebar/Desktop';
import DocSidebarMobile from '@theme/DocSidebar/Mobile';
import SearchBar from '@theme/SearchBar';
+import type {Props} from '@theme/DocSidebar';
import styles from './styles.module.scss';
-export default function DocSidebar(props) {
+export default function DocSidebar(props: Props): ReactNode {
const windowSize = useWindowSize();
const shouldRenderSidebarDesktop =
diff --git a/docs/src/theme/TOC/index.js b/docs/src/theme/TOC/index.tsx
similarity index 90%
rename from docs/src/theme/TOC/index.js
rename to docs/src/theme/TOC/index.tsx
index 51200ae2..b36a99f1 100644
--- a/docs/src/theme/TOC/index.js
+++ b/docs/src/theme/TOC/index.tsx
@@ -1,6 +1,7 @@
-import React from 'react';
+import React, {type ReactNode} from 'react';
import clsx from 'clsx';
import TOCItems from '@theme/TOCItems';
+import type {Props} from '@theme/TOC';
import styles from './styles.module.scss';
// Using a custom className
@@ -8,7 +9,7 @@ import styles from './styles.module.scss';
const LINK_CLASS_NAME = 'table-of-contents__link toc-highlight';
const LINK_ACTIVE_CLASS_NAME = 'table-of-contents__link--active';
-export default function TOC({ className, ...props }) {
+export default function TOC({ className, ...props }: Props): ReactNode {
return (
<div className={clsx(styles.tableOfContents, className)}>
{/* Scrollable container for TOC items */}