Skip to content

Add necessary use case of @link #2987

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions packages/documentation/copy/en/javascript/JSDoc Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,37 @@ function box<U>(u: U): Box<U> {
return { t: u };
}
```
sometimes, you don't want to link a type, instead, link a prop defined in a type:

```ts twoslash
type Pet = {
name: string
hello: () => string
}

/**
* Note: you should implement {@link Pet.hello} method of Pet.
*/
function hello(p: Pet) {
p.hello()
}
```

furthermore, you can define another name of link:

```ts twoslash
type Pet = {
name: string
hello: () => string
}

/**
* Note: you should implement {@link Pet.hello | hello} method of Pet.
*/
function hello(p: Pet) {
p.hello()
}
```

## Other

Expand Down