bindExternalFunctionType method

void bindExternalFunctionType(
  1. String id,
  2. HTExternalFunctionTypedef function, {
  3. bool override = false,
})

Register a external function typedef into scrfipt

Implementation

void bindExternalFunctionType(String id, HTExternalFunctionTypedef function,
    {bool override = false}) {
  if (externFunctionTypedefs.containsKey(id) && !override) {
    throw HTError.defined(id, ErrorType.runtimeError);
  }
  externFunctionTypedefs[id] = function;
}