KC's Workspace
    Preparing search index...
    interface TreeShakeOptions {
        annotations?: boolean;
        manualPureFunctions?: string[];
        propertyReadSideEffects?: boolean | "always";
        unknownGlobalSideEffects?: boolean;
    }
    Index

    Properties

    annotations?: boolean

    Whether to respect the pure annotations.

    Pure annotations are comments that mark an expression as pure. For example: @PURE or #NO_SIDE_EFFECTS.

    true
    
    manualPureFunctions?: string[]

    Whether to treat this function call as pure.

    This function is called for normal function calls, new calls, and tagged template calls.

    propertyReadSideEffects?: boolean | "always"

    Whether property read accesses have side effects.

    'always'
    
    unknownGlobalSideEffects?: boolean

    Whether accessing a global variable has side effects.

    Accessing a non-existing global variable will throw an error. Global variable may be a getter that has side effects.

    true