TS Types problem #14

Open
opened 2024-03-20 01:00:08 +00:00 by pcfreak30 · 1 comment
Owner

Get the types/generics working on 5aa62f7d82/app/data/account-provider.ts (L24)

Get the types/generics working on https://git.lumeweb.com/LumeWeb/portal-dashboard/src/commit/5aa62f7d82208a465038d2fdf54ece8da8ca2cc9/app/data/account-provider.ts#L24
pcfreak30 added the
ui
label 2024-03-20 01:00:08 +00:00
ditorodev was assigned by pcfreak30 2024-03-20 01:00:08 +00:00
pcfreak30 added this to the Portal project 2024-03-20 01:00:08 +00:00
Author
Owner

More type errors:

TS2322: Type
() => {     open: ({key, message, description, undoableTimeout, cancelMutation, action, type,}: Omit<OpenNotificationParams, "type"> & {         action?: ToastActionElement | undefined;         type: "default" | "destructive";     }) => void;     close: () => void; }
is not assignable to type
Required<INotificationContext> | (() => Required<INotificationContext>) | undefined
Type
() => {     open: ({key, message, description, undoableTimeout, cancelMutation, action, type,}: Omit<OpenNotificationParams, "type"> & {         action?: ToastActionElement | undefined;         type: "default" | "destructive";     }) => void;     close: () => void; }
is not assignable to type () => Required<INotificationContext>
Call signature return types
{     open: ({key, message, description, undoableTimeout, cancelMutation, action, type,}: Omit<OpenNotificationParams, "type"> & {         action?: ToastActionElement | undefined;         type: "default" | "destructive";     }) => void;     close: () => void; }
and Required<INotificationContext> are incompatible.
The types of open are incompatible between these types.
Type
({key, message, description, undoableTimeout, cancelMutation, action, type,}: Omit<OpenNotificationParams, "type"> & {     action?: ToastActionElement | undefined;     type: "default" | "destructive"; }) => void
is not assignable to type (params: OpenNotificationParams) => void
Types of parameters __0 and params are incompatible.
Type OpenNotificationParams is not assignable to type
Omit<OpenNotificationParams, "type"> & {     action?: ToastActionElement | undefined;     type: "default" | "destructive"; }
Type OpenNotificationParams is not assignable to type
More type errors: ``` TS2322: Type () => { open: ({key, message, description, undoableTimeout, cancelMutation, action, type,}: Omit<OpenNotificationParams, "type"> & { action?: ToastActionElement | undefined; type: "default" | "destructive"; }) => void; close: () => void; } is not assignable to type Required<INotificationContext> | (() => Required<INotificationContext>) | undefined Type () => { open: ({key, message, description, undoableTimeout, cancelMutation, action, type,}: Omit<OpenNotificationParams, "type"> & { action?: ToastActionElement | undefined; type: "default" | "destructive"; }) => void; close: () => void; } is not assignable to type () => Required<INotificationContext> Call signature return types { open: ({key, message, description, undoableTimeout, cancelMutation, action, type,}: Omit<OpenNotificationParams, "type"> & { action?: ToastActionElement | undefined; type: "default" | "destructive"; }) => void; close: () => void; } and Required<INotificationContext> are incompatible. The types of open are incompatible between these types. Type ({key, message, description, undoableTimeout, cancelMutation, action, type,}: Omit<OpenNotificationParams, "type"> & { action?: ToastActionElement | undefined; type: "default" | "destructive"; }) => void is not assignable to type (params: OpenNotificationParams) => void Types of parameters __0 and params are incompatible. Type OpenNotificationParams is not assignable to type Omit<OpenNotificationParams, "type"> & { action?: ToastActionElement | undefined; type: "default" | "destructive"; } Type OpenNotificationParams is not assignable to type ```
pcfreak30 added this to the Q2 milestone 2024-03-22 15:40:35 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LumeWeb/portal-dashboard#14
No description provided.