hunk.code_window:   removedPackages.forEach(dependency => {
       delete packageJson[saveType][dependency]
     })
     await writePkg(pkgJsonPath, packageJson)
     return packageJson
  
hunk.labels: keep replace replace replace keep keep keep
hunk.after_edit:     if (!packageJson[saveType]) return packageJson
       removedPackages.forEach(dependency => {
         delete packageJson[saveType][dependency]
       })
     } else {
       dependenciesTypes
         .filter(deptype => packageJson[deptype])
         .forEach(deptype => {
           removedPackages.forEach(dependency => {
             delete packageJson[deptype][dependency]
           })
         })
     }
  
hunk.file_path: src/removeDeps.ts
hunk.type: replace
file: import loadJsonFile = require('load-json-file')
  import writePkg = require('write-pkg')
  import {DependenciesType} from './getSaveType'
  import {Package} from './types'
  
  export default async function (
    pkgJsonPath: string,
    removedPackages: string[],
    saveType: DependenciesType
  ): Promise<Package> {
    const packageJson = await loadJsonFile(pkgJsonPath)
    packageJson[saveType] = packageJson[saveType]
  
    if (!packageJson[saveType]) return packageJson
  
    removedPackages.forEach(dependency => {
      delete packageJson[saveType][dependency]
    })
  
    await writePkg(pkgJsonPath, packageJson)
    return packageJson
  }
  