Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
abrantesarthur committed Jan 19, 2025
1 parent c8d59f0 commit 9b8c3d0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/codecTools/createDefaultCodec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ import * as t from 'io-ts';
export const createDefaultCodec = <C extends t.Mixed>(
codec: C,
): t.TypeOf<C> => {
console.log({ codecName: codec.name });
// If the codec is an union
if (codec instanceof t.UnionType) {
console.log('union type');
// The default for a union containing arrays is a default array
const arrayType = codec.types.find(
(type: any) => type instanceof t.ArrayType,
Expand All @@ -62,7 +60,6 @@ export const createDefaultCodec = <C extends t.Mixed>(
type instanceof t.ArrayType,
);
if (objectType) {
console.log('objectType');
return createDefaultCodec(objectType);
}

Expand All @@ -71,7 +68,6 @@ export const createDefaultCodec = <C extends t.Mixed>(
(type: any) => type instanceof t.NullType || type.name === 'null',
);
if (hasNull) {
console.log('hasNull');
return null as t.TypeOf<C>;
}

Expand Down

0 comments on commit 9b8c3d0

Please sign in to comment.