1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.getTypeRelatedNode = exports.getPropertyRelatedNode = exports.getParameterRelatedNode = exports.getMethodRelatedNode = exports.getInterfaceRelatedNode = exports.getEnumRelatedNode = exports.getClassOrInterfaceRelatedNode = exports.getClassRelatedNode = exports.getRelatedNode = exports.setPropertyRelatedNode = exports.setParameterRelatedNode = exports.setMethodRelatedNode = exports.setInterfaceRelatedNode = exports.setEnumRelatedNode = exports.setClassRelatedNode = exports.setRelatedNode = void 0;
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | const STORAGE = new WeakMap();
|
17 |
|
18 | const setter = (object, node) => {
|
19 | return setRelatedNode(object, node);
|
20 | };
|
21 | function setRelatedNode(object, node) {
|
22 | if (node != null) {
|
23 | STORAGE.set(object, node);
|
24 | }
|
25 | return object;
|
26 | }
|
27 | exports.setRelatedNode = setRelatedNode;
|
28 | exports.setClassRelatedNode = setter;
|
29 | exports.setEnumRelatedNode = setter;
|
30 | exports.setInterfaceRelatedNode = setter;
|
31 | exports.setMethodRelatedNode = setter;
|
32 | exports.setParameterRelatedNode = setter;
|
33 | exports.setPropertyRelatedNode = setter;
|
34 |
|
35 |
|
36 | function getRelatedNode(object) {
|
37 | return STORAGE.get(object);
|
38 | }
|
39 | exports.getRelatedNode = getRelatedNode;
|
40 | exports.getClassRelatedNode = getRelatedNode;
|
41 | exports.getClassOrInterfaceRelatedNode = getRelatedNode;
|
42 | exports.getEnumRelatedNode = getRelatedNode;
|
43 | exports.getInterfaceRelatedNode = getRelatedNode;
|
44 | exports.getMethodRelatedNode = STORAGE.get.bind(STORAGE);
|
45 | exports.getParameterRelatedNode = getRelatedNode;
|
46 | exports.getPropertyRelatedNode = getRelatedNode;
|
47 | exports.getTypeRelatedNode = getRelatedNode;
|
48 |
|
49 |
|
\ | No newline at end of file |