node-opcua-convert-nodeset-to-javascript 2.96.0 → 2.98.1

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.
@@ -1,183 +1,183 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.convertNamespaceTypeToTypescript = void 0;
13
- const path = require("path");
14
- const fs = require("fs");
15
- const node_opcua_constants_1 = require("node-opcua-constants");
16
- const walk_through_1 = require("./walk_through");
17
- const convert_to_typescript_1 = require("./convert_to_typescript");
18
- const cache_1 = require("./private/cache");
19
- function getPackageFolder(dependency, options) {
20
- const l = [...(options.lookupFolders || [])];
21
- l.push(path.join(__dirname, "../../"));
22
- for (const folder of l) {
23
- const d = path.join(folder, dependency + "/package.json");
24
- if (!fs.existsSync(d)) {
25
- continue;
26
- }
27
- return d;
28
- }
29
- throw new Error("cannot find package.json for " + dependency);
30
- }
31
- function getPackageInfo(dependency, options) {
32
- const d = getPackageFolder(dependency, options);
33
- const p = JSON.parse(fs.readFileSync(d, "utf8"));
34
- return p;
35
- }
36
- function convertNamespaceTypeToTypescript(session, namespaceIndex, options) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- if (namespaceIndex < 0) {
39
- throw new Error("namespaceIndex cannot be negative");
40
- }
41
- const cache = yield (0, cache_1.constructCache)(session, options);
42
- if (!fs.existsSync(options.baseFolder)) {
43
- fs.mkdirSync(options.baseFolder);
44
- }
45
- const infos = {};
46
- // walk through all Types:
47
- const nodeVisitor = {
48
- visit(reference, level) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- if (reference.nodeId.namespace !== namespaceIndex) {
51
- return;
52
- }
53
- cache.resetRequire();
54
- if (reference.nodeId.namespace === 0 && reference.nodeId.value === node_opcua_constants_1.DataTypeIds.Enumeration) {
55
- return; // ignore enumeration
56
- }
57
- const { type, content, folder, module, filename, dependencies } = yield (0, convert_to_typescript_1.convertTypeToTypescript)(session, reference.nodeId, options, cache);
58
- if (type === "basic") {
59
- return;
60
- }
61
- const _f = path.dirname(folder);
62
- if (!fs.existsSync(_f)) {
63
- fs.mkdirSync(_f);
64
- }
65
- if (!fs.existsSync(folder)) {
66
- fs.mkdirSync(folder);
67
- }
68
- const sourceFolder = path.join(folder, "source");
69
- if (!fs.existsSync(sourceFolder)) {
70
- fs.mkdirSync(sourceFolder);
71
- }
72
- fs.writeFileSync(path.join(sourceFolder, filename + ".ts"), content);
73
- infos[module] = infos[module] || { folder, dependencies: [], module, files: [] };
74
- infos[module].files.push(filename + ".ts");
75
- infos[module].dependencies = [...new Set([...infos[module].dependencies, ...dependencies])];
76
- });
77
- }
78
- };
79
- yield (0, walk_through_1.walkThroughObjectTypes)(session, nodeVisitor);
80
- yield (0, walk_through_1.walkThroughVariableTypes)(session, nodeVisitor);
81
- yield (0, walk_through_1.walkThroughDataTypes)(session, nodeVisitor);
82
- yield outputFiles(infos, options);
83
- });
84
- }
85
- exports.convertNamespaceTypeToTypescript = convertNamespaceTypeToTypescript;
86
- function _output_index_ts_file(info) {
87
- return __awaiter(this, void 0, void 0, function* () {
88
- const index = path.join(info.folder, "source/index.ts");
89
- const content = [];
90
- for (const file of info.files.sort()) {
91
- if (file.match(/^ua_property/)) {
92
- continue;
93
- }
94
- if (file.match(/^enum_eration/)) {
95
- continue;
96
- }
97
- content.push(`export * from "./${file.replace(".ts", "")}";`);
98
- }
99
- fs.writeFileSync(index, content.join("\n"));
100
- // create package.json
101
- });
102
- }
103
- function _output_package_json(info, options) {
104
- return __awaiter(this, void 0, void 0, function* () {
105
- const packagejson = path.join(info.folder, "package.json");
106
- const version = getPackageInfo("node-opcua-address-space-base", options).version;
107
- const content2 = [];
108
- content2.push(`{`);
109
- content2.push(` "name": "${info.module}",`);
110
- content2.push(` "version": "${version}",`);
111
- content2.push(` "description": "",`);
112
- content2.push(` "main": "dist/index.js",`);
113
- content2.push(` "types": "dist/index.d.ts",`);
114
- content2.push(` "scripts": {`);
115
- content2.push(` "build": "tsc -b"`);
116
- content2.push(` },`);
117
- content2.push(` "author": "etienne.rossignon@sterfive.com",`);
118
- content2.push(` "license": "MIT",`);
119
- content2.push(` "dependencies": {`);
120
- // find versions
121
- const versions = {};
122
- for (const dependency of info.dependencies) {
123
- const p = yield getPackageInfo(dependency, options);
124
- versions[dependency] = p.version;
125
- }
126
- content2.push(info.dependencies
127
- .sort()
128
- .map((d) => ` "${d}": "${versions[d]}"`)
129
- .join(",\n"));
130
- content2.push(` }`);
131
- content2.push(`}`);
132
- content2.push(``);
133
- fs.writeFileSync(packagejson, content2.join("\n"));
134
- });
135
- }
136
- function _output_tsconfig_json(info, options) {
137
- return __awaiter(this, void 0, void 0, function* () {
138
- const tsconfig = path.join(info.folder, "tsconfig.json");
139
- const content3 = [];
140
- content3.push(`{`);
141
- content3.push(` "extends": "../tsconfig.json",`);
142
- content3.push(` "compilerOptions": {`);
143
- content3.push(` "rootDir": "source",`);
144
- content3.push(` "outDir": "dist",`);
145
- content3.push(` "composite": true`);
146
- content3.push(` },`);
147
- content3.push(` "include": [`);
148
- content3.push(` "source/*.ts",`);
149
- content3.push(` ],`);
150
- content3.push(` "references": [`);
151
- // content3.push(` { "path": "../node-opcua-address-space-base" }`);
152
- const l = [];
153
- for (const dep of info.dependencies) {
154
- // only add in dep if not found in node_module
155
- if (!isIn_node_modules_Folder(dep)) {
156
- l.push(` { "path": "../${dep}" }`);
157
- }
158
- }
159
- content3.push(l.join(",\n"));
160
- content3.push(` ],`);
161
- content3.push(` "exclude": [`);
162
- content3.push(` "node_modules",`);
163
- content3.push(` "dist"`);
164
- content3.push(` ]`);
165
- content3.push(`}`);
166
- fs.writeFileSync(tsconfig, content3.join("\n"));
167
- function isIn_node_modules_Folder(dep) {
168
- const c = getPackageFolder(dep, options);
169
- return !!c.match(/node_modules/);
170
- }
171
- });
172
- }
173
- function outputFiles(infos, options) {
174
- return __awaiter(this, void 0, void 0, function* () {
175
- for (const info of Object.values(infos)) {
176
- // create indexes
177
- yield _output_index_ts_file(info);
178
- yield _output_package_json(info, options);
179
- yield _output_tsconfig_json(info, options);
180
- }
181
- });
182
- }
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.convertNamespaceTypeToTypescript = void 0;
13
+ const path = require("path");
14
+ const fs = require("fs");
15
+ const node_opcua_constants_1 = require("node-opcua-constants");
16
+ const walk_through_1 = require("./walk_through");
17
+ const convert_to_typescript_1 = require("./convert_to_typescript");
18
+ const cache_1 = require("./private/cache");
19
+ function getPackageFolder(dependency, options) {
20
+ const l = [...(options.lookupFolders || [])];
21
+ l.push(path.join(__dirname, "../../"));
22
+ for (const folder of l) {
23
+ const d = path.join(folder, dependency + "/package.json");
24
+ if (!fs.existsSync(d)) {
25
+ continue;
26
+ }
27
+ return d;
28
+ }
29
+ throw new Error("cannot find package.json for " + dependency);
30
+ }
31
+ function getPackageInfo(dependency, options) {
32
+ const d = getPackageFolder(dependency, options);
33
+ const p = JSON.parse(fs.readFileSync(d, "utf8"));
34
+ return p;
35
+ }
36
+ function convertNamespaceTypeToTypescript(session, namespaceIndex, options) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (namespaceIndex < 0) {
39
+ throw new Error("namespaceIndex cannot be negative");
40
+ }
41
+ const cache = yield (0, cache_1.constructCache)(session, options);
42
+ if (!fs.existsSync(options.baseFolder)) {
43
+ fs.mkdirSync(options.baseFolder);
44
+ }
45
+ const infos = {};
46
+ // walk through all Types:
47
+ const nodeVisitor = {
48
+ visit(reference, level) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ if (reference.nodeId.namespace !== namespaceIndex) {
51
+ return;
52
+ }
53
+ cache.resetRequire();
54
+ if (reference.nodeId.namespace === 0 && reference.nodeId.value === node_opcua_constants_1.DataTypeIds.Enumeration) {
55
+ return; // ignore enumeration
56
+ }
57
+ const { type, content, folder, module, filename, dependencies } = yield (0, convert_to_typescript_1.convertTypeToTypescript)(session, reference.nodeId, options, cache);
58
+ if (type === "basic") {
59
+ return;
60
+ }
61
+ const _f = path.dirname(folder);
62
+ if (!fs.existsSync(_f)) {
63
+ fs.mkdirSync(_f);
64
+ }
65
+ if (!fs.existsSync(folder)) {
66
+ fs.mkdirSync(folder);
67
+ }
68
+ const sourceFolder = path.join(folder, "source");
69
+ if (!fs.existsSync(sourceFolder)) {
70
+ fs.mkdirSync(sourceFolder);
71
+ }
72
+ fs.writeFileSync(path.join(sourceFolder, filename + ".ts"), content);
73
+ infos[module] = infos[module] || { folder, dependencies: [], module, files: [] };
74
+ infos[module].files.push(filename + ".ts");
75
+ infos[module].dependencies = [...new Set([...infos[module].dependencies, ...dependencies])];
76
+ });
77
+ }
78
+ };
79
+ yield (0, walk_through_1.walkThroughObjectTypes)(session, nodeVisitor);
80
+ yield (0, walk_through_1.walkThroughVariableTypes)(session, nodeVisitor);
81
+ yield (0, walk_through_1.walkThroughDataTypes)(session, nodeVisitor);
82
+ yield outputFiles(infos, options);
83
+ });
84
+ }
85
+ exports.convertNamespaceTypeToTypescript = convertNamespaceTypeToTypescript;
86
+ function _output_index_ts_file(info) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ const index = path.join(info.folder, "source/index.ts");
89
+ const content = [];
90
+ for (const file of info.files.sort()) {
91
+ if (file.match(/^ua_property/)) {
92
+ continue;
93
+ }
94
+ if (file.match(/^enum_eration/)) {
95
+ continue;
96
+ }
97
+ content.push(`export * from "./${file.replace(".ts", "")}";`);
98
+ }
99
+ fs.writeFileSync(index, content.join("\n"));
100
+ // create package.json
101
+ });
102
+ }
103
+ function _output_package_json(info, options) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ const packagejson = path.join(info.folder, "package.json");
106
+ const version = getPackageInfo("node-opcua-address-space-base", options).version;
107
+ const content2 = [];
108
+ content2.push(`{`);
109
+ content2.push(` "name": "${info.module}",`);
110
+ content2.push(` "version": "${version}",`);
111
+ content2.push(` "description": "",`);
112
+ content2.push(` "main": "dist/index.js",`);
113
+ content2.push(` "types": "dist/index.d.ts",`);
114
+ content2.push(` "scripts": {`);
115
+ content2.push(` "build": "tsc -b"`);
116
+ content2.push(` },`);
117
+ content2.push(` "author": "etienne.rossignon@sterfive.com",`);
118
+ content2.push(` "license": "MIT",`);
119
+ content2.push(` "dependencies": {`);
120
+ // find versions
121
+ const versions = {};
122
+ for (const dependency of info.dependencies) {
123
+ const p = yield getPackageInfo(dependency, options);
124
+ versions[dependency] = p.version;
125
+ }
126
+ content2.push(info.dependencies
127
+ .sort()
128
+ .map((d) => ` "${d}": "${versions[d]}"`)
129
+ .join(",\n"));
130
+ content2.push(` }`);
131
+ content2.push(`}`);
132
+ content2.push(``);
133
+ fs.writeFileSync(packagejson, content2.join("\n"));
134
+ });
135
+ }
136
+ function _output_tsconfig_json(info, options) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ const tsconfig = path.join(info.folder, "tsconfig.json");
139
+ const content3 = [];
140
+ content3.push(`{`);
141
+ content3.push(` "extends": "../tsconfig.json",`);
142
+ content3.push(` "compilerOptions": {`);
143
+ content3.push(` "rootDir": "source",`);
144
+ content3.push(` "outDir": "dist",`);
145
+ content3.push(` "composite": true`);
146
+ content3.push(` },`);
147
+ content3.push(` "include": [`);
148
+ content3.push(` "source/*.ts",`);
149
+ content3.push(` ],`);
150
+ content3.push(` "references": [`);
151
+ // content3.push(` { "path": "../node-opcua-address-space-base" }`);
152
+ const l = [];
153
+ for (const dep of info.dependencies) {
154
+ // only add in dep if not found in node_module
155
+ if (!isIn_node_modules_Folder(dep)) {
156
+ l.push(` { "path": "../${dep}" }`);
157
+ }
158
+ }
159
+ content3.push(l.join(",\n"));
160
+ content3.push(` ],`);
161
+ content3.push(` "exclude": [`);
162
+ content3.push(` "node_modules",`);
163
+ content3.push(` "dist"`);
164
+ content3.push(` ]`);
165
+ content3.push(`}`);
166
+ fs.writeFileSync(tsconfig, content3.join("\n"));
167
+ function isIn_node_modules_Folder(dep) {
168
+ const c = getPackageFolder(dep, options);
169
+ return !!c.match(/node_modules/);
170
+ }
171
+ });
172
+ }
173
+ function outputFiles(infos, options) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ for (const info of Object.values(infos)) {
176
+ // create indexes
177
+ yield _output_index_ts_file(info);
178
+ yield _output_package_json(info, options);
179
+ yield _output_tsconfig_json(info, options);
180
+ }
181
+ });
182
+ }
183
183
  //# sourceMappingURL=convert_namespace_to_typescript.js.map
@@ -1,105 +1,105 @@
1
- import { LocalizedText, NodeClass, QualifiedName } from "node-opcua-data-model";
2
- import { NodeId } from "node-opcua-nodeid";
3
- import { IBasicSession } from "node-opcua-pseudo-session";
4
- import { ReferenceDescription } from "node-opcua-types";
5
- import { LineFile } from "node-opcua-utils";
6
- import { DataType } from "node-opcua-variant";
7
- import { ModellingRuleType } from "node-opcua-address-space-base";
8
- import { Cache, Import } from "./private/cache";
9
- import { Options } from "./options";
10
- export declare function convertDataTypeToTypescript(session: IBasicSession, dataTypeId: NodeId): Promise<void>;
11
- interface ClassDefinition {
12
- nodeClass: NodeClass.VariableType | NodeClass.ObjectType;
13
- browseName: QualifiedName;
14
- isAbstract: boolean;
15
- description: LocalizedText;
16
- superType?: ReferenceDescription;
17
- baseClassDef?: ClassDefinition | null;
18
- children: ReferenceDescription[];
19
- members: ClassMember[];
20
- interfaceName: Import;
21
- baseInterfaceName: Import | null;
22
- dataTypeNodeId: NodeId | null;
23
- dataType: DataType;
24
- dataTypeName: string;
25
- dataTypeImport?: Import[];
26
- }
27
- export declare function makeTypeName2(nodeClass: NodeClass, browseName: QualifiedName, suffix?: string): Import;
28
- export declare function extractClassDefinition(session: IBasicSession, nodeId: NodeId, cache: Cache): Promise<ClassDefinition>;
29
- interface ClassMemberBasic {
30
- name: string;
31
- childType: Import;
32
- isOptional: boolean;
33
- modellingRule: ModellingRuleType | null;
34
- description: LocalizedText;
35
- suffix?: string;
36
- suffixInstantiate?: string;
37
- chevrons: any;
38
- typeToReference: Import[];
39
- }
40
- interface ClassMember extends ClassMemberBasic {
41
- /**
42
- * the OPCUA name of the class member
43
- */
44
- browseName: QualifiedName;
45
- nodeClass: NodeClass.Object | NodeClass.Method | NodeClass.Variable;
46
- /**
47
- * the Typescript name of the class Member
48
- */
49
- name: string;
50
- modellingRule: ModellingRuleType | null;
51
- isOptional: boolean;
52
- /**
53
- * class Def
54
- */
55
- classDef: ClassDefinition | null;
56
- description: LocalizedText;
57
- typeDefinition: ReferenceDescription;
58
- childType: Import;
59
- children: ReferenceDescription[];
60
- children2: ClassMemberBasic[];
61
- dataTypeNodeId?: NodeId | null;
62
- dataType?: DataType;
63
- jtype?: string;
64
- suffix?: string;
65
- suffix2?: string;
66
- suffix3?: string;
67
- innerClass?: Import | null;
68
- childBase?: Import | null;
69
- }
70
- interface ClassifiedReferenceDescriptions {
71
- Mandatory: ReferenceDescription[];
72
- Optional: ReferenceDescription[];
73
- MandatoryPlaceholder: ReferenceDescription[];
74
- OptionalPlaceholder: ReferenceDescription[];
75
- ExposesItsArray: ReferenceDescription[];
76
- }
77
- export declare function findClassMember(session: IBasicSession, browseName: QualifiedName, baseParentDef: ClassDefinition, cache: Cache): Promise<ClassMember | null>;
78
- export declare function checkIfShouldExposeInnerDefinition(main: ClassifiedReferenceDescriptions, instance: ClassifiedReferenceDescriptions): boolean;
79
- interface ClassDefinitionB {
80
- superType?: {
81
- nodeId: NodeId;
82
- };
83
- interfaceName: Import;
84
- baseClassDef?: ClassDefinition | null;
85
- }
86
- export declare function extractClassMemberDef(session: IBasicSession, nodeId: NodeId, parentDef: ClassDefinitionB, cache: Cache): Promise<ClassMember>;
87
- export declare function findUsedImport(namespaceIndex: number, cache: Cache): string[];
88
- export declare type Type = "enum" | "basic" | "structure" | "ua";
89
- /**
90
- * nodeId : a DataType, ReferenceType,AObjectType, VariableType node
91
- */
92
- export declare function _convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
93
- type: Type;
94
- content: string;
95
- typeName: string;
96
- }>;
97
- export declare function convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, options: Options, cache?: Cache, f?: LineFile): Promise<{
98
- type: Type;
99
- content: string;
100
- module: string;
101
- folder: string;
102
- filename: string;
103
- dependencies: string[];
104
- }>;
105
- export {};
1
+ import { LocalizedText, NodeClass, QualifiedName } from "node-opcua-data-model";
2
+ import { NodeId } from "node-opcua-nodeid";
3
+ import { IBasicSession } from "node-opcua-pseudo-session";
4
+ import { ReferenceDescription } from "node-opcua-types";
5
+ import { LineFile } from "node-opcua-utils";
6
+ import { DataType } from "node-opcua-variant";
7
+ import { ModellingRuleType } from "node-opcua-address-space-base";
8
+ import { Cache, Import } from "./private/cache";
9
+ import { Options } from "./options";
10
+ export declare function convertDataTypeToTypescript(session: IBasicSession, dataTypeId: NodeId): Promise<void>;
11
+ interface ClassDefinition {
12
+ nodeClass: NodeClass.VariableType | NodeClass.ObjectType;
13
+ browseName: QualifiedName;
14
+ isAbstract: boolean;
15
+ description: LocalizedText;
16
+ superType?: ReferenceDescription;
17
+ baseClassDef?: ClassDefinition | null;
18
+ children: ReferenceDescription[];
19
+ members: ClassMember[];
20
+ interfaceName: Import;
21
+ baseInterfaceName: Import | null;
22
+ dataTypeNodeId: NodeId | null;
23
+ dataType: DataType;
24
+ dataTypeName: string;
25
+ dataTypeImport?: Import[];
26
+ }
27
+ export declare function makeTypeName2(nodeClass: NodeClass, browseName: QualifiedName, suffix?: string): Import;
28
+ export declare function extractClassDefinition(session: IBasicSession, nodeId: NodeId, cache: Cache): Promise<ClassDefinition>;
29
+ interface ClassMemberBasic {
30
+ name: string;
31
+ childType: Import;
32
+ isOptional: boolean;
33
+ modellingRule: ModellingRuleType | null;
34
+ description: LocalizedText;
35
+ suffix?: string;
36
+ suffixInstantiate?: string;
37
+ chevrons: any;
38
+ typeToReference: Import[];
39
+ }
40
+ interface ClassMember extends ClassMemberBasic {
41
+ /**
42
+ * the OPCUA name of the class member
43
+ */
44
+ browseName: QualifiedName;
45
+ nodeClass: NodeClass.Object | NodeClass.Method | NodeClass.Variable;
46
+ /**
47
+ * the Typescript name of the class Member
48
+ */
49
+ name: string;
50
+ modellingRule: ModellingRuleType | null;
51
+ isOptional: boolean;
52
+ /**
53
+ * class Def
54
+ */
55
+ classDef: ClassDefinition | null;
56
+ description: LocalizedText;
57
+ typeDefinition: ReferenceDescription;
58
+ childType: Import;
59
+ children: ReferenceDescription[];
60
+ children2: ClassMemberBasic[];
61
+ dataTypeNodeId?: NodeId | null;
62
+ dataType?: DataType;
63
+ jtype?: string;
64
+ suffix?: string;
65
+ suffix2?: string;
66
+ suffix3?: string;
67
+ innerClass?: Import | null;
68
+ childBase?: Import | null;
69
+ }
70
+ interface ClassifiedReferenceDescriptions {
71
+ Mandatory: ReferenceDescription[];
72
+ Optional: ReferenceDescription[];
73
+ MandatoryPlaceholder: ReferenceDescription[];
74
+ OptionalPlaceholder: ReferenceDescription[];
75
+ ExposesItsArray: ReferenceDescription[];
76
+ }
77
+ export declare function findClassMember(session: IBasicSession, browseName: QualifiedName, baseParentDef: ClassDefinition, cache: Cache): Promise<ClassMember | null>;
78
+ export declare function checkIfShouldExposeInnerDefinition(main: ClassifiedReferenceDescriptions, instance: ClassifiedReferenceDescriptions): boolean;
79
+ interface ClassDefinitionB {
80
+ superType?: {
81
+ nodeId: NodeId;
82
+ };
83
+ interfaceName: Import;
84
+ baseClassDef?: ClassDefinition | null;
85
+ }
86
+ export declare function extractClassMemberDef(session: IBasicSession, nodeId: NodeId, parentDef: ClassDefinitionB, cache: Cache): Promise<ClassMember>;
87
+ export declare function findUsedImport(namespaceIndex: number, cache: Cache): string[];
88
+ export type Type = "enum" | "basic" | "structure" | "ua";
89
+ /**
90
+ * nodeId : a DataType, ReferenceType,AObjectType, VariableType node
91
+ */
92
+ export declare function _convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
93
+ type: Type;
94
+ content: string;
95
+ typeName: string;
96
+ }>;
97
+ export declare function convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, options: Options, cache?: Cache, f?: LineFile): Promise<{
98
+ type: Type;
99
+ content: string;
100
+ module: string;
101
+ folder: string;
102
+ filename: string;
103
+ dependencies: string[];
104
+ }>;
105
+ export {};