File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -74,16 +74,16 @@ Here is an example:
7474
7575``` ts
7676import 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
You can’t perform that action at this time.
0 commit comments