Skip to content

Commit

Permalink
app: convert js to ts
Browse files Browse the repository at this point in the history
There is two way to importing modules that do not have
default exports. Using named imports or enable
esModuleInterop option in your tsconfig.json file.
We enable esModuleInterop because SocksProxyAgent
doesn't have default exports.
  • Loading branch information
Mersho committed Sep 5, 2023
1 parent 4cb560e commit 92ff67e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as dotenv from "dotenv";
dotenv.config()
const SocksProxyAgent = require('socks-proxy-agent')
import { SocksProxyAgent } from "socks-proxy-agent";
import { start } from "./bot/start";
import mongoConnect from './db_connect'
const { resubscribeInvoices } = require('./ln');
const logger = require('./logger');
import logger from "./logger";
const { delay } = require('./util');

(async () => {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"strict": true,
"esModuleInterop": true,
}
}

0 comments on commit 92ff67e

Please sign in to comment.