nanohtml icon indicating copy to clipboard operation
nanohtml copied to clipboard

Document Typescript import

Open seangenabe opened this issue 8 years ago • 1 comments

Some people would expect CommonJS-style import bel = require('bel') to work, but alas, it doesn't, although the compiled code still works. The way the definition file is set up the only way to import the module without errors is via import bel from 'bel' which seems counter-intuitive.

Can we document import bel from 'bel'? Or add an export = line to make import bel = require('bel') work?

seangenabe avatar Nov 19 '17 05:11 seangenabe

Or add an export = line to make import bel = require('bel') work?

This sound like the best approach to me.

goto-bus-stop avatar Mar 23 '18 09:03 goto-bus-stop