See <ComponentProps>
A portion of the configuration object to pass to the HeatSourceBaseComponent
constructor.
type HeatSourceBaseComponentPropsV1 = {
isLit?: boolean | undefined;
progress?: number | undefined;
time?: number | undefined;
};
export type HeatSourceBaseComponentProps = HeatSourceBaseComponentPropsV1;
isLit
(optional, defaulttrue
)<boolean>
progress
(optional, default0
)<number>
time
(optional, default31557600000000000
)<number>
Creates a versioned HeatSourceBase
component.
props
<ComponentProps & HeatSourceBaseComponentProps>
Configuration of the component to create.- Returns:
<HeatSourceBaseComponent>
import { HeatSourceBaseComponent } from 'att-string-transcoder';
const componentVersion = 1;
const component = new HeatSourceBaseComponent({ version: componentVersion });
See Component.fromBinary(reader, version)
Note that the following properties are sorted in order of appearance when decoding component binary data.
See Component.hash
See Component.name
Whether this heat source is lit and active or not.
- Since:
v1
<boolean>
import { HeatSourceBaseComponent } from 'att-string-transcoder';
const componentVersion = 1;
const component = new HeatSourceBaseComponent({ version: componentVersion });
const isLit = component.isLit;
// `isLit` is `true`
Progress of the heat source until extinguishing.
- Since:
v1
<number>
A number between0
and1
(inclusive).
import { HeatSourceBaseComponent } from 'att-string-transcoder';
const componentVersion = 1;
const component = new HeatSourceBaseComponent({ version: componentVersion });
const progress = component.progress;
// `progress` is `0`
- Since:
v1
<number>
import { HeatSourceBaseComponent } from 'att-string-transcoder';
const componentVersion = 1;
const component = new HeatSourceBaseComponent({ version: componentVersion });
const time = component.time;
// `time` is `31557600000000000`
See Component.toBinary(version?)