I have a problem with TypeScript imports :
Here is my mydef.d.ts:
import * as mongodb from "mongodb";
interface UserDto {
_id: mongodb.ObjectID;
username: string;
}
And here is my main.ts:
import * as mongodb from "mongodb";
let user: UserDto = {
_id: new mongodb.ObjectID("anyID"),
username: "Xstoudi"
}
But in main.ts: Cannot find name UserDto.
Thanks !