Skip to content

Commit d303e54

Browse files
committed
docs: update macro usage
1 parent 3cd0a4c commit d303e54

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@ Here is an example:
7474

7575
```ts
7676
import fs from 'node:fs'
77-
import { quansyncMacro } from 'quansync'
77+
import { quansync } from 'quansync/macro'
7878

7979
// Create a quansync function by providing `sync` and `async` implementations
80-
const readFile = quansyncMacro({
80+
const readFile = quansync({
8181
sync: (path: string) => fs.readFileSync(path),
8282
async: (path: string) => fs.promises.readFile(path),
8383
})
8484

8585
// Create a quansync function by providing an **async** function
86-
const myFunction = quansyncMacro(async (filename) => {
86+
const myFunction = quansync(async (filename) => {
8787
// Use `await` to call another quansync function
8888
const code = await readFile(filename, 'utf8')
8989

0 commit comments

Comments
 (0)