@khanacademy/kas 0.3.16 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nodes.d.ts CHANGED
@@ -20,7 +20,7 @@ declare abstract class Expr {
20
20
  new (...args: any[]): any;
21
21
  name: string;
22
22
  };
23
- abstract args(): (number | string | Expr)[];
23
+ abstract args(): (number | string | Expr | undefined)[];
24
24
  construct(args: any[]): any;
25
25
  recurse(method: string, ...passed: any[]): this;
26
26
  eval(vars?: Vars, options?: ParseOptions): number;
@@ -271,10 +271,10 @@ export declare class Func extends Sym {
271
271
  }
272
272
  export declare class Var extends Sym {
273
273
  symbol: string;
274
- subscript: Expr;
275
- constructor(symbol: string, subscript: Expr);
274
+ subscript?: Expr;
275
+ constructor(symbol: string, subscript?: Expr);
276
276
  func: typeof Var;
277
- args(): (string | Expr)[];
277
+ args(): (string | Expr | undefined)[];
278
278
  exprArgs(): never[];
279
279
  recurse(): this;
280
280
  print(): string;
@@ -391,7 +391,7 @@ export declare class Float extends Num {
391
391
  static toDecimalPlaces(n: any, places: any): Float;
392
392
  }
393
393
  type ParseOptions = {
394
- functions?: string[];
394
+ functions?: ReadonlyArray<string>;
395
395
  decimal_separator?: string;
396
396
  };
397
397
  export declare const parse: (input: string, options?: ParseOptions) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A lightweight JavaScript CAS for comparing expressions and equations.",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "0.3.16",
6
+ "version": "0.4.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "module": "dist/es/index.js",
19
19
  "main": "dist/index.js",
20
- "source": "src/index.js",
20
+ "source": "src/index.ts",
21
21
  "files": [
22
22
  "dist"
23
23
  ],