Skip to content

Commit 6f8e1b5

Browse files
Add return type annotations to async components for better type safety
Co-authored-by: rahul.chhabria <[email protected]>
1 parent d7e17ee commit 6f8e1b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/platformSdkDetail/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import styles from './styles.module.scss';
66

77
import {SmartLink} from '../smartLink';
88

9-
export async function PlatformSdkDetail() {
9+
export async function PlatformSdkDetail(): Promise<JSX.Element | null> {
1010
const {rootNode, path} = serverContext();
1111
const platformOrGuide = getCurrentPlatformOrGuide(rootNode, path);
1212
if (!platformOrGuide) {

src/components/sidebar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const activeLinkSelector = `.${styles.sidebar} .toc-item .active`;
2222

2323
export const sidebarToggleId = styles['navbar-menu-toggle'];
2424

25-
export async function Sidebar({path, versions}: SidebarProps) {
25+
export async function Sidebar({path, versions}: SidebarProps): Promise<JSX.Element | null> {
2626
const rootNode = await getDocsRootNode();
2727

2828
if (isDeveloperDocs) {

0 commit comments

Comments
 (0)