-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
typingsTypescript public type definitions issuesTypescript public type definitions issues
Description
sample({
target: {} as Unit<{ a: string; b: string }>,
source: {} as Unit<{ a: string }>, // should not let such assignment
//////////////////////////////////////////////////////////////////////////////
///////////////// types of props below do not affect anything ////////////////
//////////////////////////////////////////////////////////////////////////////
clock: {} as Unit<any>,
});
sample({
target: {} as Unit<{ a: string; b: string }>,
fn: () => ({ a: '' }), // should not let such assignment
//////////////////////////////////////////////////////////////////////////////
///////////////// types of props below do not affect anything ////////////////
//////////////////////////////////////////////////////////////////////////////
source: {} as Unit<any>,
clock: {} as Unit<any>,
});Last time we faced with the same problem in forward typings.
I'll add NoInfer<T> type suggested by Typescript comminuty and modify inference for each sample overload which includes target.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
typingsTypescript public type definitions issuesTypescript public type definitions issues