Angular Modernizer
    Preparing search index...

    Context provided to transformation rules.

    interface TransformContext {
        api?: unknown;
        config?: Record<string, unknown>;
        filePath?: string;
        options?: { autoSave?: boolean; dryRun?: boolean; format?: boolean };
        project: Project;
        sourceFile: SourceFile;
        type?: string;
    }
    Index

    Properties

    api?: unknown

    Public API instance passed to the coordinator.

    config?: Record<string, unknown>

    Plugin configuration from TransformationConfig.pluginConfig.

    filePath?: string

    Absolute path of the source file.

    options?: { autoSave?: boolean; dryRun?: boolean; format?: boolean }

    Run options derived from TransformationConfig.

    Type Declaration

    • OptionalautoSave?: boolean

      Save changes after the transform. Default true.

    • OptionaldryRun?: boolean

      Do not write changes. Default false.

    • Optionalformat?: boolean

      Format code after the transform. Default true.

    project: Project

    ts-morph project that owns TransformContext.sourceFile.

    sourceFile: SourceFile

    File being transformed.

    type?: string

    Context kind; the coordinator sets 'transform'.