These are chat archives for DefinitelyTyped/DefinitelyTyped

12th
Jun 2016
Rafael Oscar Torres
@rators
Jun 12 2016 00:09
hi all
I have a type definition for pouchdb
when I use "import * as pouch from ("pouch")"
the transpiled js code does not contain "const pouch = require("pouch")"
though it does do that for the react module that I have
how do i get it to compile correctly?
Rafael Oscar Torres
@rators
Jun 12 2016 07:15
^
Daniel Rosenwasser
@DanielRosenwasser
Jun 12 2016 07:16
You need to actually use pouch as a value
otherwise we perform something called import elision because we assume you were only using something for its types
Try an empty statement like
pouch;
Wesley Wigham
@weswigham
Jun 12 2016 11:53
Alternatively, a bare import like import "pouch"; is never elided, either. If you'd prefer to signal your intent that way.
Cody Mullins
@codymullins
Jun 12 2016 20:27
anyone around?