-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
feat: add types for packages #677
Conversation
Can you help me review this PR? @KeithGillette @jakebailey @navya9singh 🙂 |
Trying out this commit in our project only makes the typing issues worse, as we weren't getting the TS2307 error previously:
|
Thanks @jakebailey for the suggestion; @KeithGillette can you test it now? |
I am not quite sure how you're testing this commit out; you'd need to import the types into all of the other packages as well (as they all have their own types, it's not just one repo). Maybe that's what you're already doing. |
Ok let's ship it to see if it's working better for users 🚀 |
Same |
@KeithGillette can you try to fix it at your end and make a PR? 🙏 |
I'd like to help, @Kikobeats, but I won't have time to devote to looking at this for at least a week and furthermore, I have no experience in publishing NPM packages, so would just be casting about trying to fix this. I will note that in looking at what you've done, I think the problem may be that the types you've created for each rule are simply not getting installed because you haven't included them in the |
@KeithGillette no worries, that's actually a good catch. I fixed that in the last version published; Can you test it out? |
Better, but it looks like you missed adding types to type Options = {
/**
* Whether to add the date published and date modified to the result.
* @default true
*/
datePublished?: boolean,
/**
* Whether to add the date published and date modified to the result.
* @default true
*/
dateModified?: boolean
}
export declare function rules(options?: Options): import('metascraper').Rules; |
Thanks, fixed:
Can you test it? 🙂 |
Latest release works for me, though we are only using the following rules: import Metascraper from 'metascraper';
import MetascraperAuthor from 'metascraper-author';
import MetascraperImage from 'metascraper-image';
import MetascraperDate from 'metascraper-date';
import MetascraperDescription from 'metascraper-description';
import MetascraperTitle from 'metascraper-title';
import MetascraperURL from 'metascraper-url'; Thanks! |
Closes #676