Skip to content

Commit ae4fd05

Browse files
committed
style: 💄 run formatter
1 parent 4c466d8 commit ae4fd05

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/schema/schema.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ export interface FunctionSchema<Req extends TType = TType, Res extends TType = T
421421

422422
export type FunctionStreamingValue<Req, Res, Ctx = unknown> = (req: Observable<Req>, ctx?: Ctx) => Observable<Res>;
423423

424-
export interface FunctionStreamingSchema<Req extends TType = TType, Res extends TType = TType, Ctx = unknown> extends TType {
424+
export interface FunctionStreamingSchema<Req extends TType = TType, Res extends TType = TType, Ctx = unknown>
425+
extends TType {
425426
/** @todo Rename to `fn`. Make it a property on the schema instead. */
426427
kind: 'fn$';
427428
req: Req;
@@ -483,7 +484,7 @@ export type TypeOfValue<T> = T extends BooleanSchema
483484
: T extends BinarySchema
484485
? Uint8Array
485486
: T extends FunctionSchema<infer Req, infer Res, infer Ctx>
486-
? (req: TypeOf<Req>, ctx: Ctx) => (UndefToVoid<TypeOf<Res>> | Promise<UndefToVoid<TypeOf<Res>>>)
487+
? (req: TypeOf<Req>, ctx: Ctx) => UndefToVoid<TypeOf<Res>> | Promise<UndefToVoid<TypeOf<Res>>>
487488
: T extends FunctionStreamingSchema<infer Req, infer Res, infer Ctx>
488489
? (req$: Observable<TypeOf<Req>>, ctx: Ctx) => Observable<UndefToVoid<TypeOf<Res>>>
489490
: never;

src/type/__tests__/TypeBuilder.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ test('can specify function with context', () => {
125125
fn: t.fn.inp(t.str).out(t.undef).ctx<{ip: string}>(),
126126
});
127127
// console.log(MyObject + '');
128-
const MyObject2 = t.obj
129-
.prop('fn', t.Function(t.str, t.undef).ctx<{ip: string}>());
128+
const MyObject2 = t.obj.prop('fn', t.Function(t.str, t.undef).ctx<{ip: string}>());
130129
expect(MyObject.getSchema()).toEqual(MyObject2.getSchema());
131130
type ObjType = t.infer<typeof MyObject>;
132131
type ObjType2 = t.infer<typeof MyObject2>;

0 commit comments

Comments
 (0)