Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Keep in mind that you won't always be needing util.promisify()."
A block of code is set as follows:
// Source file: src/roundmath.js
/* @flow */
"use strict";
// continues..
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
// Source file: src/flowcomments.js
let someFlag /*: boolean */;
let greatTotal /*: number */;
let firstName /*: string */;
function toString(x /*: number */) /*: string */ {
return String(x);
}
let traffic /*: "red" | "amber" | "green" */;
// continues...
Any command-line input or output is written as follows:
> npm install moment --save
> npm run addTypes
Bold: Indicates a new term, an important word, or words that you see on screen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "VSC provides full access to commands through its Command Palette... as seen in the following screenshot."