Add nodemon
This commit is contained in:
Generated
+2756
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,11 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "flow-remove-types src/ -d out/",
|
||||
"buildWithMaps":
|
||||
"flow-remove-types src/ -d out/ --pretty --sourcemaps",
|
||||
"start": "npm run build && node out/doroundmath.js",
|
||||
"nodemon":
|
||||
"./node_modules/nodemon/bin/nodemon.js --watch src --delay 1 --exec npm start",
|
||||
"addTypes": "flow-typed install",
|
||||
"update": "npm install && flow-typed install",
|
||||
"flow": "flow",
|
||||
@@ -62,6 +67,7 @@
|
||||
"flow-coverage-report": "^0.5.0",
|
||||
"flow-remove-types": "^1.2.3",
|
||||
"flow-typed": "^2.4.0",
|
||||
"nodemon": "^1.17.3",
|
||||
"prettier": "^1.11.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,4 @@ console.log(RM.addR(12.348, 4.221)); // 16.57
|
||||
console.log(multR(22.9, 12.4)); // 283.96
|
||||
console.log(divR(22, 7)); // 3.14
|
||||
|
||||
console.log(RM.changeSign(0.07)); // error; RM.changeSign is not a function
|
||||
// console.log(RM.changeSign(0.07)); // error; RM.changeSign is not a function
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* @flow */
|
||||
/* eslint-disable no-unused-vars */
|
||||
|
||||
"use strict";
|
||||
|
||||
let someFlag /*: boolean */;
|
||||
let greatTotal /*: number */;
|
||||
let firstName /*: string */;
|
||||
|
||||
function toString(x /*: number */) /*: string */ {
|
||||
return String(x);
|
||||
}
|
||||
|
||||
let traffic /*: "red" | "amber" | "green" */;
|
||||
|
||||
/*::
|
||||
type pair<T> = [T, T];
|
||||
|
||||
type pairOfNumbers = pair<number>;
|
||||
type pairOfStrings = pair<string>;
|
||||
|
||||
type simpleFlag = number | boolean;
|
||||
type complexObject = {
|
||||
id: string,
|
||||
name: string,
|
||||
indicator: simpleFlag,
|
||||
listOfValues: Array<number>
|
||||
};
|
||||
*/
|
||||
|
||||
class Person {
|
||||
/*::
|
||||
first: string;
|
||||
last: string;
|
||||
*/
|
||||
|
||||
constructor(first /*: string */, last /*: string */) {
|
||||
this.first = first;
|
||||
this.last = last;
|
||||
}
|
||||
|
||||
// ...several methods, snipped out
|
||||
}
|
||||
|
||||
/*::
|
||||
import type { dniType, nameType } from "./opaque_types";
|
||||
*/
|
||||
|
||||
/*::
|
||||
export type { pairOfNumbers, pairOfStrings };
|
||||
*/
|
||||
Reference in New Issue
Block a user