diff options
Diffstat (limited to 'src/main/resources/META-INF/resources/types.js')
-rw-r--r-- | src/main/resources/META-INF/resources/types.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/resources/META-INF/resources/types.js b/src/main/resources/META-INF/resources/types.js new file mode 100644 index 0000000..3ea0797 --- /dev/null +++ b/src/main/resources/META-INF/resources/types.js @@ -0,0 +1,10 @@ +// @flow + +export function cast/*:: <T>*/(x /*: ?Object*/) /*: T*/ { + if (x === null || x === undefined) { + throw "unexpected null or undefined"; + } else { + /*:: (x: T); */ + return x; + } +} |