Skip to content

Commit 2105046

Browse files
committed
Fix lint and build issues
1 parent b85d0dd commit 2105046

File tree

8 files changed

+19
-6
lines changed

8 files changed

+19
-6
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
},
2424
"dependencies": {
2525
"@babel/code-frame": "^7.0.0-beta.34",
26+
"@types/parcel-bundler": "^1.12.0",
2627
"body-parser": "^1.18.2",
2728
"chalk": "^2.3.0",
2829
"comment-json": "^1.1.3",

src/backend/ipc/server.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ export class Server<RQ, RS, K extends Keys<RQ, RS> = Keys<RQ, RS>> {
1010
private readonly app = express()
1111
private readonly server: HTTPServer
1212

13-
private listening = false
14-
1513
constructor(name: string, handler: Handler<RQ, RS>) {
1614
const app = this.app.use(bodyParser.json({limit: '10mb'}))
1715

@@ -35,7 +33,7 @@ export class Server<RQ, RS, K extends Keys<RQ, RS> = Keys<RQ, RS>> {
3533
)
3634

3735
this.server = app
38-
.listen(setSocketPath(name), () => this.listening = true)
36+
.listen(setSocketPath(name))
3937
.on('error', err => console.error(err))
4038
}
4139

src/backend/ipc/worker/launcher.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ process.on('message', async (message: RequestMessage<{}>) => {
1010
try {
1111
const result = await handler[message.method](message.data)
1212
const response: ResponseMessage<{}> = {
13-
id, method, type: 'response', data: {result, error: null}
13+
// don't quite understand how this type signature is supposed to
14+
// work (I think it's impossible to satisfy), so just cast to any.
15+
id, method, type: 'response', data: {result, error: null} as any
1416
}
1517

1618
process.send!(response)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare module "parcel-bundler/src/assets/TypeScriptAsset" {
2+
import JSAsset from "parcel-bundler/lib/assets/JSAsset"
3+
4+
export = JSAsset;
5+
}

src/frontend/assets/typescript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import TypescriptAsset from 'parcel-bundler/src/assets/TypeScriptAsset'
88
class TSAsset extends TypescriptAsset {
99
private readonly config: Promise<Configuration>
1010

11-
constructor() {
11+
constructor(name: string, options: any) {
1212
super(name, options)
1313

1414
this.config = loadConfiguration(name, options.rootDir)

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"importHelpers": true,
1717
"downlevelIteration": true,
1818
"moduleResolution": "node",
19+
"esModuleInterop": true,
1920

2021
"rootDir": "src",
2122
"outDir": "build"

tslint.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"no-duplicate-variable": true,
55
"no-string-literal": false,
66
"no-console": [false],
7-
"no-unused-variable": [true],
87
"whitespace": [
98
true,
109
"check-operator", "check-separator", "check-type", "check-typecast"

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,13 @@
812812
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
813813
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
814814

815+
"@types/parcel-bundler@^1.12.0":
816+
version "1.12.0"
817+
resolved "https://registry.yarnpkg.com/@types/parcel-bundler/-/parcel-bundler-1.12.0.tgz#ab35ec277689593b6b281d689f0d86b0249f9220"
818+
integrity sha512-25U2PLViO4rmT3XO3Mf5pSddLVr+ey5AzX9PgGzIvvMbzxkzdRGvcxb55n8W7CmYEdc9QQHRJR++a7aMSkcAzQ==
819+
dependencies:
820+
"@types/express-serve-static-core" "*"
821+
815822
"@types/q@^1.5.1":
816823
version "1.5.2"
817824
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8"

0 commit comments

Comments
 (0)