feat(billing): refacto billing (#14243)

… prices for metered billing

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
Antoine Moreaux
2025-09-19 11:25:53 +02:00
committed by GitHub
parent 163890f6c8
commit 43e0cd5d05
351 changed files with 16091 additions and 6101 deletions
@@ -0,0 +1,13 @@
import { assertIsDefinedOrThrow } from '@/utils';
export const findOrThrow = <T>(
array: T[],
predicate: (value: T) => boolean,
error: Error = new Error('Element not found'),
): T => {
const result = array.find(predicate);
assertIsDefinedOrThrow(result, error)
return result;
};