-import type { BaseConfig } from '@/types'
+import type { ConfigurationData } from '@/types'
-const config: BaseConfig = {
+const configuration: ConfigurationData = {
uiServer: {
host: 'localhost',
port: 8080,
}
}
-export default config
+export default configuration
type ResponsePayload,
ResponseStatus
} from '@/types'
-import config from '@/assets/config'
+import configuration from '@/assets/config'
type ResponseHandler = {
procedureName: ProcedureName
private openWS(): void {
this.ws = new WebSocket(
- `ws://${config.uiServer.host}:${config.uiServer.port}`,
- config.uiServer.protocol
+ `ws://${configuration.uiServer.host}:${configuration.uiServer.port}`,
+ configuration.uiServer.protocol
)
this.ws.onmessage = this.responseHandler.bind(this)
this.ws.onerror = errorEvent => {
-export type BaseConfig = {
- uiServer: UIServerConfig
+export type ConfigurationData = {
+ uiServer: UIServerConfigurationSection
}
-type UIServerConfig = {
+type UIServerConfigurationSection = {
host: string
port: number
protocol: string
ChargingStationInfo,
ConnectorStatus
} from './ChargingStationType'
-export type { BaseConfig } from './ConfigurationType'
+export type { ConfigurationData } from './ConfigurationType'
export {
ProcedureName,
type ProtocolResponse,