Skip to content

Commit cfc2059

Browse files
committed
Fix unused variable ESLint error
1 parent e892add commit cfc2059

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/messaging/Message.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import {WARDuino} from '../debug/WARDuino';
2-
import {ackParser, breakpointParser, identityParser, invokeParser, stateParser} from './Parsers';
2+
import {ackParser, breakpointParser, invokeParser, stateParser} from './Parsers';
33
import {Breakpoint} from '../debug/Breakpoint';
44
import {WASM} from '../sourcemap/Wasm';
55
import {write} from 'ieee754';
66
import {SourceMap} from '../sourcemap/SourceMap';
77
import {readFileSync} from 'fs';
8+
import {CompileOutput, CompilerFactory} from '../manage/Compiler';
9+
import {WABT} from '../util/env';
810
import Interrupt = WARDuino.Interrupt;
911
import State = WARDuino.State;
1012
import Value = WASM.Value;
1113
import Type = WASM.Type;
12-
import {CompileOutput, CompilerFactory} from '../manage/Compiler';
13-
import {WABT} from '../util/env';
1414

1515
// An acknowledgement returned by the debugger
1616
export interface Ack {
@@ -144,7 +144,7 @@ export namespace Message {
144144

145145
return {
146146
type: Interrupt.updateModule,
147-
payload: (map: SourceMap.Mapping) => payload(readFileSync(wasm)),
147+
payload: () => payload(readFileSync(wasm)),
148148
parser: (line: string) => {
149149
return ackParser(line, 'CHANGE Module');
150150
}
@@ -154,7 +154,7 @@ export namespace Message {
154154
export function pushEvent(topic: string, payload: string): Request<Ack> {
155155
return {
156156
type: Interrupt.pushEvent,
157-
payload: (map: SourceMap.Mapping) => `{topic: '${topic}', payload: '${payload}'}`,
157+
payload: () => `{topic: '${topic}', payload: '${payload}'}`,
158158
parser: (line: string) => {
159159
return ackParser(line, 'Interrupt: 73');
160160
}

src/sourcemap/SourceMapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class AsScriptMapper implements SourceMapper {
211211
public mapping(): Promise<Mapping> {
212212
const input = fs.readFileSync(`${this.tmpdir}/upload.wasm.map`)
213213

214-
return new Promise((resolve, reject) => {
214+
return new Promise((resolve) => {
215215
new SourceMapConsumer(input.toString()).then((consumer: SourceMapConsumer) => {
216216
const mapping: Mapping = new SourceMap.Mapping().init([], [], [], []);
217217
consumer.eachMapping(function (item: MappingItem) {

src/testbeds/Platform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ export abstract class Platform extends EventEmitter implements Testbed {
6060
private search(message: string): number {
6161
let index: number = 0;
6262
while (index < this.requests.length) {
63-
const [candidate, resolver] = this.requests[index];
63+
const [candidate] = this.requests[index];
6464
try {
6565
// try candidate parser
6666
candidate.parser(message);
6767
return index;
68-
} catch (e) {
68+
} catch {
6969
// failure: try next request
7070
index++;
7171
}

src/util/retry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function retry<T>(promise: () => Promise<T>, retries: number): Promise<T>
77
try {
88
const result: T = await promise();
99
resolve(result);
10-
} catch (e) {
10+
} catch {
1111
trying = ++attempt < retries;
1212
}
1313
}

0 commit comments

Comments
 (0)