node-opcua-convert-nodeset-to-javascript 2.70.3 → 2.71.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.
@@ -1,3 +1,3 @@
1
- import { IBasicSession } from "node-opcua-pseudo-session";
2
- import { Options } from "./options";
3
- export declare function convertNamespaceTypeToTypescript(session: IBasicSession, namespaceIndex: number, options: Options): Promise<void>;
1
+ import { IBasicSession } from "node-opcua-pseudo-session";
2
+ import { Options } from "./options";
3
+ export declare function convertNamespaceTypeToTypescript(session: IBasicSession, namespaceIndex: number, options: Options): Promise<void>;
@@ -1,173 +1,173 @@
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 getPackageInfo(dependency, options) {
20
- //xx console.log("getPackageInfo", dependency);
21
- const l = [...(options.lookupFolders || [])];
22
- l.push(path.join(__dirname, "../../"));
23
- for (const folder of l) {
24
- const d = path.join(folder, dependency + "/package.json");
25
- if (!fs.existsSync(d)) {
26
- continue;
27
- }
28
- const p = JSON.parse(fs.readFileSync(d, "utf8"));
29
- return p;
30
- }
31
- throw new Error("cannot find package.json for " + dependency);
32
- }
33
- function convertNamespaceTypeToTypescript(session, namespaceIndex, options) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- if (namespaceIndex < 0) {
36
- throw new Error("namespaceIndex cannot be negative");
37
- }
38
- const cache = yield (0, cache_1.constructCache)(session, options);
39
- if (!fs.existsSync(options.baseFolder)) {
40
- fs.mkdirSync(options.baseFolder);
41
- }
42
- const infos = {};
43
- // walk through all Types:
44
- const nodeVisitor = {
45
- visit(reference, level) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- if (reference.nodeId.namespace !== namespaceIndex) {
48
- return;
49
- }
50
- cache.resetRequire();
51
- if (reference.nodeId.namespace === 0 && reference.nodeId.value === node_opcua_constants_1.DataTypeIds.Enumeration) {
52
- return; // ignore enumeration
53
- }
54
- const { type, content, folder, module, filename, dependencies } = yield (0, convert_to_typescript_1.convertTypeToTypescript)(session, reference.nodeId, options, cache);
55
- if (type === "basic") {
56
- return;
57
- }
58
- const _f = path.dirname(folder);
59
- if (!fs.existsSync(_f)) {
60
- fs.mkdirSync(_f);
61
- }
62
- if (!fs.existsSync(folder)) {
63
- fs.mkdirSync(folder);
64
- }
65
- const sourceFolder = path.join(folder, "source");
66
- if (!fs.existsSync(sourceFolder)) {
67
- fs.mkdirSync(sourceFolder);
68
- }
69
- fs.writeFileSync(path.join(sourceFolder, filename + ".ts"), content);
70
- infos[module] = infos[module] || { folder, dependencies: [], module, files: [] };
71
- infos[module].files.push(filename + ".ts");
72
- infos[module].dependencies = [...new Set([...infos[module].dependencies, ...dependencies])];
73
- });
74
- }
75
- };
76
- yield (0, walk_through_1.walkThroughObjectTypes)(session, nodeVisitor);
77
- yield (0, walk_through_1.walkThroughVariableTypes)(session, nodeVisitor);
78
- yield (0, walk_through_1.walkThroughDataTypes)(session, nodeVisitor);
79
- yield outputFiles(infos, options);
80
- });
81
- }
82
- exports.convertNamespaceTypeToTypescript = convertNamespaceTypeToTypescript;
83
- function _output_index_ts_file(info) {
84
- return __awaiter(this, void 0, void 0, function* () {
85
- const index = path.join(info.folder, "source/index.ts");
86
- const content = [];
87
- for (const file of info.files.sort()) {
88
- if (file.match(/^ua_property/)) {
89
- continue;
90
- }
91
- if (file.match(/^enum_eration/)) {
92
- continue;
93
- }
94
- content.push(`export * from "./${file.replace(".ts", "")}";`);
95
- }
96
- fs.writeFileSync(index, content.join("\n"));
97
- // create package.json
98
- });
99
- }
100
- function _output_package_json(info, options) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- const packagejson = path.join(info.folder, "package.json");
103
- const version = getPackageInfo("node-opcua-address-space-base", options).version;
104
- const content2 = [];
105
- content2.push(`{`);
106
- content2.push(` "name": "${info.module}",`);
107
- content2.push(` "version": "${version}",`);
108
- content2.push(` "description": "",`);
109
- content2.push(` "main": "dist/index.js",`);
110
- content2.push(` "types": "dist/index.d.ts",`);
111
- content2.push(` "scripts": {`);
112
- content2.push(` "build": "tsc -b"`);
113
- content2.push(` },`);
114
- content2.push(` "author": "etienne.rossignon@sterfive.com",`);
115
- content2.push(` "license": "MIT",`);
116
- content2.push(` "dependencies": {`);
117
- // find versions
118
- const versions = {};
119
- for (const dependency of info.dependencies) {
120
- const p = yield getPackageInfo(dependency, options);
121
- versions[dependency] = p.version;
122
- }
123
- content2.push(info.dependencies
124
- .sort()
125
- .map((d) => ` "${d}": "${versions[d]}"`)
126
- .join(",\n"));
127
- content2.push(` }`);
128
- content2.push(`}`);
129
- content2.push(``);
130
- fs.writeFileSync(packagejson, content2.join("\n"));
131
- });
132
- }
133
- function _output_tsconfig_json(info) {
134
- return __awaiter(this, void 0, void 0, function* () {
135
- const tsconfig = path.join(info.folder, "tsconfig.json");
136
- const content3 = [];
137
- content3.push(`{`);
138
- content3.push(` "extends": "../tsconfig.json",`);
139
- content3.push(` "compilerOptions": {`);
140
- content3.push(` "rootDir": "source",`);
141
- content3.push(` "outDir": "dist",`);
142
- content3.push(` "composite": true`);
143
- content3.push(` },`);
144
- content3.push(` "include": [`);
145
- content3.push(` "source/*.ts",`);
146
- content3.push(` ],`);
147
- content3.push(` "references": [`);
148
- // content3.push(` { "path": "../node-opcua-address-space-base" }`);
149
- const l = [];
150
- for (const dep of info.dependencies) {
151
- l.push(` { "path": "../${dep}" }`);
152
- }
153
- content3.push(l.join(",\n"));
154
- content3.push(` ],`);
155
- content3.push(` "exclude": [`);
156
- content3.push(` "node_modules",`);
157
- content3.push(` "dist"`);
158
- content3.push(` ]`);
159
- content3.push(`}`);
160
- fs.writeFileSync(tsconfig, content3.join("\n"));
161
- });
162
- }
163
- function outputFiles(infos, options) {
164
- return __awaiter(this, void 0, void 0, function* () {
165
- for (const info of Object.values(infos)) {
166
- // create indexes
167
- yield _output_index_ts_file(info);
168
- yield _output_package_json(info, options);
169
- yield _output_tsconfig_json(info);
170
- }
171
- });
172
- }
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 getPackageInfo(dependency, options) {
20
+ //xx console.log("getPackageInfo", dependency);
21
+ const l = [...(options.lookupFolders || [])];
22
+ l.push(path.join(__dirname, "../../"));
23
+ for (const folder of l) {
24
+ const d = path.join(folder, dependency + "/package.json");
25
+ if (!fs.existsSync(d)) {
26
+ continue;
27
+ }
28
+ const p = JSON.parse(fs.readFileSync(d, "utf8"));
29
+ return p;
30
+ }
31
+ throw new Error("cannot find package.json for " + dependency);
32
+ }
33
+ function convertNamespaceTypeToTypescript(session, namespaceIndex, options) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (namespaceIndex < 0) {
36
+ throw new Error("namespaceIndex cannot be negative");
37
+ }
38
+ const cache = yield (0, cache_1.constructCache)(session, options);
39
+ if (!fs.existsSync(options.baseFolder)) {
40
+ fs.mkdirSync(options.baseFolder);
41
+ }
42
+ const infos = {};
43
+ // walk through all Types:
44
+ const nodeVisitor = {
45
+ visit(reference, level) {
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ if (reference.nodeId.namespace !== namespaceIndex) {
48
+ return;
49
+ }
50
+ cache.resetRequire();
51
+ if (reference.nodeId.namespace === 0 && reference.nodeId.value === node_opcua_constants_1.DataTypeIds.Enumeration) {
52
+ return; // ignore enumeration
53
+ }
54
+ const { type, content, folder, module, filename, dependencies } = yield (0, convert_to_typescript_1.convertTypeToTypescript)(session, reference.nodeId, options, cache);
55
+ if (type === "basic") {
56
+ return;
57
+ }
58
+ const _f = path.dirname(folder);
59
+ if (!fs.existsSync(_f)) {
60
+ fs.mkdirSync(_f);
61
+ }
62
+ if (!fs.existsSync(folder)) {
63
+ fs.mkdirSync(folder);
64
+ }
65
+ const sourceFolder = path.join(folder, "source");
66
+ if (!fs.existsSync(sourceFolder)) {
67
+ fs.mkdirSync(sourceFolder);
68
+ }
69
+ fs.writeFileSync(path.join(sourceFolder, filename + ".ts"), content);
70
+ infos[module] = infos[module] || { folder, dependencies: [], module, files: [] };
71
+ infos[module].files.push(filename + ".ts");
72
+ infos[module].dependencies = [...new Set([...infos[module].dependencies, ...dependencies])];
73
+ });
74
+ }
75
+ };
76
+ yield (0, walk_through_1.walkThroughObjectTypes)(session, nodeVisitor);
77
+ yield (0, walk_through_1.walkThroughVariableTypes)(session, nodeVisitor);
78
+ yield (0, walk_through_1.walkThroughDataTypes)(session, nodeVisitor);
79
+ yield outputFiles(infos, options);
80
+ });
81
+ }
82
+ exports.convertNamespaceTypeToTypescript = convertNamespaceTypeToTypescript;
83
+ function _output_index_ts_file(info) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ const index = path.join(info.folder, "source/index.ts");
86
+ const content = [];
87
+ for (const file of info.files.sort()) {
88
+ if (file.match(/^ua_property/)) {
89
+ continue;
90
+ }
91
+ if (file.match(/^enum_eration/)) {
92
+ continue;
93
+ }
94
+ content.push(`export * from "./${file.replace(".ts", "")}";`);
95
+ }
96
+ fs.writeFileSync(index, content.join("\n"));
97
+ // create package.json
98
+ });
99
+ }
100
+ function _output_package_json(info, options) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ const packagejson = path.join(info.folder, "package.json");
103
+ const version = getPackageInfo("node-opcua-address-space-base", options).version;
104
+ const content2 = [];
105
+ content2.push(`{`);
106
+ content2.push(` "name": "${info.module}",`);
107
+ content2.push(` "version": "${version}",`);
108
+ content2.push(` "description": "",`);
109
+ content2.push(` "main": "dist/index.js",`);
110
+ content2.push(` "types": "dist/index.d.ts",`);
111
+ content2.push(` "scripts": {`);
112
+ content2.push(` "build": "tsc -b"`);
113
+ content2.push(` },`);
114
+ content2.push(` "author": "etienne.rossignon@sterfive.com",`);
115
+ content2.push(` "license": "MIT",`);
116
+ content2.push(` "dependencies": {`);
117
+ // find versions
118
+ const versions = {};
119
+ for (const dependency of info.dependencies) {
120
+ const p = yield getPackageInfo(dependency, options);
121
+ versions[dependency] = p.version;
122
+ }
123
+ content2.push(info.dependencies
124
+ .sort()
125
+ .map((d) => ` "${d}": "${versions[d]}"`)
126
+ .join(",\n"));
127
+ content2.push(` }`);
128
+ content2.push(`}`);
129
+ content2.push(``);
130
+ fs.writeFileSync(packagejson, content2.join("\n"));
131
+ });
132
+ }
133
+ function _output_tsconfig_json(info) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ const tsconfig = path.join(info.folder, "tsconfig.json");
136
+ const content3 = [];
137
+ content3.push(`{`);
138
+ content3.push(` "extends": "../tsconfig.json",`);
139
+ content3.push(` "compilerOptions": {`);
140
+ content3.push(` "rootDir": "source",`);
141
+ content3.push(` "outDir": "dist",`);
142
+ content3.push(` "composite": true`);
143
+ content3.push(` },`);
144
+ content3.push(` "include": [`);
145
+ content3.push(` "source/*.ts",`);
146
+ content3.push(` ],`);
147
+ content3.push(` "references": [`);
148
+ // content3.push(` { "path": "../node-opcua-address-space-base" }`);
149
+ const l = [];
150
+ for (const dep of info.dependencies) {
151
+ l.push(` { "path": "../${dep}" }`);
152
+ }
153
+ content3.push(l.join(",\n"));
154
+ content3.push(` ],`);
155
+ content3.push(` "exclude": [`);
156
+ content3.push(` "node_modules",`);
157
+ content3.push(` "dist"`);
158
+ content3.push(` ]`);
159
+ content3.push(`}`);
160
+ fs.writeFileSync(tsconfig, content3.join("\n"));
161
+ });
162
+ }
163
+ function outputFiles(infos, options) {
164
+ return __awaiter(this, void 0, void 0, function* () {
165
+ for (const info of Object.values(infos)) {
166
+ // create indexes
167
+ yield _output_index_ts_file(info);
168
+ yield _output_package_json(info, options);
169
+ yield _output_tsconfig_json(info);
170
+ }
171
+ });
172
+ }
173
173
  //# sourceMappingURL=convert_namespace_to_typescript.js.map
@@ -1,110 +1,110 @@
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
- export declare function _exportDataTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
90
- type: Type;
91
- content: string;
92
- typeName: string;
93
- }>;
94
- /**
95
- * nodeId : a DataType, ReferenceType,AObjectType, VariableType node
96
- */
97
- export declare function _convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
98
- type: Type;
99
- content: string;
100
- typeName: string;
101
- }>;
102
- export declare function convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, options: Options, cache?: Cache, f?: LineFile): Promise<{
103
- type: Type;
104
- content: string;
105
- module: string;
106
- folder: string;
107
- filename: string;
108
- dependencies: string[];
109
- }>;
110
- 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 declare type Type = "enum" | "basic" | "structure" | "ua";
89
+ export declare function _exportDataTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
90
+ type: Type;
91
+ content: string;
92
+ typeName: string;
93
+ }>;
94
+ /**
95
+ * nodeId : a DataType, ReferenceType,AObjectType, VariableType node
96
+ */
97
+ export declare function _convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, cache: Cache, f?: LineFile): Promise<{
98
+ type: Type;
99
+ content: string;
100
+ typeName: string;
101
+ }>;
102
+ export declare function convertTypeToTypescript(session: IBasicSession, nodeId: NodeId, options: Options, cache?: Cache, f?: LineFile): Promise<{
103
+ type: Type;
104
+ content: string;
105
+ module: string;
106
+ folder: string;
107
+ filename: string;
108
+ dependencies: string[];
109
+ }>;
110
+ export {};