Skip to content

Commit fd97b6a

Browse files
committed
fix linter warnings
1 parent 563ed10 commit fd97b6a

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/type-extensions/function.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ class FunctionTypeExtension extends TypeExtension<FunctionType, FunctionDecorati
103103
}
104104

105105
try {
106-
let result;
107-
if (target.prototype) result = new (target as any)(...args);
108-
else result = target.apply(options?.self, args);
106+
let result
107+
if (target.prototype) {
108+
result = new (target as any)(...args)
109+
} else {
110+
result = target.apply(options?.self, args)
111+
}
109112

110113
if (result === undefined) {
111114
return 0

test/engine.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -806,13 +806,13 @@ describe('Engine', () => {
806806

807807
it('lots of doString calls should succeed', async () => {
808808
const engine = await getEngine()
809-
const length = 10000;
809+
const length = 10000
810810

811811
for (let i = 0; i < length; i++) {
812-
const a = Math.floor(Math.random() * 100);
813-
const b = Math.floor(Math.random() * 100);
814-
const result = await engine.doString(`return ${a} + ${b};`);
815-
expect(result).to.equal(a + b);
812+
const a = Math.floor(Math.random() * 100)
813+
const b = Math.floor(Math.random() * 100)
814+
const result = await engine.doString(`return ${a} + ${b};`)
815+
expect(result).to.equal(a + b)
816816
}
817817
})
818818
})

0 commit comments

Comments
 (0)