7.13.1 • Published 9 months ago

@item-enonic-types/global v7.13.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Global types for Enonic XP

npm version

Note There is also an official package for Global types for XP.

This library provides backwards compatibility for the old enonic-types package while moving to the new types provided by Enonic.

Contents

The following global types:

  • XP.Controller
  • XP.Request
    • XP.ErrorRequest
    • XP.CustomSelectorServiceParams
  • XP.Response
    • XP.WebSocketResponse
    • XP.CustomSelectorServiceResponseBody
  • XP.MacroContext
  • XP.WebSocketEvent
    • XP.OpenWebSocketEvent
    • XP.MessageWebSocketEvent
    • XP.CloseWebSocketEvent

Use

To use these global types you need to update the types field in your tsconfig.json with this library.

{
  "baseUrl": "./",
  "paths": {
    "/lib/xp/*": ["node_modules/@enonic-types/lib-*"]
  },
+  "types": [
+    "@item-enonic-types/global"
+  ]
}