Skip to content

Commit 2bf2342

Browse files
committed
remove unused root
1 parent dab8785 commit 2bf2342

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/javascript.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface ParseOptions {
5555
}
5656

5757
export function transpileJavaScript(input: string, options: ParseOptions): Transpile {
58-
const {id, root, sourcePath, verbose = true} = options;
58+
const {id, sourcePath, verbose = true} = options;
5959
try {
6060
const node = parseJavaScript(input, options);
6161
const databases = node.features
@@ -72,8 +72,8 @@ export function transpileJavaScript(input: string, options: ParseOptions): Trans
7272
output.insertRight(input.length, "\n))");
7373
inputs.push("display");
7474
}
75-
rewriteImports(output, node, root, sourcePath);
76-
rewriteFetches(output, node, root, sourcePath);
75+
rewriteImports(output, node, sourcePath);
76+
rewriteFetches(output, node, sourcePath);
7777
return {
7878
id,
7979
...(inputs.length ? {inputs} : null),

src/javascript/fetches.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {simple} from "acorn-walk";
22
import {isLocalFetch} from "./features.js";
33

4-
export function rewriteFetches(output, rootNode, root, sourcePath) {
4+
export function rewriteFetches(output, rootNode, sourcePath) {
55
simple(rootNode.body, {
66
CallExpression(node) {
77
if (isLocalFetch(node, rootNode.references, sourcePath)) {

src/javascript/imports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function findImports(body: Node, root: string, sourcePath: string) {
7676
}
7777

7878
// TODO parallelize multiple static imports
79-
export function rewriteImports(output: any, rootNode: JavaScriptNode, root: string, sourcePath: string) {
79+
export function rewriteImports(output: any, rootNode: JavaScriptNode, sourcePath: string) {
8080
simple(rootNode.body, {
8181
ImportExpression(node) {
8282
if (isStringLiteral(node.source)) {

0 commit comments

Comments
 (0)