Design system.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

15 satır
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;