remarkablemark / html-react-parser

📝 HTML to React parser.

Home Page:https://b.remarkabl.org/html-react-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include , to index.d.ts

Jasonnnz opened this issue · comments

Problem

Currently the index.d.ts file does not have a , at the end of line 10.

Suggested Solution

Add , to the end of line 10

Keywords

TS, TypeScript

commented

Question: what does adding the , do for this library? Does not having the trailing comma cause issues for you?

Thanks for the quick reply!

I guess it'd just help avoid a TS Error - ',' expected.ts(1005). My builds failing due to this minor thing.

commented

Hmm interesting. I find it strange that TypeScript would fail on that line: https://github.com/remarkablemark/html-react-parser/blob/v3.0.12/index.d.ts#L10

I haven't experienced your issue before. What TypeScript version are you using? Possible to create a reproducible example?

I too am encounting this issue -
I tried:

  • Upgrading to typescript 5.0.2
  • Upgrading my @typescript-eslint to the latest
  • I'm using node 16 (and tried 18)
  • Using yarn

image

commented

Release:

I updated to the new package and it has solved the issue, thank you so much for the quick fix and the cool project 🙂

commented

@stilldesign Thanks for confirming!