import { BasicAppSettings , FioriApp , FreestyleApp , TemplateType } from './types' ; param app function setAppDefaults ( app ) { app . flpAppId = app . flpAppId || `${ app . id . replace ( /[-_.]/g , '' ) }-tile` ; } param settings function setBasicTemplateDefaults ( settings ) { settings . viewName = settings . viewName || 'View1' ; } param ffApp export function setDefaults ( ffApp ) { setAppDefaults ( ffApp . app ) ; if ( ffApp . template . type === TemplateType . Basic ) { setBasicTemplateDefaults ( ffApp . template . settings as BasicAppSettings ) ; } }