Skip to content

Commit 4c466d8

Browse files
committed
refactor: 💡 rename FunctionStreamingType to FnRxType
1 parent c9602eb commit 4c466d8

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/type/TypeBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export class TypeBuilder {
261261
res: Res,
262262
options?: schema.Optional<schema.FunctionStreamingSchema>,
263263
) {
264-
const fn = new classes.FunctionStreamingType<Req, Res, Ctx>(req, res, options);
264+
const fn = new classes.FnRxType<Req, Res, Ctx>(req, res, options);
265265
fn.system = this.system;
266266
return fn;
267267
}

src/type/classes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {ObjType, ObjectFieldType, ObjectOptionalFieldType} from './classes/ObjTy
1111
import {MapType} from './classes/MapType';
1212
import {RefType} from './classes/RefType';
1313
import {OrType} from './classes/OrType';
14-
import {FnType, FunctionStreamingType} from './classes/FnType';
14+
import {FnType, FnRxType} from './classes/FnType';
1515

1616
export {
1717
AbsType,
@@ -30,5 +30,5 @@ export {
3030
RefType,
3131
OrType,
3232
FnType,
33-
FunctionStreamingType,
33+
FnRxType,
3434
};

src/type/classes/FnType.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const fnNotImplemented: schema.FunctionValue<any, any> = async () => {
99
throw new Error('NOT_IMPLEMENTED');
1010
};
1111

12-
const toStringTree = (tab: string = '', type: FnType<Type, Type, any> | FunctionStreamingType<Type, Type, any>) => {
12+
const toStringTree = (tab: string = '', type: FnType<Type, Type, any> | FnRxType<Type, Type, any>) => {
1313
return printTree(tab, [
1414
(tab) => 'req: ' + type.req.toString(tab + ' '),
1515
(tab) => 'res: ' + type.res.toString(tab + ' '),
@@ -87,7 +87,7 @@ type FunctionStreamingImpl<Req extends Type, Res extends Type, Ctx = unknown> =
8787
ctx: Ctx,
8888
) => Observable<ResolveType<Res>>;
8989

90-
export class FunctionStreamingType<Req extends Type, Res extends Type, Ctx = unknown> extends AbsType<
90+
export class FnRxType<Req extends Type, Res extends Type, Ctx = unknown> extends AbsType<
9191
schema.FunctionStreamingSchema<SchemaOf<Req>, SchemaOf<Res>, Ctx>
9292
> {
9393
public readonly isStreaming = true;

src/type/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type Type =
2121
| classes.RefType<any>
2222
| classes.OrType<any>
2323
| classes.FnType<any, any, any>
24-
| classes.FunctionStreamingType<any, any, any>;
24+
| classes.FnRxType<any, any, any>;
2525

2626
export type SchemaOf<T extends Type | Type[]> = T extends BaseType<infer U> ? U : never;
2727
export type SchemaOfMap<M extends Record<string, Type>> = {
@@ -43,11 +43,11 @@ export type TypeMap = {[name: string]: schema.Schema};
4343
export type FilterFunctions<T> = {
4444
[K in keyof T as T[K] extends classes.FnType<any, any, any>
4545
? K
46-
: T[K] extends classes.FunctionStreamingType<any, any, any>
46+
: T[K] extends classes.FnRxType<any, any, any>
4747
? K
4848
: never]: T[K] extends classes.FnType<any, any, any>
4949
? T[K]
50-
: T[K] extends classes.FunctionStreamingType<any, any, any>
50+
: T[K] extends classes.FnRxType<any, any, any>
5151
? T[K]
5252
: never;
5353
};

0 commit comments

Comments
 (0)