diff --git a/src/codecTools/createDefaultCodec.ts b/src/codecTools/createDefaultCodec.ts index 349b95d..389859c 100644 --- a/src/codecTools/createDefaultCodec.ts +++ b/src/codecTools/createDefaultCodec.ts @@ -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'; /** @@ -9,9 +11,9 @@ import * as t from 'io-ts'; export const createDefaultCodec = ( codec: C, ): t.TypeOf => { -// 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, ); diff --git a/src/codecTools/index.ts b/src/codecTools/index.ts index 88fd983..1ddf806 100644 --- a/src/codecTools/index.ts +++ b/src/codecTools/index.ts @@ -6,4 +6,4 @@ export * from './partialRecord'; export * from './isCodecError'; export * from './NonEmptyString'; export * from './toJsonSchema'; -export * from './createDefaultCodec'; \ No newline at end of file +export * from './createDefaultCodec';