Design system.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

15 行
354 B

  1. import {NextApiHandler} from 'next';
  2. import {readFile} from 'fs/promises';
  3. const handler: NextApiHandler = async (req, res) => {
  4. const typedocJson = await readFile('./.data/typedoc-data.json', 'utf-8');
  5. const typedocData = JSON.parse(typedocJson);
  6. res.json(
  7. typedocData.children.map((c) => ({
  8. name: c.name,
  9. }))
  10. );
  11. };
  12. export default handler;