Skip to content

Commit

Permalink
Use the import declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
iliocatallo committed Feb 6, 2025
1 parent f55df76 commit ea6cd77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ npm install typista
In the following, we show how to define a `Maybe` data type useful to represent optional values. We define this new type by means of the `data` function.

```javascript
const {data, $} = require('typista');
import { data, $ } from 'typista';

const Maybe = data('Maybe');
```
Expand All @@ -66,7 +66,7 @@ A value of type `Maybe` may either be empty or contain a value `x`. We represent


```javascript
const {data, $} = require('typista');
import { data, $ } from 'typista';

const Maybe = data('Maybe');
Maybe.$ = $.Nothing
Expand Down

0 comments on commit ea6cd77

Please sign in to comment.