-
Notifications
You must be signed in to change notification settings - Fork 478
Open
Description
Using mitt in Typescript with "moduleResolution": "NodeNext" gives "error TS2349: This expression is not callable." error.
"mitt": "^3.0.1"
"typescript": "^5.3.3"
tsconfig.json
{
"compilerOptions": {
"outDir": "dist",
"target": "ES2018",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
/* Bundler mode */
"moduleResolution": "NodeNext",
"module": "NodeNext",
"resolveJsonModule": true,
"esModuleInterop": true,
"sourceMap": true,
"allowJs": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"]
}import mitt from 'mitt';
...
private readonly emitter = mitt<Events>();tsc --pretty --noEmit output:
error TS2349: This expression is not callable.
Type 'typeof import("C:/code/project/node_modules/mitt/index")' has no call signatures.
28 private readonly emitter = mitt<Events>();FreePhoenix888, tonivj5 and takashirolo1tuma
Metadata
Metadata
Assignees
Labels
No labels