Created
January 14, 2017 16:51
-
-
Save piotrwitek/aa6607d3f19f508f58a0912c76c32ef2 to your computer and use it in GitHub Desktop.
Object.assign for type-safe partial state updates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @export Object.assign for type-safe partial state updates | |
* @interface ObjectConstructor | |
*/ | |
export interface ObjectConstructor { | |
assign<T>(targetState: {}, sourceState: T, ...partialStates: Partial<T>[]): T; | |
} | |
export declare const Object: ObjectConstructor; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment