Verwenden von npm-Modulen in Typescript
Ich möchte das Modul npm in einem Typescript-Projekt verwenden, aber für dieses Modul gibt es keine Typisierungen oder tsd. Wenn ich versuche, benutzeimport Module from 'module'
Ich hatte einen Fehler:Cannot find module 'module'.
Gibt es eine Möglichkeit, das Problem zu beheben?
[EDIT] Mytsconfig.json
:
{
"compilerOptions": {
"target": "ES5",
"moduleResolution": "node",
"module": "commonjs",
"noEmitOnError": true,
"noImplicitAny": true,
"experimentalDecorators": true,
"sourceMap": true,
"sourceRoot": "src",
"outDir": "bld"
},
"exclude": [
"bld"
]
}