Framework
getState()
Function: getState()
function getState(): IpcState | nullGets the current IPC state from state.json written by the host.
Returns
IpcState | null
The IPC state or null if not available
Example
import { getState } from 'robo.js/ipc'
const state = getState()
if (state) {
console.log(`Running in ${state.env.type}`)
}