Skip to content

Commit

Permalink
remove unnecessary ts-ignores (transloadit#3900)
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Jul 25, 2022
1 parent 6d8bd09 commit d6d478d
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/companion.js
@@ -1,5 +1,4 @@
const express = require('express')
// @ts-ignore
const Grant = require('grant').express()
const merge = require('lodash.merge')
const cookieParser = require('cookie-parser')
Expand Down
1 change: 0 additions & 1 deletion src/server/helpers/jwt.js
Expand Up @@ -42,7 +42,6 @@ module.exports.generateEncryptedToken = (payload, secret) => {
*/
module.exports.verifyEncryptedToken = (token, secret) => {
try {
// @ts-ignore
return module.exports.verifyToken(decrypt(token, secret), secret)
} catch (err) {
return { err }
Expand Down
1 change: 0 additions & 1 deletion src/server/helpers/oauth-state.js
@@ -1,5 +1,4 @@
const crypto = require('node:crypto')
// @ts-ignore
const atob = require('atob')
const { encrypt, decrypt } = require('./utils')

Expand Down
2 changes: 0 additions & 2 deletions src/server/middlewares.js
@@ -1,5 +1,4 @@
const cors = require('cors')
// @ts-ignore
const promBundle = require('express-prom-bundle')

// @ts-ignore
Expand Down Expand Up @@ -140,7 +139,6 @@ exports.metrics = ({ path = undefined } = {}) => {

// Add version as a prometheus gauge
const versionGauge = new promClient.Gauge({ name: 'companion_version', help: 'npm version as an integer' })
// @ts-ignore
const numberVersion = Number(version.replace(/\D/g, ''))
versionGauge.set(numberVersion)
return metricsMiddleware
Expand Down
1 change: 0 additions & 1 deletion src/server/provider/credentials.js
@@ -1,5 +1,4 @@
const request = require('request')
// @ts-ignore
const atob = require('atob')
const { htmlEscape } = require('escape-goat')
const logger = require('../logger')
Expand Down
1 change: 0 additions & 1 deletion src/server/provider/index.js
@@ -1,7 +1,6 @@
/**
* @module provider
*/
// @ts-ignore
const purestConfig = require('@purest/providers')
const dropbox = require('./dropbox')
const box = require('./box')
Expand Down
1 change: 0 additions & 1 deletion src/server/socket.js
Expand Up @@ -18,7 +18,6 @@ module.exports = (server) => {
// or when connection fails while an upload is on-going and,
// client attempts to reconnect.
wss.on('connection', (ws, req) => {
// @ts-ignore
const fullPath = req.url
// the token identifies which ongoing upload's progress, the socket
// connection wishes to listen to.
Expand Down
1 change: 0 additions & 1 deletion src/standalone/index.js
Expand Up @@ -176,7 +176,6 @@ module.exports = function server (inputCompanionOptions = {}) {
return res.status(404).json({ message: 'Not Found' })
})

// @ts-ignore
app.use((err, req, res, next) => { // eslint-disable-line no-unused-vars
if (app.get('env') === 'production') {
// if the error is a URIError from the requested URL we only log the error message
Expand Down

0 comments on commit d6d478d

Please sign in to comment.