diff --git a/src/Quantity.ts b/src/Quantity.ts index b69b287..f13ccf4 100644 --- a/src/Quantity.ts +++ b/src/Quantity.ts @@ -250,7 +250,7 @@ export type Acceleration = Quantity | string; export type Hertz = Quantity | string; export type Temperature = Quantity | string; -export function parseQuantity(unitString: string): Quantity | string { +export function parseQuantity(unitString: string): Quantity { const matches = unitString.match( /^(>|<|<=|>=|=|==|~|~=|!=)? *([+-])? *(\d+(?:\.\d+)?)(?: *(\.\.\.?) *([+-])? *(\d+(?:\.\d+)?))? *(.+)?$/, ) || [];