Theia API Documentation v1.70.0
    Preparing search index...

    Represents a sanitization rule with a pattern and replacement string.

    interface SanitizationRule {
        pattern: RegExp;
        precheck?: (message: string) => boolean;
        replacement: string;
    }
    Index

    Properties

    pattern: RegExp

    The regex pattern to match sensitive information. Can use capture groups that can be referenced in the replacement string.

    precheck?: (message: string) => boolean

    Optional quick check function that returns true if the message might contain sensitive data matching this rule. Used as a fast early-exit optimization to avoid running expensive regex operations on messages that definitely don't contain sensitive data.

    If not provided, the regex pattern will always be executed.

    replacement: string

    The replacement string. Can include capture group references like $1, $2, etc.