Skip to content

typescript typings are wrong #131

@xaviergonz

Description

@xaviergonz

Typescript, unlike babel, differentiates between default and "whole" exports, this is.
import * as X from 'X'; = require('X')
import X from 'X'; = require('X').default;

whereas in babel
import X from 'X'; = require('X').default || require('X');

the thing is that the TS typings say that the function is actually on require('X').default, but it is actually in require('X') due to this last line in the generated index.js:

module.exports = exports['default'];

something to do most probably with how rollup does it.
could the typings be fixed? or if not at least then make it actually export the function on default :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions