bindExternalFunctionType method

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

Register a external function typedef into scrfipt

Implementation

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