UNPKG

475 BPlain TextView Raw
1
2/**
3 * Static session for a command session. This can be static as it is for a command line.
4 *
5 * Note: When vdev used as an API (not main use-case for now) command session will need to be redesigned.
6 */
7type SessionState = 'NO_LOCAL_REGISTRY';
8
9
10const currentStates = new Set<SessionState>();
11
12export function addSessionState(state: SessionState) {
13 currentStates.add(state);
14}
15
16export function hasSessionState(state: SessionState) {
17 return currentStates.has(state);
18}
\No newline at end of file