import { Config } from '../../setup' ; export enum ApiLevel { Trigger = 2 , Call = 1 } const Level = Symbol ( 'Api level refs' ) ; interface LevelRefs { [ k ] : object | undefined ; } declare module '../../setup' { interface Config { [ Level ] ? : LevelRefs ; } } export function setLevelRef ( config , level ) { config [ Level ] ??= { } ; ( config [ Level ] as LevelRefs ) [ level ] = { } ; } export function getLevelRef ( config , level ) { return config [ Level ] ?. [ level ] ; }