export class RegExpReviver {
    nativeTypeName() {
        return "RegExp";
    }
    isInstance(value) {
        return value instanceof RegExp;
    }
    serialize(value) {
        return { __nativeType: this.nativeTypeName(), source: value.source, flags: value.flags };
    }
    validate(value) {
        return typeof value.source === "string" && typeof value.flags === "string";
    }
    revive(value) {
        return new RegExp(value.source, value.flags);
    }
}
