This is an implementation of the translator pattern, that allow us to have an instance over Compose that can smartly know about top level params and deep one without the need of any extra references.

//assume compose object has been defined before (as a ts Compose instance).

const translator = new Translator(compose)
const compose_as_object = translator.toDict()

Constructors

Properties

Methods

Constructors

Properties

compose?: Compose

Methods

  • Parameters

    • input: any

      should be an object representation of a Compose object

    Returns Compose

    //assume compose object has been defined before (as a ts object).

    const compose_as_Compose: Compose = Translator.fromDict(compose)