Skip to content

Commit

Permalink
Add useDefineForClassFields config
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardocavazza committed Dec 16, 2023
1 parent a163273 commit 075e4b3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@ pnpm add @chialab/dna@alpha

:::

## Configure Typescript

This enables support for DNA decorators as well as correct transpilation of class property fields.

::: code-group

```json [tsconfig.json]
{
"compilerOptions": {
"useDefineForClassFields": false,
"experimentalDecorators": true
}
}
```

:::

## Configure JSX

### Typescript
Expand All @@ -31,7 +48,6 @@ pnpm add @chialab/dna@alpha
```json [tsconfig.json]
{
"compilerOptions": {
"experimentalDecorators": true,
"jsx": "react-jsx",
"jsxImportSource": "@chialab/dna"
}
Expand Down

0 comments on commit 075e4b3

Please sign in to comment.