-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
Is this a regression?
Yes
Description
The tasks that use Payload.make, return a standard and Payload with data as any.
Instead of doing that, we need to be able to extract the type from whatever the user's entered as output and let typescript extract the type properly.
Before
export interface Payload {
// Payload IDentifier
pid: string;
// any value
data: any;
}
export namespace Payload {
export const make = (pid: string, data: any): Payload => ({ pid, data });
}After
export interface Payload<T> {
// Payload IDentifier
pid: string;
// any value
data: T;
}
export namespace Payload {
export const make = <T>(pid: string, data: T): Payload<T> => ({ pid, data });
}Now we know what type to expect from any plugin.task that we run
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
No response
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done