Skip to content

Commit feb83ba

Browse files
authored
Convert http-api to Typescript (#2063)
1 parent 963c769 commit feb83ba

File tree

15 files changed

+560
-432
lines changed

15 files changed

+560
-432
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build:minify-browser": "terser dist/browser-matrix.js --compress --mangle --source-map --output dist/browser-matrix.min.js",
1616
"gendoc": "jsdoc -c jsdoc.json -P package.json",
1717
"lint": "yarn lint:types && yarn lint:js",
18-
"lint:js": "eslint --max-warnings 4 src spec",
18+
"lint:js": "eslint --max-warnings 0 src spec",
1919
"lint:js-fix": "eslint --fix src spec",
2020
"lint:types": "tsc --noEmit",
2121
"test": "jest",
@@ -77,6 +77,7 @@
7777
"@babel/register": "^7.12.10",
7878
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.8.tgz",
7979
"@types/bs58": "^4.0.1",
80+
"@types/content-type": "^1.1.5",
8081
"@types/jest": "^26.0.20",
8182
"@types/node": "12",
8283
"@types/request": "^2.48.5",

spec/integ/matrix-client-event-timeline.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ describe("MatrixClient event timelines", function() {
502502
const params = req.queryParams;
503503
expect(params.dir).toEqual("b");
504504
expect(params.from).toEqual("start_token0");
505-
expect(params.limit).toEqual(30);
505+
expect(params.limit).toEqual("30");
506506
}).respond(200, function() {
507507
return {
508508
chunk: [EVENTS[1], EVENTS[2]],
@@ -553,7 +553,7 @@ describe("MatrixClient event timelines", function() {
553553
const params = req.queryParams;
554554
expect(params.dir).toEqual("f");
555555
expect(params.from).toEqual("end_token0");
556-
expect(params.limit).toEqual(20);
556+
expect(params.limit).toEqual("20");
557557
}).respond(200, function() {
558558
return {
559559
chunk: [EVENTS[1], EVENTS[2]],

0 commit comments

Comments
 (0)