UNPKG

babel-plugin-typecheck

Version:

Transforms flow type annotations into runtime type checks.

18 lines (14 loc) 261 B
type User = { name?: string; email?: string; } export default function demo (name, email): User { const user = createUser(); user.name = 234134; user.name = name; user.email = email; return user; } function createUser (): User { return {}; }