Closed dboreham closed 3 years ago
try doing
import * as debug from 'debug'
if this fails to grab the default export try
import * as debug, default as debugDefault from 'debug'
Suggested import scheme works, fix committed.
Continued in https://github.com/dxos/sdk/pull/490
@Marik-D can you take a look and let me know how I can do this properly in TS? I'd like to just pass a reference to the return value from
require('debug')
in thedebug
property on__DXOS__
. In JS this just works if youimport debug from 'debug'
then add thatdebug
variable to the object. TS allows that code, but compiles it todebug.default
, which isn't what I want. For now I'm, explicitly grabbing theenable
anddisable
exported functions that I'm calling, but I'd like to simply expose the entire debug object with all its properties and methods. Thanks.