module import { Enum } from "node-opcua-enum" ; import { registerEnumeration } from "node-opcua-factory" ; export enum ResultMask { ReferenceType = 0x01 , IsForward = 0x02 , NodeClass = 0x04 , BrowseName = 0x08 , DisplayName = 0x10 , TypeDefinition = 0x20 } export const schemaResultMask = { name : "ResultMask" , enumValues : ResultMask } ; export const _enumerationResultMask = registerEnumeration ( schemaResultMask ) ; export function makeResultMask ( str ) { const flags = str . split ( " | " ) ; let r = 0 ; for ( const flag of flags ) { r |= ( ResultMask as any ) [ flag ] ; } return r as ResultMask ; }