UNPKG

babel-plugin-typecheck

Version:

Transforms flow type annotations into runtime type checks.

11 lines (8 loc) 193 B
type Type = number; export default function demo (): number { let foo: Array<string|Type> = ['foo', 123, 'bar', 456]; for (let bar: string|Type of foo) { // ... } return 123; }