telefunc
Version:
Remote functions. Instead of API.
16 lines (15 loc) • 672 B
JavaScript
export { decorateTelefunction };
import { assertTelefunction } from './assertTelefunction.js';
import { registerTelefunction } from './loadTelefuncFilesUsingRegistration.js';
import { getTelefunctionKey } from '../../utils.js';
function decorateTelefunction(telefunction, exportName, telefuncFilePath, appRootDir) {
assertTelefunction(telefunction, exportName, telefuncFilePath);
{
const telefunctionKey = getTelefunctionKey(telefuncFilePath, exportName);
Object.assign(telefunction, {
_key: telefunctionKey,
_appRootDir: appRootDir,
});
}
registerTelefunction(telefunction, exportName, telefuncFilePath);
}