Can not use declaritive import without esModuleInterop #410
Labels
priority: medium
This PR should be reviewed after all high priority PRs.
status: in progress
This issue is being worked on.
type: chore
This PR contains changes that are not covered by other types (stylistic, dependency updates, etc).
Currently, the project-wide
esModuleInterop
flag must be enabled in order to import thepubnub
module using declarative syntax (import * as PubNub from 'pubnub'
). Alternatively, dynamic import syntax may be used (import PubNub = require('pubnub')
), but that carries its own list of disadvantages.This is fixed by simply declaring a
PubNub
namespace alongside the exported class like so:This matches the DefinitelyTyped package: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/pubnub/index.d.ts#L330
The text was updated successfully, but these errors were encountered: