From 3885a7f9a057ee7c1460af9642b639ac9fbdc708 Mon Sep 17 00:00:00 2001 From: Tom Jenkinson Date: Mon, 18 Nov 2019 06:35:05 +0000 Subject: [PATCH] make `acornOptions` optional in `parse()` in docs (#3237) because [in the types it is `any`](https://github.com/rollup/rollup/blob/5289fdedf878b301b3337866d0892e207874c7ce/src/rollup/types.d.ts#L178) and in the source [it is optional](https://github.com/rollup/rollup/blob/5289fdedf878b301b3337866d0892e207874c7ce/src/Graph.ts#L67) --- docs/05-plugin-development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/05-plugin-development.md b/docs/05-plugin-development.md index 36035a3a9c1..adab7fceb58 100644 --- a/docs/05-plugin-development.md +++ b/docs/05-plugin-development.md @@ -446,7 +446,7 @@ for (const moduleId of this.moduleIds) { /* ... */ } or converted into an Array via `Array.from(this.moduleIds)`. -#### `this.parse(code: string, acornOptions: AcornOptions) => ESTree.Program` +#### `this.parse(code: string, acornOptions?: AcornOptions) => ESTree.Program` Use Rollup's internal acorn instance to parse code to an AST.