@enonic-types/lib-static
v2.0.0
Published
Type definition for the Enonic XP library for serving static assets
Downloads
252
Readme
Types for Static asset library
Install
npm i --save-dev @enonic-types/lib-static
Setup
Add lib-static to compilerOptions.paths in the tsconfig.json file:
{
"compilerOptions": {
"paths": {
"/lib/enonic/static": ["node_modules/@enonic-types/lib-static"],
}
}
}
Use
import {requestHandler} from '/lib/enonic/static';
All imports from /lib/enonic/static should now be typed.