interface DocvalueField { field : string ; [ key ] : unknown ; } export function filterDocvalueFields ( docvalueFields , fields ) { return docvalueFields . filter ( ( docValue ) => { const docvalueFieldName = typeof docValue === 'string' ? docValue : docValue . field ; return fields . includes ( docvalueFieldName ) ; } ) ; }