spreadsheet
typeScript/javascript spreadsheet parser, with formulas.
git clone https://git.vogt.world/spreadsheet.git
Log | Files | README.md
← Commit log
commit
message
[ArgsChecker] cleaning up types
author
Ben Vogt <[email protected]>
date
2017-04-29 16:41:08
stats
3 file(s) changed, 6 insertions(+), 4 deletions(-)
files
README.md
src/RawFormulas/Math.ts
src/RawFormulas/Utils.ts
 1diff --git a/README.md b/README.md
 2index 1dc0ecd..4f78313 100644
 3--- a/README.md
 4+++ b/README.md
 5@@ -57,8 +57,6 @@ Right now we're just using the number of days since 1900, but we should check th
 6 
 7 ### Numbers with commas in them should still parse to numbers.
 8 
 9-### ArgsChecker.checkLength should be typed
10-
11 ## Testing Guidelines
12 
13 All formulas should test for:
14diff --git a/src/RawFormulas/Math.ts b/src/RawFormulas/Math.ts
15index f01ef1a..3123058 100644
16--- a/src/RawFormulas/Math.ts
17+++ b/src/RawFormulas/Math.ts
18@@ -6,7 +6,11 @@ import {
19   TypeCaster
20 } from "./Utils";
21 import {
22-  NumError, DivZeroError, RefError, ValueError, NAError
23+  NumError,
24+  DivZeroError,
25+  RefError,
26+  ValueError,
27+  NAError
28 } from "../Errors";
29 
30 /**
31diff --git a/src/RawFormulas/Utils.ts b/src/RawFormulas/Utils.ts
32index ff02be1..cd32b8e 100644
33--- a/src/RawFormulas/Utils.ts
34+++ b/src/RawFormulas/Utils.ts
35@@ -927,7 +927,7 @@ class ArgsChecker {
36    * @param args to check length of
37    * @param length expected length
38    */
39-  static checkLength(args: any, length: number) {
40+  static checkLength(args: Array<any> | IArguments, length: number) {
41     if (args.length !== length) {
42       throw new NAError("Wrong number of arguments to ___. Expected 1 arguments, but got " + args.length + " arguments.");
43     }