Created
May 2, 2017 21:38
-
-
Save nertzy/a08b62660a00b668edf7ca858d218b56 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 function generateFactory<T>(defaultObject: T): (input?: Partial<T>) => T { | |
return (input?: Partial<T>) => Object.assign({}, defaultObject, input); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment