HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode/node_modules/sucrase/dist/types/transformers/ESMImportTransformer.d.ts
import type { HelperManager } from "../HelperManager";
import type { Options } from "../index";
import type NameManager from "../NameManager";
import type TokenProcessor from "../TokenProcessor";
import type ReactHotLoaderTransformer from "./ReactHotLoaderTransformer";
import Transformer from "./Transformer";
/**
 * Class for editing import statements when we are keeping the code as ESM. We still need to remove
 * type-only imports in TypeScript and Flow.
 */
export default class ESMImportTransformer extends Transformer {
    readonly tokens: TokenProcessor;
    readonly nameManager: NameManager;
    readonly helperManager: HelperManager;
    readonly reactHotLoaderTransformer: ReactHotLoaderTransformer | null;
    readonly isTypeScriptTransformEnabled: boolean;
    readonly isFlowTransformEnabled: boolean;
    readonly keepUnusedImports: boolean;
    private nonTypeIdentifiers;
    private declarationInfo;
    private injectCreateRequireForImportRequire;
    constructor(tokens: TokenProcessor, nameManager: NameManager, helperManager: HelperManager, reactHotLoaderTransformer: ReactHotLoaderTransformer | null, isTypeScriptTransformEnabled: boolean, isFlowTransformEnabled: boolean, keepUnusedImports: boolean, options: Options);
    process(): boolean;
    private processImportEquals;
    private processImport;
    /**
     * Remove type bindings from this import, leaving the rest of the import intact.
     *
     * Return true if this import was ONLY types, and thus is eligible for removal. This will bail out
     * of the replacement operation, so we can return early here.
     */
    private removeImportTypeBindings;
    private shouldAutomaticallyElideImportedName;
    private processExportDefault;
    /**
     * Handle a statement with one of these forms:
     * export {a, type b};
     * export {c, type d} from 'foo';
     *
     * In both cases, any explicit type exports should be removed. In the first
     * case, we also need to handle implicit export elision for names declared as
     * types. In the second case, we must NOT do implicit named export elision,
     * but we must remove the runtime import if all exports are type exports.
     */
    private processNamedExports;
    /**
     * ESM elides all imports with the rule that we only elide if we see that it's
     * a type and never see it as a value. This is in contrast to CJS, which
     * elides imports that are completely unknown.
     */
    private shouldElideExportedName;
}