mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
chore(website): cleanup ts-errors
This commit is contained in:
@@ -15,8 +15,8 @@ import type {
|
||||
ApiFunction,
|
||||
} from '@microsoft/api-extractor-model';
|
||||
import { ApiItemKind, ApiModel } from '@microsoft/api-extractor-model';
|
||||
import type { Metadata } from 'next';
|
||||
import { notFound } from 'next/navigation';
|
||||
import type { Metadata } from 'next/types';
|
||||
import { fetchModelJSON } from '~/app/docAPI';
|
||||
import { Class } from '~/components/model/Class';
|
||||
import { Interface } from '~/components/model/Interface';
|
||||
@@ -42,11 +42,11 @@ async function fetchHeadMember({ package: packageName, version, item }: ItemRout
|
||||
return findMember(model, packageName, memberName);
|
||||
}
|
||||
|
||||
function resolveMemberSearchParams(packageName: string, member: ApiItem) {
|
||||
function resolveMemberSearchParams(packageName: string, member?: ApiItem) {
|
||||
const params = new URLSearchParams({
|
||||
pkg: packageName,
|
||||
kind: member?.kind,
|
||||
name: member?.displayName,
|
||||
kind: member?.kind ?? '',
|
||||
name: member?.displayName ?? '',
|
||||
});
|
||||
|
||||
switch (member?.kind) {
|
||||
|
||||
@@ -3,10 +3,9 @@ import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
||||
import { VscVersions } from '@react-icons/all-files/vsc/VscVersions';
|
||||
import Link from 'next/link';
|
||||
import { notFound } from 'next/navigation';
|
||||
import type { ServerRuntime } from 'next/types';
|
||||
import { PACKAGES } from '~/util/constants';
|
||||
|
||||
export const runtime: ServerRuntime = 'edge';
|
||||
export const runtime = 'edge';
|
||||
|
||||
async function getData(pkg: string) {
|
||||
if (!PACKAGES.includes(pkg)) {
|
||||
|
||||
@@ -3,10 +3,9 @@ import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft';
|
||||
import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
||||
import { VscPackage } from '@react-icons/all-files/vsc/VscPackage';
|
||||
import Link from 'next/link';
|
||||
import type { ServerRuntime } from 'next/types';
|
||||
import { PACKAGES } from '~/util/constants';
|
||||
|
||||
export const runtime: ServerRuntime = 'edge';
|
||||
export const runtime = 'edge';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user