TypeScript is a superset of JavaScript that introduces modern JS features and strongly-typed declarations that can be used to help reduce coding errors. TypeScript Declaration Files capture these definitions about third-party JavaScript libraries and/or modules, and are then used by the compiler for error-checking. Intergrated Development Environments (IDEs) that support TypeScript further enhance the developer experience by introducing features like error-highlighting and intellisense.
Intellisense support in Visual Studio Code:
Intellisense support in Atom:
The definitions in this project are manually curated based on Oracle's official APEX documentation. More work is required to validate that the definitions against the source JavaScript files, and also to complete the JSDoc comments that support the intellisense code hints. The ultimate goal is to integrate these defintions for the Oracle Application Express (APEX) JavaScript API, into the DefinitelyTyped repository.
Please be mindful that this project is a work-in progress. Please feel free to post issues and/or recommendations. If you would like to contribute to the project, please contact the project owner.
- Node.js version 8.x (recommended)
- TypeScript version 2.x
To install TypeScript, run the following command after Node.js is installed:
$ npm install -g typescript
For Atom, please also install the atom-typescript plugin.
- Create the project folder.
- Initialise the project:
$ npm init
- Install the package from Git:
$ npm install --save-dev https://github.com/fuzziebrain/orclapex-js.git
- Create a
tsconfig.json
file in the project root folder, containing at minimum, the following configuration:
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
]
}
}
- Add the reference to your TS file:
/// <reference types="orclapex-js" />
For those who are not ready to start with TypeScript, Visual Studio Code provides type-checking and intellisense support for JavaScript. Add the following two lines of code:
//@ts-check
/// <reference types="orclapex-js" />
APEX Nitro version 4 and later supports TypeScript. Instructions to set up the project configuration forthcoming.
API / Namespace / Functions / Objects | Implementation Status | Code Hints (JSDoc) | Test Code | Validation |
---|---|---|---|---|
apex namespace | In progress | In progress | Not started | Not started |
apex.da namespace | Done | Done | Not started | Not started |
apex.debug namespace | Done | Done | Not started | Not started |
apex.event namespace | In progress | Not started | Not started | Not started |
apex.item | In progress | Not started | Not started | Not started |
apex.lang namespace | In progress | Not started | Not started | Not started |
apex.message namespace | In progress | Not started | Not started | Not started |
apex.navigation namespace | In progress | Not started | Not started | Not started |
apex.page namespace | In progress | Not started | Not started | Not started |
apex.region | In progress | Not started | Not started | Not started |
apex.server namespace | In progress | Not started | Not started | Not started |
apex.storage namespace | In progress | Not started | Not started | Not started |
apex.util namespace | In progress | In progress | Not started | Not started |
apex.widget namespace | In progress | In progress | Not started | Not started |
Events | Not started | Not started | Not started | Not started |
Non-namespace JavaScript APIs | In progress | In progress | Not started | Not started |
Legacy JavaScript APIs | Not implementing | - | - | - |