Skip to content

Commit 1633eff

Browse files
committed
Update the dts type generator
1 parent 08e8cb1 commit 1633eff

File tree

2 files changed

+271
-273
lines changed

2 files changed

+271
-273
lines changed

scripts/danger-dts.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ const createDTS = () => {
1313
1414
import * as GitHub from "@octokit/rest"
1515
16-
declare module "danger" {
17-
`
18-
const footer = `}
1916
`
17+
const footer = ``
2018

2119
let fileOutput = ""
2220

@@ -80,7 +78,7 @@ declare module "danger" {
8078
const noRedundantExports = trimmedWhitespaceLines
8179
.replace(/export interface/g, "interface")
8280
.replace(/export type/g, "type")
83-
const indentedBody = mapLines(noRedundantExports, line => (line.length ? ` ${line}` : ""))
81+
const indentedBody = mapLines(noRedundantExports, line => (line.length ? line : ""))
8482
return header + indentedBody + footer
8583
}
8684

0 commit comments

Comments
 (0)