diff --git a/npm/oxc-parser/README.md b/npm/oxc-parser/README.md index d186f98d1ca82..02d7a9a172566 100644 --- a/npm/oxc-parser/README.md +++ b/npm/oxc-parser/README.md @@ -7,12 +7,11 @@ import assert from 'assert'; import oxc from 'oxc-parser'; const sourceText = "let foo: Foo = 'foo';"; -// Filename extension is used to determine which -// dialect to parse source as -const options = { sourceFilename: 'text.tsx' }; +// Filename extension is used to determine which dialect to parse source as. +const filename = "test.tsx"; -test(oxc.parseSync(sourceText, options)); -test(await oxc.parseAsync(sourceText, options)); +test(oxc.parseSync(filename, sourceText, options)); +test(await oxc.parseAsync(filename, sourceText, options)); function test(ret) { assert(ret.program.body.length == 1);