Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const FLOW_TYPENAMES = {
$Supertype: '$supertype',
$TupleMap: '$tupleMap',
$Values: '$values',
$ReadOnlyArray: 'array',
Class: 'Class'
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* @flow */

export const input = `
type Thing = $ReadOnlyArray<string | number>;

const thing: Thing = [];
`;

export const expected = `
import t from "flow-runtime";
const Thing = t.type("Thing", t.array(t.union(t.string(), t.number())));
const thing = Thing.assert([]);
`;