mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 20:28:38 +00:00
update defineFunction to accept a single arg, introduce flow to do some typechecking
This commit is contained in:
committed by
Kevin Barabash
parent
a99c7c9e0f
commit
d8116bdc64
@@ -1,8 +1,13 @@
|
||||
import utils from "./utils";
|
||||
import ParseError from "./ParseError";
|
||||
import ParseNode from "./ParseNode";
|
||||
import {default as _defineFunction, ordargument} from "./defineFunction";
|
||||
|
||||
import defineFunction, {ordargument} from "./defineFunction";
|
||||
// Define a convenience function that mimcs the old semantics of defineFunction
|
||||
// to support existing code so that we can migrate it a little bit at a time.
|
||||
const defineFunction = function(names, props, handler) {
|
||||
_defineFunction({names, props, handler});
|
||||
};
|
||||
|
||||
// A normal square root
|
||||
defineFunction("\\sqrt", {
|
||||
|
Reference in New Issue
Block a user