Skip to content

Conversation

@teabyii
Copy link

@teabyii teabyii commented Dec 10, 2017

No description provided.

@teabyii teabyii changed the title Add typescript declaration and tweak link to docs of PostHTMLTree Add typescript declaration and tweak link to the docs of PostHTMLTree Dec 10, 2017
@Scrum Scrum requested review from Scrum, mrmlnc and voischev December 11, 2017 12:39
@Scrum Scrum requested review from eugenefedotov and removed request for Scrum and mrmlnc January 25, 2018 07:51
@Scrum Scrum changed the title Add typescript declaration and tweak link to the docs of PostHTMLTree feat(ts): Add typescript declaration and tweak link to the docs of PostHTMLTree Jan 25, 2018
@Scrum Scrum added this to the 1.2.0 milestone Jan 25, 2018
@Scrum
Copy link
Member

Scrum commented Feb 28, 2018

@eugenefedotov approve ?

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add them to https://github.com/DefinitelyTyped/DefinitelyTyped instead please, it's the recommended way advocated by the typescript team

@michael-ciniawsky michael-ciniawsky changed the title feat(ts): Add typescript declaration and tweak link to the docs of PostHTMLTree chore(package): add typescript declarations (types) Mar 20, 2018
@michael-ciniawsky michael-ciniawsky modified the milestones: 1.2.0, 1.1.2 Mar 20, 2018
@Scrum Scrum modified the milestones: 1.1.2, 1.1.3 Mar 20, 2018
@Scrum Scrum modified the milestones: 1.1.3, 1.1.4 Apr 3, 2018
@Scrum Scrum removed this from the 1.1.4 milestone May 8, 2018
@Scrum Scrum added this to the 1.1.5 milestone May 8, 2018
@qm3ster
Copy link

qm3ster commented Jun 21, 2018

@michael-ciniawsky it's the recommended way when these are types added post-factum by the community. Does this mean that you don't wish to maintain these types in-repo in future versions?

@Scrum Scrum modified the milestones: 1.1.5, 1.1.6 May 6, 2019
@Scrum Scrum removed the request for review from eugenefedotov August 20, 2019 07:31
Copy link
Contributor

@0ctothorp 0ctothorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throwing my 2 cents into this PR 🙂
+1 for having types inside the repo instead of DefinitelyTyped. It will be easier to maintain.

EDIT: Just realized this PR is way too old 😅

singleTags?: string[],
closingSingleTag?: string
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type TreeNode =
| {
tag: string;
attrs?: Record<string, string>;
content?: Tree;
}
| string;
type Tree = TreeNode[];

closingSingleTag?: string
}

declare function postHTMLRender(tree: any, options?: Options): string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can be more precise with the tree type. I suggested a change above with the type Tree.

@Scrum Scrum requested a review from mrmlnc October 10, 2019 06:47
@Scrum
Copy link
Member

Scrum commented Oct 10, 2019

@0ctothorp Hi, any of your contributions is very important to us. Yes, PR is old and maybe you can offer the best option :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants