UNPKG

babel-plugin-typecheck

Version:

Transforms flow type annotations into runtime type checks.

21 lines (16 loc) 276 B
type TypeDateTime = { date: string, time: string }; type TypeAction = { data: Object, name: string }; const demo = ({date, time}: TypeDateTime) : TypeAction => ({ data: { date, time }, name: 'DATE_TIME' }); export default demo;