Skip to content

Commit

Permalink
Update the dts type generator
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed May 21, 2018
1 parent 08e8cb1 commit 1633eff
Show file tree
Hide file tree
Showing 2 changed files with 271 additions and 273 deletions.
6 changes: 2 additions & 4 deletions scripts/danger-dts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ const createDTS = () => {
import * as GitHub from "@octokit/rest"
declare module "danger" {
`
const footer = `}
`
const footer = ``

let fileOutput = ""

Expand Down Expand Up @@ -80,7 +78,7 @@ declare module "danger" {
const noRedundantExports = trimmedWhitespaceLines
.replace(/export interface/g, "interface")
.replace(/export type/g, "type")
const indentedBody = mapLines(noRedundantExports, line => (line.length ? ` ${line}` : ""))
const indentedBody = mapLines(noRedundantExports, line => (line.length ? line : ""))
return header + indentedBody + footer
}

Expand Down

0 comments on commit 1633eff

Please sign in to comment.