fix: refactor to have child classes that inherit from RecordValue, but represent the distinct types of value objects that can be returned by the api. fix: added and updated tests to address this refactor
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { RecordValueType } from '../enums/RecordValueType';
|
||||
import { RecordValue } from './RecordValue';
|
||||
|
||||
/**
|
||||
* @class IntegerRecordValue - A record value represented by an integer.
|
||||
*/
|
||||
export class IntegerRecordValue extends RecordValue<number> {
|
||||
/**
|
||||
* @constructor - Creates a new instance of IntegerRecordValue.
|
||||
* @param {number} fieldId - The id of the field.
|
||||
* @param {number} value - The value of the field.
|
||||
* @returns {IntgerRecordValue} - A new instance of IntegerRecordValue.
|
||||
*/
|
||||
constructor(fieldId: number, value: number) {
|
||||
super(RecordValueType.Integer, fieldId, value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user