import * as tsplus_module_1 from "@tsplus/stdlib/collections/Chunk/builder";
import * as tsplus_module_2 from "@effect/core/io/TraceElement/definition";
export class StackTraceBuilder {
  constructor() {
    this.last = undefined;
    this.builder = tsplus_module_1.builder();
  }

  append(trace) {
    if (trace != null && trace !== this.last && trace !== tsplus_module_2.empty) {
      this.builder.append(trace);
      this.last = trace;
    }
  }

  build() {
    return this.builder.build();
  }

}
export function unsafeMake() {
  return new StackTraceBuilder();
}
//# sourceMappingURL=StackTraceBuilder.mjs.map