-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Flowtype definitions for index.ts | ||
* Generated by Flowgen from a Typescript Definition | ||
* Flowgen v1.8.0 | ||
* Author: [Joar Wilk](http://twitter.com/joarwilk) | ||
* Repo: http://github.com/joarwilk/flowgen | ||
*/ | ||
|
||
declare export function diffYears(startDate: Date, endDate: Date): void; | ||
declare export function isValidDate( | ||
date: Date, | ||
expectedYear: string, | ||
expectedMonth: string, | ||
expectedDay: string | ||
): boolean; | ||
declare type IDNumberType = "birthNumber" | "DNumber" | "HNumber" | "FHNumber"; | ||
/** | ||
* Checks if the given value is a valid Norwegian national identity number. | ||
* @returns `true` for valid, and `false` for invalid ID-number. | ||
*/ | ||
declare export function validateNorwegianIdNumber(idNumber: string): boolean; | ||
declare export function possibleAgesOfPersonWithIdNumber( | ||
elevenDigits: string | ||
): number[]; | ||
|
||
/** | ||
* Returns the age of a person with given Norwegian national identity number. | ||
* Returns `undefined` when birth date could not be determined (e.g. for FH-numbers and invalid ID-numbers). | ||
*/ | ||
declare export function possibleAgeOfPersonWithIdNumber( | ||
elevenDigits: string | ||
): number | void; | ||
declare export function idNumberContainsBirthDate( | ||
elevenDigits: string | ||
): boolean; | ||
declare function possibleBirthDateOfIdNumber(elevenDigits: string): Date | void; | ||
declare function idNumberType(elevenDigits: string): IDNumberType; | ||
declare function possibleBirthDateOfBirthNumber( | ||
elevenDigits: string | ||
): Date | void; | ||
declare function possibleBirthDateOfHNumber(elevenDigits: string): Date | void; | ||
declare function possibleBirthDateOfDNumber(elevenDigits: string): Date | void; | ||
declare function getBirthDate(elevenDigitsWithDDMMYY: string): Date | void; | ||
declare function isValidCheckDigits(elevenDigits: string): boolean; | ||
declare function isValidCheckDigit( | ||
staticSequence: number[], | ||
elevenDigits: number[] | ||
): boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters