Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: remove some unused exports #327

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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