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