Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UI5 Tooling Types

Typescript definition for UI5 Tooling

Includes definitions for

Installation

Add the package with npm

npm i -D git+https://github.com/todm/ui5-tooling-types.git

Add the types to your ts-config file

{ 'compilerOptions': {
            # ...
            'types': ['ui5-tooling-types']
        } }

If you don't use typescript you can also reference the types in your .js files.

/// <reference types="ui5-tooling-types" />
// ...

Tasks and Middlewares

// task.ts
import { TaskFunction } from '@ui5/builder';

const task: TaskFunction = ({ workspace, options }) => {
    // workspace and options will have the correct types
};
module.exports = task;
// 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;