@wippy-fe/types-global-proxy
v0.0.20
Published
Global type declarations for Wippy iframe proxy (window.getWippyApi, $W, etc.)
Readme
@wippy-fe/types-global-proxy
TypeScript ambient declarations for the Wippy iframe proxy globals.
Installation
npm install -D @wippy-fe/types-global-proxyWhat it declares
window.getWippyApi()— returnsPromise<ProxyApiInstance>window.$W.*— lazy async accessors forconfig,api,host,on,state,ws,loadWebComponentwindow.__WIPPY_APP_CONFIG__—AppConfigwindow.__WIPPY_APP_API__—ProxyApiInstancewindow.__WIPPY_PROXY_CONFIG__—ProxyConfig
Exported types
ProxyApiInstance, AppConfig, AppFeatures, AppCustomization, StateApi, ProxyWsApi, WsMessage, WsCommand, Artifact, PageApi, UploadApi, ApiRoutes, and all WebSocket message/topic types.
Usage
Add to your tsconfig.json:
{
"compilerOptions": {
"types": ["@wippy-fe/types-global-proxy"]
}
}Or use a triple-slash reference:
/// <reference types="@wippy-fe/types-global-proxy" />