From cf51c7572a1a984031ecae1daf13e82888771128 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 11:51:23 +0200 Subject: [PATCH] fix: remove explicit typing Apparently this is not need anymore and the linter does not like it. Signed-off-by: Philip Molares --- backend/src/api/utils/openapi.decorator.ts | 4 ++-- .../realtime-note/realtime-user-status-adapter.spec.ts | 2 +- .../realtime/realtime-note/realtime-user-status-adapter.ts | 2 +- .../remote-cursors/cursor-layers-extensions.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/api/utils/openapi.decorator.ts b/backend/src/api/utils/openapi.decorator.ts index 785a24393..a29b5ad6f 100644 --- a/backend/src/api/utils/openapi.decorator.ts +++ b/backend/src/api/utils/openapi.decorator.ts @@ -108,7 +108,7 @@ export const OpenApi = ( ApiOkResponse({ description: description ?? okDescription, isArray: isArray, - type: dto ? (): BaseDto => dto as BaseDto : undefined, + type: dto ? (): BaseDto => dto : undefined, }), ); break; @@ -117,7 +117,7 @@ export const OpenApi = ( ApiCreatedResponse({ description: description ?? createdDescription, isArray: isArray, - type: dto ? (): BaseDto => dto as BaseDto : undefined, + type: dto ? (): BaseDto => dto : undefined, }), HttpCode(201), ); diff --git a/backend/src/realtime/realtime-note/realtime-user-status-adapter.spec.ts b/backend/src/realtime/realtime-note/realtime-user-status-adapter.spec.ts index 1cf4c9de0..47ac4757c 100644 --- a/backend/src/realtime/realtime-note/realtime-user-status-adapter.spec.ts +++ b/backend/src/realtime/realtime-note/realtime-user-status-adapter.spec.ts @@ -86,7 +86,7 @@ describe('realtime user status adapter', () => { clientGuest, clientNotReady, clientDecline, - ].filter((value) => value !== undefined) as RealtimeUserStatusAdapter[]; + ].filter((value) => value !== undefined); } clientLoggedIn1 = new RealtimeUserStatusAdapter( diff --git a/backend/src/realtime/realtime-note/realtime-user-status-adapter.ts b/backend/src/realtime/realtime-note/realtime-user-status-adapter.ts index fef3f7983..7e9b38e31 100644 --- a/backend/src/realtime/realtime-note/realtime-user-status-adapter.ts +++ b/backend/src/realtime/realtime-note/realtime-user-status-adapter.ts @@ -116,7 +116,7 @@ export class RealtimeUserStatusAdapter { const realtimeUsers = this.collectOtherAdapters() .filter((adapter) => adapter !== this) .map((adapter) => adapter.getSendableState()) - .filter((value) => value !== undefined) as RealtimeUser[]; + .filter((value) => value !== undefined); this.messageTransporter.sendMessage({ type: MessageType.REALTIME_USER_STATE_SET, diff --git a/frontend/src/components/editor-page/editor-pane/codemirror-extensions/remote-cursors/cursor-layers-extensions.ts b/frontend/src/components/editor-page/editor-pane/codemirror-extensions/remote-cursors/cursor-layers-extensions.ts index ad1b3de1c..12b0bb3e3 100644 --- a/frontend/src/components/editor-page/editor-pane/codemirror-extensions/remote-cursors/cursor-layers-extensions.ts +++ b/frontend/src/components/editor-page/editor-pane/codemirror-extensions/remote-cursors/cursor-layers-extensions.ts @@ -38,7 +38,7 @@ export const remoteCursorStateField = StateField.define({ }, update(currentValue: RemoteCursor[], transaction: Transaction): RemoteCursor[] { return Optional.ofNullable(transaction.effects.find((effect) => effect.is(remoteCursorUpdateEffect))) - .map((remoteCursor) => remoteCursor.value as RemoteCursor[]) + .map((remoteCursor) => remoteCursor.value) .orElse(currentValue) } })