I refer to this type definition file: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/nodemailer/index.d.ts, which has a total of nine exports: 3 each of type
, interface
, and function
.
There is no default export defined in this file. However, I am able to do the following:
import NM from "nodemailer";
and then NM
can access the three functions exported: createTestAccount
, createTransport
, and getTestMessageUrl
. For the other exports in that file, I have to import explicitly, for example:
import { SendMailOptions, Transporter } from "nodemailer";
Where is the default export defined for this type definition?
In the same project, I created my own test module with an export but not declaring it as a default. The compiler balked if I imported using the default syntax.
My compiler option for module
is ES2015, if it is of any relevance.