Skip to content

can the generated new Foo() code from class / functions be disabled/overrided by a @example? #580

Open
@gre

Description

@gre
/**
  */
class Foo {..}

will generate doc with a code block:

new Foo()

Similarly, functions will generate an automatic block.

I have 2 usecases where I want to disable this behavior... I also don't understand the idea behind this. Why is it not disabled when you provide a @example ?

2 usecases are:

  • React class component. You never want to say new MyComponent() for a react component, because it's not how you will ever instanciate it.
  • string template. They are functions, but they aren't used as functions! foo`...`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions