UNPKG

@antv/g2

Version:

the Grammar of Graphics in Javascript

22 lines (16 loc) 351 B
class Container<O> { private $value: any; constructor(x: any) { this.$value = x; } static of<O>(x: any) { return new Container<O>(x); } call<T, U>(f: (x: T, ...rest: any[]) => U, ...rest: any[]) { return (this.$value = f(this.$value, ...rest)), this; } value(): O { return this.$value; } } export { Container };