Closed xxRockOnxx closed 1 year ago
Hello, they're definitely outdated; Can you send a PR? 🙏
Also, I think it's missing rules set can contain a test
function:
https://github.com/microlinkhq/metascraper/blob/v5.34.7/packages/metascraper-youtube/index.js#L47
@Kikobeats what is the release cycle or when is the next version coming out?
as soon as PR is merged, a new version is released
it's been merged and it's still on 5.34.7
oh sorry; metascraper@5.34.8
released 🙂
Prerequisites
package.json
.Subject of the issue
The Typescript types are not correct.
Package like metascraper-image exports a function that returns an object.
i.e
However in the declaration file,
metascraper-*
packages exports a function that returns a function that returns an object which is not true.i.e
For more clarity, the expanded equivalent is:
I believe it should return
RuleSet
directly instead.Next, the "constructor" function accepts wrong types.
It should accept
RuleSet
and notRules
.If it were to accept
Rules
, the "constructor" should look like:instead of
htmlDom
fromCheckOptions
interface should also beinstead of
Otherwise it causes the error "This expression is not callable."
I can submit a PR but I'm not sure yet if this is intentional or if I'm missing something.