Flux experimental record package
The record
package is experimental and subject to change at any time.
By using this package, you accept the risks of experimental functions.
The Flux experimental record
package provides tools for working with Flux
records.
Import the experimental/record
package.
import "experimental/record"
This package is an interim solution
The experimental/record
package is an interim solution for
influxdata/flux#3461
and will either be removed after this issue is resolved or promoted out of
the experimental package if other uses are found.
Constants
The experimental/record
package provides the following constants:
record.any = {} // polymorphic record with unconstrained property types
record.any
Currently, default function parameter values constrain the parameter’s type.
record.any
is a polymorphic record value that can be used as a default
record value when input record property types are not known.
addFoo = (r=record.any) => ({ r with foo: "bar" })
addFoo(r: {})
// Returns {foo: "bar"}
addFoo(r: {baz: "quz", int: 123})
// {baz: "quz", int: 123, foo: "bar"}
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, the following resources are available:
InfluxDB Cloud customers can contact InfluxData Support.