diff options
Diffstat (limited to 'south-african-id-parser.d.ts')
-rw-r--r-- | south-african-id-parser.d.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/south-african-id-parser.d.ts b/south-african-id-parser.d.ts new file mode 100644 index 0000000..b401e7b --- /dev/null +++ b/south-african-id-parser.d.ts @@ -0,0 +1,34 @@ +export function parse(idNumber: string): { + /** + * - true + */ + isValid: boolean; + /** + * - The date of birth from the ID number. + */ + dateOfBirth: Date; + /** + * - The sex from the ID number - true if male, false if female. + */ + isMale: boolean; + /** + * - The sex from the ID number - true if female, false if male. + */ + isFemale: boolean; + /** + * - Citizenship status from the ID + * number, true if it indicates South African citizenship. + */ + isSouthAfricanCitizen: boolean; +} | { + /** + * - false + */ + isValid: boolean; +}; +export function validate(idNumber: string): boolean; +export function parseDateOfBirth(idNumber: string): Date; +export function parseIsMale(idNumber: string): boolean; +export function parseIsFemale(idNumber: string): boolean; +export function parseIsSouthAfricanCitizen(idNumber: string): boolean; +//# sourceMappingURL=south-african-id-parser.d.ts.map
\ No newline at end of file |