Skip to content

Commit

Permalink
fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
abrantesarthur committed Jan 13, 2025
1 parent 238e812 commit 237e7b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/codecTools/createDefaultCodec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable @typescript-eslint/no-explicit-any */
import * as t from 'io-ts';

/**
Expand All @@ -9,9 +11,9 @@ import * as t from 'io-ts';
export const createDefaultCodec = <C extends t.Mixed>(
codec: C,
): t.TypeOf<C> => {
// If the codec is an union
// If the codec is an union
if (codec instanceof t.UnionType) {
// The default for a union containing arrays is an empty array
// The default for a union containing arrays is a default array
const arrayType = codec.types.find(
(type: any) => type instanceof t.ArrayType,
);
Expand Down
2 changes: 1 addition & 1 deletion src/codecTools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export * from './partialRecord';
export * from './isCodecError';
export * from './NonEmptyString';
export * from './toJsonSchema';
export * from './createDefaultCodec';
export * from './createDefaultCodec';

0 comments on commit 237e7b8

Please sign in to comment.