From 3005cc83e605fb89b079cf0e6fd0ec95cd27b30e Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Wed, 28 May 2025 15:05:38 -0700 Subject: Run prettier, add zed settings --- u/trace/itrace.ts | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'u/trace/itrace.ts') diff --git a/u/trace/itrace.ts b/u/trace/itrace.ts index e6189d3..ed707c5 100644 --- a/u/trace/itrace.ts +++ b/u/trace/itrace.ts @@ -9,12 +9,7 @@ export interface ITrace { } export type ITraceableTuple = [T, BaseTraceWith | TraceWith]; -export type ITraceableMapper< - T, - U, - TraceWith, - W = ITraceable, -> = ( +export type ITraceableMapper> = ( w: W, ) => U; @@ -22,9 +17,7 @@ export interface ITraceable { readonly trace: ITrace; get: Supplier; move: (u: U) => ITraceable; - map: ( - mapper: ITraceableMapper, - ) => ITraceable; + map: (mapper: ITraceableMapper) => ITraceable; bimap: ( mapper: ITraceableMapper< T, @@ -47,29 +40,19 @@ export class TraceableImpl implements ITraceable { public readonly trace: ITrace, ) {} - public map( - mapper: ITraceableMapper, - ) { + public map(mapper: ITraceableMapper) { const result = mapper(this); return new TraceableImpl(result, this.trace); } public flatMap( - mapper: ITraceableMapper< - T, - ITraceable, - TraceWith - >, + mapper: ITraceableMapper, TraceWith>, ): ITraceable { return mapper(this); } public flatMapAsync( - mapper: ITraceableMapper< - T, - Promise>, - TraceWith - >, + mapper: ITraceableMapper>, TraceWith>, ): ITraceable, TraceWith> { return new TraceableImpl( mapper(this).then((t) => t.get()), -- cgit v1.2.3-70-g09d2