UNPKG

babel-plugin-typecheck

Version:

Transforms flow type annotations into runtime type checks.

14 lines (12 loc) 206 B
class User { constructor (name: string) { this.name = name; } } export default function demo (name: string): any { let user: ?User; (() => { user = new User(name); })(); return user; }