Skip to content

Commit 04ccfea

Browse files
committed
fix type
1 parent c88977c commit 04ccfea

File tree

1 file changed

+3
-3
lines changed
  • examples/simple-player/server/src/library

1 file changed

+3
-3
lines changed

examples/simple-player/server/src/library/server.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from 'path';
55
import fs from 'fs';
66

77
// vendor
8-
import express from 'express';
8+
import express, { Response, Request } from 'express';
99
import { contentType } from 'mime-types';
1010

1111
// hack because __dirname is not defined
@@ -41,7 +41,7 @@ export class Server {
4141
this.application.use('/static', express.static(ROOTPATH + '/../../../assets'));
4242

4343
// streaming songs
44-
this.application.get('/music/:song', (request: express.Request, response: express.Response) => {
44+
this.application.get('/music/:song', (request: Request, response: Response) => {
4545

4646
const fullPath = ROOTPATH + '/../../../assets/music/' + request.params.song
4747
const size = fs.statSync(fullPath).size
@@ -117,7 +117,7 @@ export class Server {
117117
this.application.get('/', (request: express.Request, response: express.Response) => {
118118

119119
// options list: http://expressjs.com/en/api.html#res.sendFile
120-
const mainPageSendfileOptions = {
120+
const mainPageSendfileOptions: unknown = {
121121
root: path.join(ROOTPATH, '..', 'html'),
122122
dotfiles: 'deny',
123123
headers: {

0 commit comments

Comments
 (0)