module import { QualifiedName , QualifiedNameLike , QualifiedNameOptions } from "./qualified_name" ; export function isDataEncoding ( dataEncoding ) { return ! ! dataEncoding && typeof dataEncoding === "object" && typeof ( dataEncoding as any ) . name === "string" ; } const validEncoding = [ "DefaultBinary" , "DefaultXml" , "DefaultJson" ] ; export function isValidDataEncoding ( dataEncoding ? ) { if ( ! dataEncoding ) { return true ; } if ( Object . prototype . hasOwnProperty . call ( dataEncoding as any , "name" ) ) { dataEncoding = ( dataEncoding as QualifiedNameOptions ) . name ; } if ( ! dataEncoding ) { return true ; } return validEncoding . indexOf ( dataEncoding as string ) !== - 1 ; }