mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
15 lines
248 B
JavaScript
15 lines
248 B
JavaScript
/* @flow */
|
|
|
|
let tests = [
|
|
function() {
|
|
let x: ?string = null;
|
|
invariant(x, 'truthy only'); // error, forgot to require invariant
|
|
},
|
|
|
|
function(invariant: Function) {
|
|
let x: ?string = null;
|
|
invariant(x);
|
|
(x: string);
|
|
}
|
|
]
|