mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Remove module in IBAN definition.
Add definition for "Java".
This commit is contained in:
parent
d728603c7c
commit
9be408dd56
90
iban/iban.d.ts
vendored
90
iban/iban.d.ts
vendored
@ -3,58 +3,56 @@
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module ARHS {
|
||||
/**
|
||||
* @summary Interface for {@link IBAN} object.
|
||||
* @author Cyril Schumacher
|
||||
* @version 1.0
|
||||
*/
|
||||
interface IBANStatic {
|
||||
/**
|
||||
* @summary Interface for {@link IBAN} object.
|
||||
* @author Cyril Schumacher
|
||||
* @version 1.0
|
||||
* @summary Returns the IBAN in a electronic format.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string} The IBAN in electronic format.
|
||||
*/
|
||||
interface IBANStatic {
|
||||
/**
|
||||
* @summary Returns the IBAN in a electronic format.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string} The IBAN in electronic format.
|
||||
*/
|
||||
electronicFormat(iban: string): string;
|
||||
electronicFormat(iban: string): string;
|
||||
|
||||
/**
|
||||
* @summary Convert the passed BBAN to an IBAN for this country specification.
|
||||
* @param {string} countryCode The country of the BBAN.
|
||||
* @param {string} bban The BBAN to convert to IBAN.
|
||||
* @returns {string} The IBAN.
|
||||
*/
|
||||
fromBBAN(countryCode: string, bban: string): string;
|
||||
/**
|
||||
* @summary Convert the passed BBAN to an IBAN for this country specification.
|
||||
* @param {string} countryCode The country of the BBAN.
|
||||
* @param {string} bban The BBAN to convert to IBAN.
|
||||
* @returns {string} The IBAN.
|
||||
*/
|
||||
fromBBAN(countryCode: string, bban: string): string;
|
||||
|
||||
/**
|
||||
* @summary Check if the passed iban is valid according to this specification.
|
||||
* @param {string} iban The iban to validate.
|
||||
* @returns {boolean} True if valid, false otherwise.
|
||||
*/
|
||||
isValid(iban: string): boolean;
|
||||
/**
|
||||
* @summary Check if the passed iban is valid according to this specification.
|
||||
* @param {string} iban The iban to validate.
|
||||
* @returns {boolean} True if valid, false otherwise.
|
||||
*/
|
||||
isValid(iban: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Check of the passed BBAN is valid.
|
||||
* @param {string} countryCode The country of the BBAN.
|
||||
* @param {string} bban The BBAN to validate.
|
||||
* @returns {boolean} True if valid, false otherwise.
|
||||
*/
|
||||
isValidBBAN(countryCode: string, bban: string): boolean;
|
||||
/**
|
||||
* @summary Check of the passed BBAN is valid.
|
||||
* @param {string} countryCode The country of the BBAN.
|
||||
* @param {string} bban The BBAN to validate.
|
||||
* @returns {boolean} True if valid, false otherwise.
|
||||
*/
|
||||
isValidBBAN(countryCode: string, bban: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Returns the IBAN in a print format.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string} The IBAN in print format.
|
||||
*/
|
||||
printFormat(iban: string, separator: string[]): string;
|
||||
/**
|
||||
* @summary Returns the IBAN in a print format.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string} The IBAN in print format.
|
||||
*/
|
||||
printFormat(iban: string, separator: string[]): string;
|
||||
|
||||
/**
|
||||
* @summary Convert the passed IBAN to a country-specific BBAN.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string[]} Separator the separator to use between BBAN blocks.
|
||||
* @returns {string} The BBAN
|
||||
*/
|
||||
toBBAN(iban: string, separator: string[]): string;
|
||||
}
|
||||
/**
|
||||
* @summary Convert the passed IBAN to a country-specific BBAN.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string[]} Separator the separator to use between BBAN blocks.
|
||||
* @returns {string} The BBAN
|
||||
*/
|
||||
toBBAN(iban: string, separator: string[]): string;
|
||||
}
|
||||
|
||||
declare var IBAN: ARHS.IBANStatic;
|
||||
declare var IBAN: IBANStatic;
|
||||
22
java/java-tests.ts
Normal file
22
java/java-tests.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/// <reference path="java.d.ts" />
|
||||
|
||||
/**
|
||||
* @summary Test for the applet status.
|
||||
*/
|
||||
function testStatus() {
|
||||
var java: Java = {
|
||||
status: AppletStatus.Loading
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the handlers.
|
||||
*/
|
||||
function testHandlers() {
|
||||
var handler: Function = () => {};
|
||||
var java: Java = {
|
||||
onError: handler,
|
||||
onLoad: handler,
|
||||
onStop: handler
|
||||
};
|
||||
}
|
||||
1
java/java-tests.ts.tscparams
Normal file
1
java/java-tests.ts.tscparams
Normal file
@ -0,0 +1 @@
|
||||
--noImplicitAny
|
||||
52
java/java.d.ts
vendored
Normal file
52
java/java.d.ts
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
// Type definitions for Java
|
||||
// Project: https://www.java.com/js/deployJava.txt
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @summary Applet Status.
|
||||
* {@link http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/applet_dev_guide.html#JSDPG719|Applet Status And Event Handlers}
|
||||
*/
|
||||
declare enum AppletStatus {
|
||||
/**
|
||||
* @summary Applet is loading.
|
||||
*/
|
||||
Loading = 1,
|
||||
|
||||
/**
|
||||
* @summary Applet has loaded completely and is ready to receive JavaScript calls.
|
||||
*/
|
||||
Ready = 2,
|
||||
|
||||
/**
|
||||
* @summary Error while loading applet.
|
||||
*/
|
||||
Error = 3
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Interface for Java object.
|
||||
* @author Cyril Schumacher
|
||||
* @version 1.0
|
||||
*/
|
||||
interface Java {
|
||||
/**
|
||||
* Handler if the applet status is ERROR. An error has occurred while loading the applet.
|
||||
*/
|
||||
onError?: Function;
|
||||
|
||||
/**
|
||||
* Handler if the applet status is READY. Applet has finished loading and is ready to receive JavaScript calls.
|
||||
*/
|
||||
onLoad?: Function;
|
||||
|
||||
/**
|
||||
* Handler if the applet has stopped.
|
||||
*/
|
||||
onStop?: Function;
|
||||
|
||||
/**
|
||||
* @summary Applet Status.
|
||||
*/
|
||||
status?: AppletStatus;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user