Interface Transformer

Removes comments and whitespace from a PHP script.

interface Transformer {
    close: () => Promise<void>;
    transform: (file: string) => Promise<string>;
}

Implemented by

Properties

Properties

close: () => Promise<void>

Closes this transformer and releases any resources associated with it.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

      Resolves when the transformer is finally disposed.

transform: (file: string) => Promise<string>

Processes a PHP script.

Type declaration

    • (file: string): Promise<string>
    • Parameters

      • file: string

        The path to the PHP script.

      Returns Promise<string>

      The transformed script.