hunk.code_window: import { stableHash } from './hash'
   import { isFunction } from './shared'
   import type { Key } from '../types'
  
hunk.labels: keep keep keep replace keep
hunk.after_edit: import type { Key, Arguments } from '../types'
  
hunk.file_path: _internal/src/utils/serialize.ts
hunk.type: replace
file: import { NextApiRequest, NextApiResponse } from 'next'
  
  const projects = [
    'facebook/flipper',
    'vuejs/vuepress',
    'rust-lang/rust',
    'vercel/next.js'
  ]
  
  export default function api(req: NextApiRequest, res: NextApiResponse) {
    if (req.query.id) {
      // a slow endpoint for getting repo data
      fetch(`https://api.github.com/repos/${req.query.id}`)
        .then(resp => resp.json())
        .then(data => {
          setTimeout(() => {
            res.json(data)
          }, 2000)
        })
  
      return
    }
    setTimeout(() => {
      res.json(projects)
    }, 2000)
  }
  