, but Deno complains that the default export has no call signatures.
// main.tsimport express from "npm:@feathersjs/express";const app = express();
// main.tsimport express from "npm:@feathersjs/express";const app = express();
$ deno check main.tserror: TS2349 [ERROR]: This expression is not callable. Type 'typeof import("file:///.../node_modules/.deno/@feathersjs+express@5.0.26/node_modules/@feathersjs/express/lib/index.d.ts")' has no call signatures.const app = express(); ~~~~~~~
$ deno check main.tserror: TS2349 [ERROR]: This expression is not callable. Type 'typeof import("file:///.../node_modules/.deno/@feathersjs+express@5.0.26/node_modules/@feathersjs/express/lib/index.d.ts")' has no call signatures.const app = express(); ~~~~~~~
However, running
main.ts
main.ts
works without issue.
The referenced
index.d.ts
index.d.ts
contains this:
export default function feathersExpress<S = any, C = any>(feathersApp?: FeathersApplication<S, C>, expressApp?: Express): Application<S, C>;
export default function feathersExpress<S = any, C = any>(feathersApp?: FeathersApplication<S, C>, expressApp?: Express): Application<S, C>;
So Deno should see its default export.
The strange thing is that the following works when checking the file and running it.
import express from "npm:@feathersjs/express";const app = express.default();// ^^^^^^^
import express from "npm:@feathersjs/express";const app = express.default();// ^^^^^^^