Skip to content

TypeScript throws compile error TS2714 in dist/htm.d.ts #152

@yhatt

Description

@yhatt

Hi, thanks to all of great work for HTM! I'm loving to integrate htm with our library.

I tried to bump htm to v3.0.2 but TypeScript 3.7.5 throws a compile error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. in dist/htm.d.ts.

yarn check:ts
yarn run v1.21.1
$ tsc --noEmit
node_modules/htm/dist/htm.d.ts:1:16 - error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context.

  1 export default {
                   ~
  2   bind<HResult>(
    ~~~~~~~~~~~~~~~~
... 
  4   ): (strings: TemplateStringsArray, ...values: any[]) => HResult | HResult[];
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5 };
    ~

node_modules/htm/dist/htm.d.ts:4:78 - error TS1005: '{' expected.

4   ): (strings: TemplateStringsArray, ...values: any[]) => HResult | HResult[];
                                                                               ~


Found 2 errors.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

ref: yhatt/jsx-slack#107, https://circleci.com/gh/speee/jsx-slack/1294

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions