pond-ts API Reference (core)
Preparing search index...
LiveView
Class LiveView<S>
Type Parameters
S
extends
SeriesSchema
Implements
LiveSource
<
S
>
Index
Constructors
constructor
Properties
[
EMITS_
EVICT]
name
schema
Accessors
length
Methods
aggregate
at
cumulative
diff
dispose
fill
filter
first
last
map
on
pct
Change
rate
rolling
select
to
Time
Series
window
Constructors
constructor
new
LiveView
<
S
extends
SeriesSchema
>
(
source
:
LiveSource
<
any
>
,
process
:
(
event
:
any
)
=>
EventForSchema
<
S
>
|
undefined
,
options
?:
ViewOptions
<
S
>
,
)
:
LiveView
<
S
>
Type Parameters
S
extends
SeriesSchema
Parameters
source
:
LiveSource
<
any
>
process
:
(
event
:
any
)
=>
EventForSchema
<
S
>
|
undefined
Optional
options
:
ViewOptions
<
S
>
Returns
LiveView
<
S
>
Properties
Readonly
[
EMITS_
EVICT]
"[EMITS_EVICT]"
:
true
= ...
Readonly
name
name
:
string
Readonly
schema
schema
:
S
Accessors
length
get
length
()
:
number
Returns
number
Methods
aggregate
aggregate
<
const
M
extends
Readonly
<
AggregateMapEntries
<
S
>
>
>
(
sequence
:
Sequence
,
mapping
:
M
,
)
:
LiveAggregation
<
S
,
readonly
[
ColumnDef
<
"interval"
,
"interval"
>
,
AggregateColumns
<
ValueColumnsForSchema
<
S
>
,
M
>
,
]
,
>
Type Parameters
const
M
extends
Readonly
<
AggregateMapEntries
<
S
>
>
Parameters
sequence
:
Sequence
mapping
:
M
Returns
LiveAggregation
<
S
,
readonly
[
ColumnDef
<
"interval"
,
"interval"
>
,
AggregateColumns
<
ValueColumnsForSchema
<
S
>
,
M
>
,
]
,
>
at
at
(
index
:
number
)
:
EventForSchema
<
S
>
|
undefined
Parameters
index
:
number
Returns
EventForSchema
<
S
>
|
undefined
cumulative
cumulative
<
const
Targets
extends
string
>
(
spec
:
{
[
K
in
string
]
:
|
"sum"
|
"count"
|
"min"
|
"max"
|
(
(
acc
:
number
,
value
:
number
)
=>
number
)
}
,
)
:
LiveView
<
readonly
[
S
[
0
]
,
ReplaceSmoothedColumn
<
ValueColumnsForSchema
<
S
>
,
Targets
>
,
]
,
>
Type Parameters
const
Targets
extends
string
Parameters
spec
:
{
[
K
in
string
]
:
|
"sum"
|
"count"
|
"min"
|
"max"
|
(
(
acc
:
number
,
value
:
number
)
=>
number
)
}
Returns
LiveView
<
readonly
[
S
[
0
]
,
ReplaceSmoothedColumn
<
ValueColumnsForSchema
<
S
>
,
Targets
>
,
]
,
>
diff
diff
<
const
Target
extends
string
>
(
columns
:
Target
|
readonly
Target
[]
,
options
?:
{
drop
?:
boolean
}
,
)
:
LiveView
<
readonly
[
S
[
0
]
,
ReplaceSmoothedColumn
<
ValueColumnsForSchema
<
S
>
,
Target
>
]
,
>
Type Parameters
const
Target
extends
string
Parameters
columns
:
Target
|
readonly
Target
[]
Optional
options
:
{
drop
?:
boolean
}
Returns
LiveView
<
readonly
[
S
[
0
]
,
ReplaceSmoothedColumn
<
ValueColumnsForSchema
<
S
>
,
Target
>
]
,
>
dispose
dispose
()
:
void
Returns
void
fill
fill
(
strategy
:
LiveFillStrategy
|
LiveFillMapping
<
S
>
,
options
?:
{
limit
?:
number
}
,
)
:
LiveView
<
S
>
Parameters
strategy
:
LiveFillStrategy
|
LiveFillMapping
<
S
>
Optional
options
:
{
limit
?:
number
}
Returns
LiveView
<
S
>
filter
filter
(
predicate
:
(
event
:
EventForSchema
<
S
>
)
=>
boolean
)
:
LiveView
<
S
>
Parameters
predicate
:
(
event
:
EventForSchema
<
S
>
)
=>
boolean
Returns
LiveView
<
S
>
first
first
()
:
EventForSchema
<
S
>
|
undefined
Returns
EventForSchema
<
S
>
|
undefined
last
last
()
:
EventForSchema
<
S
>
|
undefined
Returns
EventForSchema
<
S
>
|
undefined
map
map
(
fn
:
(
event
:
EventForSchema
<
S
>
)
=>
EventForSchema
<
S
>
)
:
LiveView
<
S
>
Parameters
fn
:
(
event
:
EventForSchema
<
S
>
)
=>
EventForSchema
<
S
>
Returns
LiveView
<
S
>
on
on
(
type
:
"event"
,
fn
:
EventListener
<
S
>
)
:
()
=>
void
Parameters
type
:
"event"
fn
:
EventListener
<
S
>
Returns
()
=>
void
on
(
type
:
"evict"
,
fn
:
EvictListener
<
S
>
)
:
()
=>
void
Parameters
type
:
"evict"
fn
:
EvictListener
<
S
>
Returns
()
=>
void
pct
Change
pctChange
<
const
Target
extends
string
>
(
columns
:
Target
|
readonly
Target
[]
,
options
?:
{
drop
?:
boolean
}
,
)
:
LiveView
<
readonly
[
S
[
0
]
,
ReplaceSmoothedColumn
<
ValueColumnsForSchema
<
S
>
,
Target
>
]
,
>
Type Parameters
const
Target
extends
string
Parameters
columns
:
Target
|
readonly
Target
[]
Optional
options
:
{
drop
?:
boolean
}
Returns
LiveView
<
readonly
[
S
[
0
]
,
ReplaceSmoothedColumn
<
ValueColumnsForSchema
<
S
>
,
Target
>
]
,
>
rate
rate
<
const
Target
extends
string
>
(
columns
:
Target
|
readonly
Target
[]
,
options
?:
{
drop
?:
boolean
}
,
)
:
LiveView
<
readonly
[
S
[
0
]
,
ReplaceSmoothedColumn
<
ValueColumnsForSchema
<
S
>
,
Target
>
]
,
>
Type Parameters
const
Target
extends
string
Parameters
columns
:
Target
|
readonly
Target
[]
Optional
options
:
{
drop
?:
boolean
}
Returns
LiveView
<
readonly
[
S
[
0
]
,
ReplaceSmoothedColumn
<
ValueColumnsForSchema
<
S
>
,
Target
>
]
,
>
rolling
rolling
<
const
M
extends
Readonly
<
AggregateMapEntries
<
S
>
>
>
(
window
:
RollingWindow
,
mapping
:
M
,
)
:
LiveRollingAggregation
<
S
,
readonly
[
S
[
0
]
,
AggregateColumns
<
ValueColumnsForSchema
<
S
>
,
M
>
]
,
>
Type Parameters
const
M
extends
Readonly
<
AggregateMapEntries
<
S
>
>
Parameters
window
:
RollingWindow
mapping
:
M
Returns
LiveRollingAggregation
<
S
,
readonly
[
S
[
0
]
,
AggregateColumns
<
ValueColumnsForSchema
<
S
>
,
M
>
]
,
>
select
select
<
const
Keys
extends
readonly
(
keyof
EventDataForSchema
<
S
>
)
[]
>
(
...
keys
:
Keys
,
)
:
LiveView
<
readonly
[
S
[
0
]
,
PickSelectedColumns
<
ValueColumnsForSchema
<
S
>
,
Keys
[
number
]
>
,
]
,
>
Type Parameters
const
Keys
extends
readonly
(
keyof
EventDataForSchema
<
S
>
)
[]
Parameters
...
keys
:
Keys
Returns
LiveView
<
readonly
[
S
[
0
]
,
PickSelectedColumns
<
ValueColumnsForSchema
<
S
>
,
Keys
[
number
]
>
,
]
,
>
to
Time
Series
toTimeSeries
(
name
?:
string
)
:
TimeSeries
<
S
>
Parameters
Optional
name
:
string
Returns
TimeSeries
<
S
>
window
window
(
size
:
RollingWindow
)
:
LiveView
<
S
>
Parameters
size
:
RollingWindow
Returns
LiveView
<
S
>
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
[
EMITS_
EVICT]
name
schema
Accessors
length
Methods
aggregate
at
cumulative
diff
dispose
fill
filter
first
last
map
on
pct
Change
rate
rolling
select
to
Time
Series
window
pond-ts API Reference (core)
Loading...