@cedx/php-minifier
Version:
Minify PHP source code by removing comments and whitespace.
35 lines • 1.17 kB
TypeScript
import type { ITransformer } from "./ITransformer.js";
/**
* Removes comments and whitespace from a PHP script, by calling a Web service.
*/
export declare class FastTransformer implements ITransformer {
#private;
/**
* Creates a new fast transformer.
* @param executable The path to the PHP executable.
*/
constructor(executable?: string);
/**
* Releases any resources associated with this object.
* @returns Resolves when this object is finally disposed.
*/
[Symbol.asyncDispose](): Promise<void>;
/**
* Closes this transformer.
* @returns Resolves when the transformer has been closed.
*/
close(): Promise<void>;
/**
* Starts the underlying PHP process and begins accepting connections.
* @returns The TCP port used by the PHP process.
*/
listen(): Promise<number>;
/**
* Processes a PHP script.
* @param file The path to the PHP script.
* @returns The transformed script.
* @throws `Error` when an error occurred while processing the script.
*/
transform(file: string): Promise<string>;
}
//# sourceMappingURL=FastTransformer.d.ts.map