Skip to content

Commit

Permalink
fix(README): code samples (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
codershiba authored Jan 26, 2024
1 parent 582f3f5 commit 4103007
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ npm i @matteo.collina/tspl
## Example

```js
import test from 'node:test'
import { tspl } from '@matteo.collina/tspl'
import test from 'node:test';
import { tspl } from '@matteo.collina/tspl';

test('tspl', (t) => {
const { strictEqual } = tspl(t, { plan: 1 })
strictEqual(1, 1)
})
const { strictEqual } = tspl(t, { plan: 1 });
strictEqual(1, 1);
});
```

### Typescript

```typescript
import test from 'node:test';
import { tspl, Plan } from '@matteo.collina/tspl';
import { tspl, type Plan } from '@matteo.collina/tspl';

test('tspl', (t) => {
const p: Plan = tspl(t, { plan: 1 });
strictEqual(1, 1);
p.strictEqual(1, 1);
});
```

Expand Down

0 comments on commit 4103007

Please sign in to comment.