import type { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream"; import { type BasicTypeDefinition, type BasicTypeDefinitionOptions, type BasicTypeDefinitionOptionsBase, type CommonInterface, FieldCategory, type TypeSchemaConstructorOptions } from "./types.js"; /** * a type Schema for a OPCUA object */ export declare class TypeSchemaBase implements CommonInterface { name: string; defaultValue: unknown; encode?(value: unknown, stream: OutputBinaryStream): void; decode?(stream: BinaryStream): unknown; coerce?(value: unknown): unknown; toJSON?(): string; category: FieldCategory; subType: string; isAbstract: boolean; constructor(options: TypeSchemaConstructorOptions); /** * @param defaultValue {*} the default value * @return {*} */ computer_default_value(defaultValue: unknown): unknown; getBaseType(): CommonInterface | null; isSubTypeOf(type: CommonInterface): boolean; } export declare class BasicTypeSchema extends TypeSchemaBase implements BasicTypeDefinition { subType: string; isAbstract: boolean; encode: (value: unknown, stream: OutputBinaryStream) => void; decode: (stream: BinaryStream) => unknown; constructor(options: BasicTypeDefinitionOptions); } type RegistryChangeHandler = () => void; /** * @param schema {TypeSchemaBase} */ export declare function registerType(schema: BasicTypeDefinitionOptionsBase): void; export declare const registerBuiltInType: typeof registerType; export declare function unregisterType(typeName: string): void; /** * subscribe to changes of the built-in type registry. * * Callers that memoise a lookup derived from this registry - node-opcua-variant caches * the encode/decode function per DataType - need to drop their cache when a type is * registered or unregistered, or they keep serving a stale function. Registration * happens at module-eval time today, but registerType and unregisterType are public * API and nothing stops a consumer calling them later. * * Handlers must be cheap: they run on every registration. */ export declare function onBuiltInTypeRegistryChanged(handler: RegistryChangeHandler): void; export declare function getBuiltInType(name: string): TypeSchemaBase; export declare function hasBuiltInType(name: string): boolean; /** */ export declare function findBuiltInType(dataTypeName: string): BasicTypeDefinition; export {}; //# sourceMappingURL=builtin_types.d.ts.map