diff --git a/types/mathjs/index.d.ts b/types/mathjs/index.d.ts index 8b133c29f7..6cb49323fa 100644 --- a/types/mathjs/index.d.ts +++ b/types/mathjs/index.d.ts @@ -2876,6 +2876,7 @@ declare namespace math { interface Parser { eval(expr: string): any; get(variable: string): any; + getAll(): { [key: string]: any; }; set: (variable: string, value: any) => void; clear: () => void; } diff --git a/types/mathjs/mathjs-tests.ts b/types/mathjs/mathjs-tests.ts index 38aedea488..babfa3ff37 100644 --- a/types/mathjs/mathjs-tests.ts +++ b/types/mathjs/mathjs-tests.ts @@ -179,6 +179,7 @@ Expressions examples const x = parser.get('x'); const f = parser.get('f'); + const y = parser.getAll(); const g = f(3, 3); parser.set('h', 500);