export interface ContextValue { maxDocWidth : number ; minDocWidth : number ; } let context = { maxDocWidth : 576 , minDocWidth : 312 , } ; param envValue export function setContextValue ( value ) { if ( typeof context === "object" ) { context = { ... context , ... value } ; } } param key returns export function getContextValue ( key ? ) { if ( key && typeof key === "string" ) { return context [ key ] ; } return context ; }