Skip to content

Instantly share code, notes, and snippets.

@dooman87
Created January 2, 2017 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dooman87/290ff6f846dbb986cd8a4de40f3e8f49 to your computer and use it in GitHub Desktop.
Save dooman87/290ff6f846dbb986cd8a4de40f3e8f49 to your computer and use it in GitHub Desktop.
TS2532: Object is possibly 'undefined'.
function mapStateToProps(state: State, ownProps?: TApiKeyProps): TApiKeyProps {
return {
apiKeys: state.apiKey.data.apiKeys,
//ERROR: TS2532: Object is possibly 'undefined'.
onAddApiKey: ownProps.onAddApiKey,
//ERROR: TS2532: Object is possibly 'undefined'.
onDeleteApiKey: ownProps.onDeleteApiKey
} as TApiKeyProps
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment