import { Convert, text } from '@rsdk/common'; import type { PropertyParser } from '../../types'; export class NumberParser implements PropertyParser { type(): string { return 'number'; } description(): string { return text` Extracts numeric value (uses parseFloat under the hood). NaN and Infinity will be rejected. NOTE: Use correct decimal delimiter according to locale. See https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Intl `; } parse(value: unknown): number { return Convert.number(value); } }