Skip to content

Commit aa3ec76

Browse files
committed
Change exports to export only public types to reduce noise
1 parent 9fdd0cb commit aa3ec76

File tree

15 files changed

+70
-14
lines changed

15 files changed

+70
-14
lines changed

library/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ All notable changes to the library will be documented in this file.
3333
- Change pipe tuple of `pipe` and `pipeAsync` to be readonly by default
3434
- Change `forward`, `forwardCheck`, `partialCheck` and `partialCheckAsync` to improve TypeScript performance (issue #987)
3535
- Change `DECIMAL_REGEX` to support floats that start with a dot (pull request #1086)
36+
- Change exports to export only public types to reduce noise
3637
- Refactor `bytes`, `maxBytes`, `minBytes` and `notBytes` action
3738
- Fix implementation of `nonOptional`, `nonOptionalAsync`, `nonNullable`, `nonNullableAsync`, `nonNullish` and `nonNullishAsync` schema in edge cases (issue #909)
3839
- Fix instantiation error for `any` in `PathKeys` type (issue #929)

library/src/index.ts

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,57 @@ export * from './methods/index.ts';
33
export * from './regex.ts';
44
export * from './schemas/index.ts';
55
export * from './storages/index.ts';
6-
export * from './types/index.ts';
6+
export type {
7+
ArrayPathItem,
8+
BaseIssue,
9+
BaseMetadata,
10+
BaseSchema,
11+
BaseSchemaAsync,
12+
BaseTransformation,
13+
BaseTransformationAsync,
14+
BaseValidation,
15+
BaseValidationAsync,
16+
Config,
17+
Default,
18+
DefaultAsync,
19+
DefaultValue,
20+
ErrorMessage,
21+
FailureDataset,
22+
GenericIssue,
23+
GenericMetadata,
24+
GenericSchema,
25+
GenericSchemaAsync,
26+
GenericTransformation,
27+
GenericTransformationAsync,
28+
GenericValidation,
29+
GenericValidationAsync,
30+
GenericPipeAction,
31+
GenericPipeActionAsync,
32+
GenericPipeItem,
33+
GenericPipeItemAsync,
34+
InferInput,
35+
InferOutput,
36+
InferIssue,
37+
IssueDotPath,
38+
IssuePathItem,
39+
MapPathItem,
40+
ObjectPathItem,
41+
ObjectEntries,
42+
ObjectKeys,
43+
ObjectEntriesAsync,
44+
OutputDataset,
45+
PartialDataset,
46+
PipeAction,
47+
PipeActionAsync,
48+
PipeItem,
49+
PipeItemAsync,
50+
SchemaWithoutPipe,
51+
SetPathItem,
52+
SuccessDataset,
53+
StandardProps,
54+
TupleItems,
55+
TupleItemsAsync,
56+
UnknownDataset,
57+
UnknownPathItem,
58+
} from './types/index.ts';
759
export * from './utils/index.ts';

library/src/methods/forward/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './forward.ts';
22
export * from './forwardAsync.ts';
3-
export {} from './types.ts';
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
export * from './intersect.ts';
22
export * from './intersectAsync.ts';
3-
export * from './types.ts';
3+
export type {
4+
IntersectIssue,
5+
IntersectOptions,
6+
IntersectOptionsAsync,
7+
} from './types.ts';

library/src/schemas/map/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './map.ts';
22
export * from './mapAsync.ts';
3-
export * from './types.ts';
3+
export type { MapIssue } from './types.ts';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './nonNullable.ts';
22
export * from './nonNullableAsync.ts';
3-
export * from './types.ts';
3+
export type { NonNullableIssue } from './types.ts';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './nonNullish.ts';
22
export * from './nonNullishAsync.ts';
3-
export * from './types.ts';
3+
export type { NonNullishIssue } from './types.ts';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './nonOptional.ts';
22
export * from './nonOptionalAsync.ts';
3-
export * from './types.ts';
3+
export type { NonOptionalIssue } from './types.ts';

library/src/schemas/nullable/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './nullable.ts';
22
export * from './nullableAsync.ts';
3-
export * from './types.ts';

library/src/schemas/nullish/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './nullish.ts';
22
export * from './nullishAsync.ts';
3-
export * from './types.ts';

library/src/schemas/optional/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './optional.ts';
22
export * from './optionalAsync.ts';
3-
export * from './types.ts';

library/src/schemas/record/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './record.ts';
22
export * from './recordAsync.ts';
3-
export * from './types.ts';
3+
export type { RecordIssue } from './types.ts';

library/src/schemas/set/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './set.ts';
22
export * from './setAsync.ts';
3-
export * from './types.ts';
3+
export type { SetIssue } from './types.ts';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './undefinedable.ts';
22
export * from './undefinedableAsync.ts';
3-
export * from './types.ts';

library/src/schemas/variant/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
export * from './types.ts';
1+
export type {
2+
VariantIssue,
3+
VariantOptions,
4+
VariantOptionsAsync,
5+
} from './types.ts';
26
export * from './variant.ts';
37
export * from './variantAsync.ts';

0 commit comments

Comments
 (0)