Skip to content

Conversation

@kaphula
Copy link
Contributor

@kaphula kaphula commented Aug 22, 2022

If you create your own theme by extending DefaultThemeRenderContext and attempt to override this.hierarchy or this.typeParameters with empty content (disable them), their HTML headers get generated to the output document regardless. This PR removes the HTML headers if the default template is overridden.

export class FooterOverrideThemeContext extends DefaultThemeRenderContext {
  constructor(theme: DefaultTheme, options: Options) {
    super(theme, options);
    // disable:
    this.hierarchy = () => { return (<></>)}
    this.typeParameters = () => { return(<></>)}
  }
}

…om DefaultThemeRenderContext when overridden.
)}

{hasTypeParameters(props.model) && (
<section class="tsd-panel tsd-type-parameters">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason the <section> (and maybe even the condition) didn't move into the helpers? Seems like you'd still have elements you don't want if modifying these helpers.

Copy link
Collaborator

@Gerrit0 Gerrit0 left a comment

Choose a reason for hiding this comment

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

Thanks!

@Gerrit0 Gerrit0 merged commit e9c3181 into TypeStrong:master Aug 26, 2022
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 this pull request may close these issues.

2 participants