Created
February 9, 2017 22:56
-
-
Save curtiswilkinson/92edd2a186cb266c2499284d1499645f to your computer and use it in GitHub Desktop.
example function
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
import * as api from 'whatever' | |
interface ReturnPayload { | |
name: string, | |
value: string | |
} | |
export function saveAndProcessReturn(payload) { | |
const saveReturn: ReturnPayload[] = api.save('Route', payload) | |
return saveReturn.map(x => { | |
return { [x.name]: x.value } | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment