From 5cf9cf83b372818b833f0fa7701b1773192a0427 Mon Sep 17 00:00:00 2001 From: Valentin Agachi Date: Fri, 15 Nov 2024 10:22:53 +0100 Subject: [PATCH] fixup! chore: Upgrade typescript-eslint to v8.14.0 --- src/mongodbTypes.ts | 1 + src/utils.ts | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mongodbTypes.ts b/src/mongodbTypes.ts index 6429feba4..07260a849 100644 --- a/src/mongodbTypes.ts +++ b/src/mongodbTypes.ts @@ -192,6 +192,7 @@ export type PaprArrayElementsProperties = { * 'objectList.$[element].foo': any; * } */ +// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style export type PaprArrayNestedProperties = { [Property in `${KeysOfAType, Record[]>}.$${ | '' diff --git a/src/utils.ts b/src/utils.ts index ba7782f35..43c5183aa 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -36,11 +36,10 @@ type TimestampSchemaProperty< ? never : TProperty; -export type TimestampSchema = { - [key in - | TimestampSchemaProperty<'createdAt', TOptions> - | TimestampSchemaProperty<'updatedAt', TOptions>]: Date; -}; +export type TimestampSchema = Record< + TimestampSchemaProperty<'createdAt', TOptions> | TimestampSchemaProperty<'updatedAt', TOptions>, + Date +>; export interface ModelOptions { hooks?: Hooks;