Error: can not find typescript module


#1

I develop a electron app using typescript language. Basically I want
to use classes as a external files. But when i tried i get an error like
this at runtime (not at compiling):

module.js:440 Uncaught Error: Cannot find module './deneme'

here is my example:

./deneme.ts:

export var ad = "deneme";

./example.ts:

import a = require("./deneme");
console.log(a.ad);

error:

Uncaught Error: Cannot find module ‘./deneme’

what else i tried:

 import { ad } from "./deneme";
 console.log(ad);

my tsconfig:

{
    "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "noImplicitAny": true,
        "removeComments": true,
        "preserveConstEnums": true,
        "outDir": "app/js",
        "sourceMap": false
    },
    "include": [
        "typings/index.d.ts",
        "app/src/*"
    ],
    "exclude": [
        "node_modules",
        "tsconfig"
    ]
}

I think it has nothing to do with compiler. Because vs code can see
imported variables, classes etc. But whenever i try to use them i get an
error like above. (can not find module)