Skip to content

Commit

Permalink
refactor: remove some unused exports (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro authored Oct 7, 2024
1 parent dccce59 commit 9ceae39
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function serializeTypeReferenceNode(
* expression or identifier is a reference to self (class name).
* In this case, we just emit `Object` in order to avoid ReferenceError.
*/
export function isClassType(className: string, node: t.Expression): boolean {
function isClassType(className: string, node: t.Expression): boolean {
switch (node.type) {
case "Identifier": {
return node.name === className;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/transform-module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { transformDynamicImport } from "./dynamic-import";
import { defineCommonJSHook, makeInvokers } from "./hooks";
import { lazyImportsHook } from "./lazy";

export interface Options extends PluginOptions {
interface Options extends PluginOptions {
allowCommonJSExports?: boolean;
allowTopLevelThis?: boolean;
importInterop?: RewriteModuleStatementsAndPrepareHeaderOptions["importInterop"];
Expand Down
2 changes: 1 addition & 1 deletion src/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function jitiResolve(
throw lastError;
}

export function tryNativeRequireResolve(
function tryNativeRequireResolve(
ctx: Context,
id: string,
parentURL: URL | string,
Expand Down
4 changes: 0 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ export function md5(content: string, len = 8) {
return createHash("md5").update(content).digest("hex").slice(0, len);
}

export function isObject(val: any) {
return val !== null && typeof val === "object";
}

export function readNearestPackageJSON(path: string): PackageJson | undefined {
while (path && path !== "." && path !== "/") {
path = join(path, "..");
Expand Down

0 comments on commit 9ceae39

Please # to comment.