Skip to content

Commit dadca0e

Browse files
author
Alex Malkevich
committed
fix(api): make runtime types public
1 parent 16da417 commit dadca0e

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

projects/gen-io-ts/src/lib/runtime-types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export type AsRuntimeType<T> = MapDeep<T, RuntimeType>;
55
export abstract class RuntimeType {}
66

77
/**
8-
* @internal
8+
* Represents a type in runtime
99
*/
1010
export class TypeOf<T> extends RuntimeType {
1111
constructor(public type: T) {
@@ -14,7 +14,7 @@ export class TypeOf<T> extends RuntimeType {
1414
}
1515

1616
/**
17-
* @internal
17+
* Represents a set of allowed types in runtime
1818
*/
1919
export class AnyOf<T> extends TypeOf<T[]> {
2020
constructor(...types: T[]) {
@@ -23,7 +23,7 @@ export class AnyOf<T> extends TypeOf<T[]> {
2323
}
2424

2525
/**
26-
* @internal
26+
* Represents array of single type in runtime
2727
*/
2828
export class ArrayOf<T> extends AnyOf<T> {
2929
constructor(type: T) {

projects/gen-io-ts/src/lib/type-factories.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import { AnyOf, ArrayOf, TypeOf } from './runtime-types';
22

33
/**
4-
* Represents a type in runtime
4+
* Create instance of {@link TypeOf}
55
*/
66
export function typeOf<T>(type: T) {
77
return new TypeOf(type);
88
}
99

1010
/**
11-
* Represents a set of allowed types in runtime
11+
* Create instance of {@link AnyOf}
1212
*/
1313
export function anyOf<T>(...types: T[]) {
1414
return new AnyOf(types);
1515
}
1616

1717
/**
18-
* Represents array of single type in runtime
18+
* Create instance of {@link ArrayOf}
1919
*/
2020
export function arrayOf<T>(type: T) {
2121
return new ArrayOf(type);

projects/gen-io-ts/src/public_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44

55
export * from './lib/generator';
66
export * from './lib/decorators';
7+
export * from './lib/runtime-types';
78
export * from './lib/type-factories';

0 commit comments

Comments
 (0)