mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-04 07:52:51 +00:00
Add MathNode.content optional property (#43435)
This is used by ParenthesisNode
This commit is contained in:
parent
170c6b25ea
commit
afa55fd87e
8
types/mathjs/index.d.ts
vendored
8
types/mathjs/index.d.ts
vendored
@ -2,9 +2,10 @@
|
||||
// Project: https://mathjs.org/
|
||||
// Definitions by: Ilya Shestakov <https://github.com/siavol>,
|
||||
// Andy Patterson <https://github.com/andnp>,
|
||||
// Brad Besserman <https://github.com/bradbesserman>
|
||||
// Pawel Krol <https://github.com/pawkrol>
|
||||
// Charlee Li <https://github.com/charlee>
|
||||
// Brad Besserman <https://github.com/bradbesserman>,
|
||||
// Pawel Krol <https://github.com/pawkrol>,
|
||||
// Charlee Li <https://github.com/charlee>,
|
||||
// Mark Wiemer <https://github.com/mark-wiemer>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@ -3072,6 +3073,7 @@ declare namespace math {
|
||||
isSymbolNode?: boolean;
|
||||
isUpdateNode?: boolean;
|
||||
comment?: string;
|
||||
content?: MathNode;
|
||||
op?: string;
|
||||
fn?: string;
|
||||
args?: MathNode[];
|
||||
|
||||
@ -153,6 +153,12 @@ Expressions examples
|
||||
math.evaluate(['f = 3', 'g = 4', 'f * g']);
|
||||
}
|
||||
|
||||
// get content of a parenthesis node
|
||||
{
|
||||
const node = math.parse('(1)');
|
||||
const innerNode = node.content;
|
||||
}
|
||||
|
||||
// scope can contain both variables and functions
|
||||
{
|
||||
const scope = { hello: (name: string) => `hello, ${name}!` };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user