-
Notifications
You must be signed in to change notification settings - Fork 0
/
utilities.d.ts
21 lines (21 loc) · 1023 Bytes
/
utilities.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import type { CPACode, CPACodeCategory, CPACodeString } from './types.js';
/**
* Checks if a string is meets the CPA code format.
* @param cpaCode - A CPA code.
* @returns - True when the string validates to the CPA code format.
*/
export declare function _validateCPACodeStringFormat(cpaCode: string): cpaCode is CPACodeString;
/**
* Retrieves a category object from a given list.
* @param categoryList - A list of CPA code category objects.
* @param cpaCode - A CPA code.
* @returns - A CPA code category object.
*/
export declare function _getCodeCategory(categoryList: CPACodeCategory[], cpaCode: string): CPACodeCategory | undefined;
/**
* Retrieves a list of CPA code objects that correspond to a given abbreviation.
* @param codeList - A list of CPA code objects.
* @param cpaCodeAbbreviation - A CPA code abbreviation, English or French.
* @returns - A filtered list of CPA code objects.
*/
export declare function _getCodesByAbbreviation(codeList: CPACode[], cpaCodeAbbreviation: string): CPACode[];