I am converting my NodeJS + ExpressJS project to typescript and I got a Typescript definition for ExpressJS from https://github.com/borisyankov/DefinitelyTyped.
Before Typescript I imported Express with a "require" statement
var express = require("express")
No I need to import it in way that I can use Typescript Syntax and capabilities while ensuring that the Typescript compiler compiles it to the statement shown above. Here's the code I wrote:
/// <reference path="express.d.ts" />
import express = require("express");
var app = express.express();
app.use(express.logger());
This however throws the error: Unresolved function or method express() at:
var app = express.express();
expressnamespace? Maybe this is causing a naming clash?