Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Document JSDoc examples with decorators #1084

Open

Description

@edjm1971

Suggestion

I would like to see your page https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc updated to reflect what the proper format is for comments when annotations are in use.

Examples

The only example I can find out on the web with comments and annotations is on the Comdoc site https://compodoc.app/guides/jsdoc-tags.html which would be the 1st entry below.

/**
 * Description.
 */
@Component({...})
class MyClass{...}

Or would this be written as

@Component({...})
/**
 * Description.
 */
class MyClass{...}

Activity

  1. changed the title [-]TypeScript commenting with Annotations[/-] [+]Document JSDoc examples with decorators[/+] on Jul 31, 2019
  2. orta commented on Jul 31, 2019

    @orta
    Contributor

    It looks like it's the first one only

    /** You should see this when you hover on greeter */
    @sealed
    class Greeter {}
    
    @sealed
    /** You won't see this when you hover on greeter */
    class GreeterTwo {}
    
    
    function sealed(constructor: Function) {
      Object.seal(constructor);
      Object.seal(constructor.prototype);
    }

    Playground link.

    Would you like to send a PR to our Handbook adding that example?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions