Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yhatt opened this issue Jan 29, 2020 · 1 comment · Fixed by #153
Closed

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

yhatt opened this issue Jan 29, 2020 · 1 comment · Fixed by #153

Comments

@yhatt
Copy link
Contributor

yhatt commented Jan 29, 2020

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

@jviide
Copy link
Collaborator

jviide commented Feb 5, 2020

Thank you! htm v3.0.3 has been released with your fix: https://github.com/developit/htm/releases/tag/3.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants