https://github.com/todm/ui5-tooling-types
UI5 Tooling types
https://github.com/todm/ui5-tooling-types
ui5 ui5-builder ui5-cli ui5-fs ui5-logger ui5-middleware ui5-project ui5-server ui5-task ui5-tooling
Last synced: 4 months ago
JSON representation
UI5 Tooling types
- Host: GitHub
- URL: https://github.com/todm/ui5-tooling-types
- Owner: todm
- Created: 2022-02-05T14:41:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-05T08:11:47.000Z (over 3 years ago)
- Last Synced: 2025-08-24T16:54:34.369Z (10 months ago)
- Topics: ui5, ui5-builder, ui5-cli, ui5-fs, ui5-logger, ui5-middleware, ui5-project, ui5-server, ui5-task, ui5-tooling
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UI5 Tooling Types
Typescript definition for UI5 Tooling
Includes definitions for
- [ui5-cli](https://github.com/SAP/ui5-cli)
- [ui5-project](https://github.com/SAP/ui5-project)
- [ui5-server](https://github.com/SAP/ui5-server)
- [ui5-builder](https://github.com/SAP/ui5-builder)
- [ui5-fs](https://github.com/SAP/ui5-fs)
- [ui5-logger](https://github.com/SAP/ui5-logger)
## Installation
Add the package with npm
```sh
npm i -D git+https://github.com/todm/ui5-tooling-types.git
```
Add the types to your ts-config file
```yaml
{ 'compilerOptions': {
# ...
'types': ['ui5-tooling-types']
} }
```
If you don't use typescript you can also reference the types in your `.js` files.
```
///
// ...
```
## Tasks and Middlewares
```typescript
// task.ts
import { TaskFunction } from '@ui5/builder';
const task: TaskFunction = ({ workspace, options }) => {
// workspace and options will have the correct types
};
module.exports = task;
```
```typescript
// middleware.ts
import { MiddlewareFunction } from '@ui5/server';
const middleware: MiddlewareFunction = ({ resources, options }) => {
// resources and options will have the correct types
return (req, res, next) => {
// req, res and next will have the correct types as well
};
};
module.exports = middleware;
```