Giter Club home page Giter Club logo

Comments (1)

josephjclark avatar josephjclark commented on August 19, 2024

Quick brainstorm of options:

  • Allow the runtime to safely serialise functions. OR some functions. You should be able to decompile a function down to its source code, right? How does that work and can we exploit it? Then we can write functions to state and pass them downstream. This is a bit of a fiddly UX though because if you return state downstream, you could lose the functions entirely. Also I think writing logic to a state object feels like an antipattern
  • That means we have to import the custom functions into the job.This might make the compiler's life harder because it has to distinguish adaptor functions from user functions (and what if there's a conflict?)
  • One solution is to use a convention. If there's a file called utils.js - or perhaps a path to a utils file is on the workflow object (yes I like this), we can add import * as util from './utils' into each job. Now the exports from each job are available on a utils object. So you can do utils.convertToLocalCurrency. I quite like this: it's achievable at low cost and adds a lot of utility. We need the right word for utils. Maybe the workflow can map it to whatever variable you like.

from kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.