---
url: /reference/@cssdoc/cssdoc/functions/linkSyntax.md
---
# Function: linkSyntax()

```ts
function linkSyntax(syntax, renderLink): string;
```

Defined in: [packages/providers/src/mdn.ts:31](https://github.com/thedannywahl/cssdoc/blob/main/packages/providers/src/mdn.ts#L31)

Rewrite each `<type>` token in a `syntax` descriptor via `renderLink`, leaving the rest untouched.
`renderLink` receives the bare type name and its MDN URL and returns the replacement for `<type>`
(including the angle brackets). Non-`<type>` text (e.g. `|`, `+`, `#`) passes through verbatim.

## Parameters

### syntax

`string`

The `@property` syntax descriptor, e.g. `<color> | <length>`.

### renderLink

(`type`, `url`) => `string`

Builds the replacement for one `<type>` token.

## Returns

`string`

The descriptor with each `<type>` replaced.
