let CURRENT = 'NULL' ; type CurrentAuthorityType = string | string [ ] | ( ( ) => typeof CURRENT ) ; param { string | ( ) => String } currentAuthority const renderAuthorize = < T > ( Authorized ) : ( ( currentAuthority : CurrentAuthorityType ) => T ) => ( currentAuthority ) : T => { if ( currentAuthority ) { if ( typeof currentAuthority === 'function' ) { CURRENT = currentAuthority ( ) ; } if ( Object . prototype . toString . call ( currentAuthority ) === '[object String]' || Array . isArray ( currentAuthority ) ) { CURRENT = currentAuthority as string [ ] ; } } else { CURRENT = 'NULL' ; } return Authorized ; } ; export { CURRENT } ; export default < T > ( Authorized ) => renderAuthorize < T > ( Authorized ) ;