node-opcua-factory 2.76.2 → 2.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/source/types.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
5
5
  import { Enum } from "node-opcua-enum";
6
6
  import { ExpandedNodeId, NodeId } from "node-opcua-nodeid";
7
+ import { DataTypeFactory } from "./datatype_factory";
7
8
 
8
9
  export enum FieldCategory {
9
10
  enumeration = "enumeration",
@@ -72,7 +73,7 @@ export interface IBaseUAObject {
72
73
  decodeDebug(stream: BinaryStream, options: DecodeDebugOptions): void;
73
74
  clone(): IBaseUAObject;
74
75
  }
75
- type BaseUAObjectConstructable = new (options?: any) => IBaseUAObject;
76
+ type BaseUAObjectConstructable = new (options?: Record<string, unknown>) => IBaseUAObject;
76
77
  export type ConstructorFunc = BaseUAObjectConstructable;
77
78
  // new (...args: any[]) => BaseUAObjectConstructable;
78
79
 
@@ -127,13 +128,14 @@ export type DefaultValueFunc = () => any;
127
128
 
128
129
  export interface StructuredTypeOptions {
129
130
  name: string;
130
- id?: number | NodeId;
131
131
  fields: FieldInterfaceOptions[];
132
132
  documentation?: string;
133
133
  baseType: string;
134
+ category?: FieldCategory;
134
135
  _resolved?: boolean;
135
- bitFields?: any[];
136
- base?: StructuredTypeOptions;
136
+ bitFields?: { name: string, length: number }[];
137
+ deprecated_base?: StructuredTypeOptions;
138
+ dataTypeFactory: DataTypeFactory;
137
139
  }
138
140
 
139
141
  export interface TypeSchemaConstructorOptions {
@@ -174,16 +176,18 @@ export interface EnumerationDefinition extends CommonInterface {
174
176
  }
175
177
 
176
178
  export type TypeDefinition = BuiltInTypeDefinition | EnumerationDefinition | BasicTypeDefinition | CommonInterface;
177
-
179
+ export interface BitField {
180
+ name: string;
181
+ length: number;
182
+ }
178
183
  export interface IStructuredTypeSchema extends CommonInterface {
179
184
  fields: FieldType[];
180
- id: NodeId;
181
185
  dataTypeNodeId: NodeId;
182
-
183
186
  baseType: string;
184
- _possibleFields: string[];
185
- _baseSchema: IStructuredTypeSchema | null;
186
-
187
+
188
+ getBaseSchema(): IStructuredTypeSchema | null;
189
+ getDataTypeFactory(): DataTypeFactory;
190
+
187
191
  documentation?: string;
188
192
 
189
193
  isValid?: (options: any) => boolean;
@@ -195,5 +199,5 @@ export interface IStructuredTypeSchema extends CommonInterface {
195
199
  encodingDefaultXml?: ExpandedNodeId;
196
200
  encodingDefaultJson?: ExpandedNodeId;
197
201
 
198
- bitFields?: any[];
202
+ bitFields?: BitField[];
199
203
  }