From 01730ef78dc4c519f6a07f0355f6df5cabc54b81 Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Sat, 5 Dec 2015 12:42:32 +0100 Subject: [PATCH] Add Flow section to getting started --- docs/GETTING_STARTED.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index 1b01223..0920e9d 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -112,6 +112,19 @@ you'll see are: * @example - you can us the @example tag to add code examples of how to use some thing inline with the thing itself +## Flow type annotations + +Alternatively, [Flow](http://flowtype.org/) type annotations allows for a compacter syntax: + +```js +/** + * This function adds one to its input. + */ +function addOne(input: number): number { + return input + 1; +} +``` + ## What `documentation` does Documentation does some minor magic to generate documentation. Unless