@ttsc/graph 0.18.4 → 0.19.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.
- package/README.md +231 -37
- package/lib/TtscGraphApplication.d.ts +1 -1
- package/lib/TtscGraphApplication.js +50 -17
- package/lib/TtscGraphApplication.js.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.js +20 -1
- package/lib/index.js.map +1 -1
- package/lib/model/TtscGraphMemory.js +80 -22
- package/lib/model/TtscGraphMemory.js.map +1 -1
- package/lib/model/TtscGraphSession.js +92 -138
- package/lib/model/TtscGraphSession.js.map +1 -1
- package/lib/model/loadGraph.js +91 -138
- package/lib/model/loadGraph.js.map +1 -1
- package/lib/resolveGraphBinary.d.ts +4 -2
- package/lib/resolveGraphBinary.js +7 -3
- package/lib/resolveGraphBinary.js.map +1 -1
- package/lib/server/createServer.d.ts +16 -9
- package/lib/server/createServer.js +286 -190
- package/lib/server/createServer.js.map +1 -1
- package/lib/server/exportSurface.d.ts +26 -0
- package/lib/server/exportSurface.js +44 -0
- package/lib/server/exportSurface.js.map +1 -0
- package/lib/server/resolveHandle.d.ts +26 -1
- package/lib/server/resolveHandle.js +124 -4
- package/lib/server/resolveHandle.js.map +1 -1
- package/lib/server/resultAudit.d.ts +74 -0
- package/lib/server/resultAudit.js +110 -0
- package/lib/server/resultAudit.js.map +1 -0
- package/lib/server/resultNext.d.ts +9 -0
- package/lib/server/resultNext.js +11 -0
- package/lib/server/resultNext.js.map +1 -0
- package/lib/server/runDetails.d.ts +15 -3
- package/lib/server/runDetails.js +105 -23
- package/lib/server/runDetails.js.map +1 -1
- package/lib/server/runEntrypoints.d.ts +2 -1
- package/lib/server/runEntrypoints.js +17 -10
- package/lib/server/runEntrypoints.js.map +1 -1
- package/lib/server/runLookup.d.ts +2 -1
- package/lib/server/runLookup.js +21 -9
- package/lib/server/runLookup.js.map +1 -1
- package/lib/server/runOverview.d.ts +2 -1
- package/lib/server/runOverview.js +5 -4
- package/lib/server/runOverview.js.map +1 -1
- package/lib/server/runTour.d.ts +2 -1
- package/lib/server/runTour.js +707 -331
- package/lib/server/runTour.js.map +1 -1
- package/lib/server/runTrace.d.ts +2 -1
- package/lib/server/runTrace.js +234 -54
- package/lib/server/runTrace.js.map +1 -1
- package/lib/structures/ITtscGraphApplication.d.ts +122 -118
- package/lib/structures/ITtscGraphDecorator.d.ts +4 -7
- package/lib/structures/ITtscGraphDetails.d.ts +51 -43
- package/lib/structures/ITtscGraphDump.d.ts +32 -8
- package/lib/structures/ITtscGraphEdge.d.ts +4 -6
- package/lib/structures/ITtscGraphEntrypoints.d.ts +10 -27
- package/lib/structures/ITtscGraphEscape.d.ts +6 -16
- package/lib/structures/ITtscGraphEvidence.d.ts +5 -8
- package/lib/structures/ITtscGraphLookup.d.ts +9 -20
- package/lib/structures/ITtscGraphNext.d.ts +10 -7
- package/lib/structures/ITtscGraphNode.d.ts +17 -8
- package/lib/structures/ITtscGraphOverview.d.ts +10 -14
- package/lib/structures/ITtscGraphSpan.d.ts +29 -0
- package/lib/structures/{ITtscGraphDiagnostic.js → ITtscGraphSpan.js} +1 -1
- package/lib/structures/ITtscGraphSpan.js.map +1 -0
- package/lib/structures/ITtscGraphTour.d.ts +65 -23
- package/lib/structures/ITtscGraphTrace.d.ts +72 -49
- package/lib/structures/TtscGraphEdgeKind.d.ts +7 -1
- package/lib/structures/index.d.ts +1 -1
- package/lib/structures/index.js +1 -1
- package/lib/structures/index.js.map +1 -1
- package/lib/view.js +3 -1
- package/lib/view.js.map +1 -1
- package/package.json +4 -4
- package/src/TtscGraphApplication.ts +58 -27
- package/src/index.ts +19 -1
- package/src/model/TtscGraphMemory.ts +86 -22
- package/src/model/TtscGraphSession.ts +5 -1
- package/src/model/loadGraph.ts +3 -1
- package/src/resolveGraphBinary.ts +7 -3
- package/src/server/createServer.ts +24 -17
- package/src/server/exportSurface.ts +40 -0
- package/src/server/resolveHandle.ts +141 -4
- package/src/server/resultAudit.ts +109 -0
- package/src/server/resultNext.ts +22 -0
- package/src/server/runDetails.ts +112 -28
- package/src/server/runEntrypoints.ts +26 -17
- package/src/server/runLookup.ts +29 -18
- package/src/server/runOverview.ts +9 -10
- package/src/server/runTour.ts +764 -363
- package/src/server/runTrace.ts +265 -71
- package/src/structures/ITtscGraphApplication.ts +124 -118
- package/src/structures/ITtscGraphDecorator.ts +4 -7
- package/src/structures/ITtscGraphDetails.ts +60 -46
- package/src/structures/ITtscGraphDump.ts +37 -8
- package/src/structures/ITtscGraphEdge.ts +4 -6
- package/src/structures/ITtscGraphEntrypoints.ts +10 -30
- package/src/structures/ITtscGraphEscape.ts +6 -19
- package/src/structures/ITtscGraphEvidence.ts +5 -8
- package/src/structures/ITtscGraphLookup.ts +9 -22
- package/src/structures/ITtscGraphNext.ts +10 -7
- package/src/structures/ITtscGraphNode.ts +18 -8
- package/src/structures/ITtscGraphOverview.ts +10 -17
- package/src/structures/ITtscGraphSpan.ts +33 -0
- package/src/structures/ITtscGraphTour.ts +70 -28
- package/src/structures/ITtscGraphTrace.ts +82 -51
- package/src/structures/TtscGraphEdgeKind.ts +7 -0
- package/src/structures/index.ts +1 -1
- package/src/view.ts +3 -1
- package/lib/server/accessAliases.d.ts +0 -8
- package/lib/server/accessAliases.js +0 -53
- package/lib/server/accessAliases.js.map +0 -1
- package/lib/server/resultGuide.d.ts +0 -3
- package/lib/server/resultGuide.js +0 -16
- package/lib/server/resultGuide.js.map +0 -1
- package/lib/structures/ITtscGraphDiagnostic.d.ts +0 -27
- package/lib/structures/ITtscGraphDiagnostic.js.map +0 -1
- package/src/server/accessAliases.ts +0 -55
- package/src/server/resultGuide.ts +0 -20
- package/src/structures/ITtscGraphDiagnostic.ts +0 -34
|
@@ -106,6 +106,22 @@ function ownerKey(key) {
|
|
|
106
106
|
function fileNodeId(file) {
|
|
107
107
|
return file;
|
|
108
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* A wire span with its file put back: the one the builder left out because the
|
|
111
|
+
* reader has it, or the one it kept because it could not be derived (an
|
|
112
|
+
* implementation in another file).
|
|
113
|
+
*/
|
|
114
|
+
function spanIn(span, file) {
|
|
115
|
+
return { ...span, file: span.file ?? file };
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The source file a node id names. An id is `path#Qualified.Name:kind`, and a
|
|
119
|
+
* file node's id is the path itself.
|
|
120
|
+
*/
|
|
121
|
+
function fileOfNodeId(id) {
|
|
122
|
+
const hash = id.indexOf("#");
|
|
123
|
+
return hash === -1 ? id : id.slice(0, hash);
|
|
124
|
+
}
|
|
109
125
|
function basename(file) {
|
|
110
126
|
const slash = file.lastIndexOf("/");
|
|
111
127
|
return slash >= 0 ? file.slice(slash + 1) : file;
|
|
@@ -116,9 +132,45 @@ function basename(file) {
|
|
|
116
132
|
* the `contains` ownership tree and `exports` surface.
|
|
117
133
|
*/
|
|
118
134
|
function synthesize(dump) {
|
|
119
|
-
//
|
|
120
|
-
|
|
121
|
-
|
|
135
|
+
// A module node is the dump's name for a source file's export surface, and a
|
|
136
|
+
// file node is this layer's name for the same file. Fold the two: the module
|
|
137
|
+
// keeps its file present here even when the file declares nothing (a barrel),
|
|
138
|
+
// and its `exports` edges are re-anchored on the file id every other tool
|
|
139
|
+
// already traverses. What the module carried, the file now carries.
|
|
140
|
+
const moduleFiles = new Set(dump.nodes.filter((n) => n.kind === "module").map((n) => n.file));
|
|
141
|
+
const moduleIds = new Map(dump.nodes.filter((n) => n.kind === "module").map((n) => [n.id, n.file]));
|
|
142
|
+
// Clone nodes so property refinement does not mutate the caller's dump, and
|
|
143
|
+
// put back the file the builder left out of every span: a node's span is in
|
|
144
|
+
// the node's file, an edge's span is in the file its `from` id names. The
|
|
145
|
+
// builder omits both because they are exactly reconstructible and they are not
|
|
146
|
+
// small — the two copies are 17% of the document, 55 MB of VS Code's 323 MB,
|
|
147
|
+
// paid again in the encode, the pipe, the parse and the validation. Nothing
|
|
148
|
+
// downstream of this line sees a span without its file.
|
|
149
|
+
const nodes = dump.nodes
|
|
150
|
+
.filter((n) => n.kind !== "module")
|
|
151
|
+
.map((n) => {
|
|
152
|
+
const { evidence, implementation, ...rest } = n;
|
|
153
|
+
return {
|
|
154
|
+
...rest,
|
|
155
|
+
...(evidence !== undefined
|
|
156
|
+
? { evidence: spanIn(evidence, n.file) }
|
|
157
|
+
: {}),
|
|
158
|
+
...(implementation !== undefined
|
|
159
|
+
? { implementation: spanIn(implementation, n.file) }
|
|
160
|
+
: {}),
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
const edges = dump.edges.map((edge) => {
|
|
164
|
+
const { evidence, ...rest } = edge;
|
|
165
|
+
const from = moduleIds.get(edge.from);
|
|
166
|
+
return {
|
|
167
|
+
...rest,
|
|
168
|
+
...(from !== undefined ? { from: fileNodeId(from) } : {}),
|
|
169
|
+
...(evidence !== undefined
|
|
170
|
+
? { evidence: spanIn(evidence, fileOfNodeId(edge.from)) }
|
|
171
|
+
: {}),
|
|
172
|
+
};
|
|
173
|
+
});
|
|
122
174
|
// Index workspace nodes by (file, within-file key) so ownership can resolve a
|
|
123
175
|
// member to its declaring class/namespace.
|
|
124
176
|
const byFileKey = new Map();
|
|
@@ -141,23 +193,36 @@ function synthesize(dump) {
|
|
|
141
193
|
node.kind = "property";
|
|
142
194
|
}
|
|
143
195
|
}
|
|
144
|
-
// One file container node per distinct workspace source file
|
|
196
|
+
// One file container node per distinct workspace source file, plus every file
|
|
197
|
+
// the dump saw an export surface on — a barrel declares nothing, so its only
|
|
198
|
+
// trace in the dump is its module node, and it is exactly the file a consumer
|
|
199
|
+
// imports the package from.
|
|
145
200
|
const fileNodes = new Map();
|
|
201
|
+
const addFileNode = (file) => {
|
|
202
|
+
if (file === "" || fileNodes.has(file))
|
|
203
|
+
return;
|
|
204
|
+
fileNodes.set(file, {
|
|
205
|
+
id: fileNodeId(file),
|
|
206
|
+
kind: "file",
|
|
207
|
+
name: basename(file),
|
|
208
|
+
file,
|
|
209
|
+
external: false,
|
|
210
|
+
});
|
|
211
|
+
};
|
|
146
212
|
for (const node of nodes) {
|
|
147
|
-
if (node.external
|
|
213
|
+
if (node.external)
|
|
148
214
|
continue;
|
|
149
|
-
|
|
150
|
-
fileNodes.set(node.file, {
|
|
151
|
-
id: fileNodeId(node.file),
|
|
152
|
-
kind: "file",
|
|
153
|
-
name: basename(node.file),
|
|
154
|
-
file: node.file,
|
|
155
|
-
external: false,
|
|
156
|
-
});
|
|
157
|
-
}
|
|
215
|
+
addFileNode(node.file);
|
|
158
216
|
}
|
|
217
|
+
for (const file of moduleFiles)
|
|
218
|
+
addFileNode(file);
|
|
159
219
|
// Ownership: a member is contained by its owner; a top-level declaration by
|
|
160
|
-
// its file. Exports
|
|
220
|
+
// its file. Exports are not synthesized here: the dump's `exports` edges come
|
|
221
|
+
// from the checker's export table, which follows re-exports and barrels, so
|
|
222
|
+
// they say which module puts a symbol on the wire. Deriving them from the
|
|
223
|
+
// `exported` flag instead would say only that the declaring file made it
|
|
224
|
+
// public, which is the fact that cannot tell a package's front door from its
|
|
225
|
+
// legacy subpath.
|
|
161
226
|
const structural = [];
|
|
162
227
|
const membersByOwner = new Map();
|
|
163
228
|
for (const node of nodes) {
|
|
@@ -172,13 +237,6 @@ function synthesize(dump) {
|
|
|
172
237
|
to: node.id,
|
|
173
238
|
kind: "contains",
|
|
174
239
|
});
|
|
175
|
-
if (node.exported) {
|
|
176
|
-
structural.push({
|
|
177
|
-
from: fileNodeId(node.file),
|
|
178
|
-
to: node.id,
|
|
179
|
-
kind: "exports",
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
240
|
}
|
|
183
241
|
const synthesized = [...edges, ...structural];
|
|
184
242
|
const edgeKeys = new Set(synthesized.map((edge) => `${edge.kind}\0${edge.from}\0${edge.to}`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TtscGraphMemory.js","sourceRoot":"","sources":["../../src/model/TtscGraphMemory.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Ttsc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AAG,CAAC,UAAU,CAAC,IAAI,CAAC,CACjD,CAAC;YACF,IAAI,aAAa,KAAK,SAAS;gBAAE,SAAS;YAC1C,MAAM,GAAG,GAAG,GAAG,IAAI,KAAK,aAAa,CAAC,EAAE,KAAK,UAAU,CAAC,EAAE,EAAE,CAAC;YAC7D,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,SAAS;YAChC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAClB,WAAW,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,aAAa,CAAC,EAAE;gBACtB,EAAE,EAAE,UAAU,CAAC,EAAE;gBACjB,IAAI;gBACJ,QAAQ,EAAE,aAAa,CAAC,cAAc,IAAI,aAAa,CAAC,QAAQ;aACjE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;QACxC,KAAK,EAAE,WAAW;KACnB,CAAC;AACJ,CAAC;AAED,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC"}
|
|
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.TtscGraphSession = void 0;
|
|
40
|
-
const
|
|
40
|
+
const _assertGuard_1 = __importStar(require("typia/lib/internal/_assertGuard"));
|
|
41
41
|
const node_child_process_1 = require("node:child_process");
|
|
42
42
|
const node_readline_1 = __importDefault(require("node:readline"));
|
|
43
43
|
const typia_1 = __importDefault(require("typia"));
|
|
@@ -64,7 +64,10 @@ class TtscGraphSession {
|
|
|
64
64
|
current;
|
|
65
65
|
closed = false;
|
|
66
66
|
constructor(options) {
|
|
67
|
-
|
|
67
|
+
// Resolve the platform binary from the project this session serves, so the
|
|
68
|
+
// MCP server started from an unrelated directory still finds the target's
|
|
69
|
+
// installed `ttsc`.
|
|
70
|
+
const binary = options.binary ?? (0, resolveGraphBinary_1.resolveGraphBinary)(process.env, options.cwd);
|
|
68
71
|
if (binary === null) {
|
|
69
72
|
throw new Error("@ttsc/graph: could not resolve the ttscgraph binary. " +
|
|
70
73
|
"Install `ttsc` so its platform package is present, " +
|
|
@@ -116,304 +119,255 @@ class TtscGraphSession {
|
|
|
116
119
|
const dump = (() => {
|
|
117
120
|
const _iv0 = new Set(["class", "enum", "external_symbol", "file", "function", "interface", "method", "module", "namespace", "package", "parameter", "property", "type", "variable"]);
|
|
118
121
|
const _ip0 = input => "string" === typeof input["name"];
|
|
119
|
-
const _ip1 = input => "string" === typeof input["file"];
|
|
120
122
|
const _iv1 = new Set(["abstract", "async", "const", "declare", "default", "export", "optional", "private", "protected", "public", "readonly", "static"]);
|
|
121
|
-
const
|
|
122
|
-
const _iv2 = new Set(["accesses", "calls", "contains", "decorates", "exports", "extends", "implements", "imports", "instantiates", "overrides", "renders", "tests", "type_ref"]);
|
|
123
|
+
const _ip1 = input => undefined === input["evidence"] || "object" === typeof input["evidence"] && null !== input["evidence"] && _io4(input["evidence"]);
|
|
124
|
+
const _iv2 = new Set(["accesses", "calls", "contains", "decorates", "dispatches", "exports", "extends", "implements", "imports", "instantiates", "overrides", "renders", "tests", "type_ref"]);
|
|
123
125
|
const _av0 = new Set(["class", "enum", "external_symbol", "file", "function", "interface", "method", "module", "namespace", "package", "parameter", "property", "type", "variable"]);
|
|
124
126
|
const _ae0 = "(\"class\" | \"enum\" | \"external_symbol\" | \"file\" | \"function\" | \"interface\" | \"method\" | \"module\" | \"namespace\" | \"package\" | \"parameter\" | \"property\" | \"type\" | \"variable\")";
|
|
125
|
-
const _ap0 = (input, _path, _exceptionable = true) => "string" === typeof input["name"] ||
|
|
127
|
+
const _ap0 = (input, _path, _exceptionable = true) => "string" === typeof input["name"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
126
128
|
method: "typia.assert",
|
|
127
129
|
path: _path + ".name",
|
|
128
130
|
expected: "string",
|
|
129
131
|
value: input["name"]
|
|
130
132
|
}, _errorFactory);
|
|
131
|
-
const _ap1 = (input, _path, _exceptionable = true) => "string" === typeof input["file"] || _a._assertGuard(_exceptionable, {
|
|
132
|
-
method: "typia.assert",
|
|
133
|
-
path: _path + ".file",
|
|
134
|
-
expected: "string",
|
|
135
|
-
value: input["file"]
|
|
136
|
-
}, _errorFactory);
|
|
137
133
|
const _av1 = new Set(["abstract", "async", "const", "declare", "default", "export", "optional", "private", "protected", "public", "readonly", "static"]);
|
|
138
134
|
const _ae1 = "(\"abstract\" | \"async\" | \"const\" | \"declare\" | \"default\" | \"export\" | \"optional\" | \"private\" | \"protected\" | \"public\" | \"readonly\" | \"static\")";
|
|
139
|
-
const
|
|
135
|
+
const _ap1 = (input, _path, _exceptionable = true) => undefined === input["evidence"] || ("object" === typeof input["evidence"] && null !== input["evidence"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
140
136
|
method: "typia.assert",
|
|
141
137
|
path: _path + ".evidence",
|
|
142
|
-
expected: "(
|
|
138
|
+
expected: "(ITtscGraphSpan | undefined)",
|
|
143
139
|
value: input["evidence"]
|
|
144
|
-
}, _errorFactory)) && _ao4(input["evidence"], _path + ".evidence", true && _exceptionable) ||
|
|
140
|
+
}, _errorFactory)) && _ao4(input["evidence"], _path + ".evidence", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
145
141
|
method: "typia.assert",
|
|
146
142
|
path: _path + ".evidence",
|
|
147
|
-
expected: "(
|
|
143
|
+
expected: "(ITtscGraphSpan | undefined)",
|
|
148
144
|
value: input["evidence"]
|
|
149
145
|
}, _errorFactory);
|
|
150
|
-
const _av2 = new Set(["accesses", "calls", "contains", "decorates", "exports", "extends", "implements", "imports", "instantiates", "overrides", "renders", "tests", "type_ref"]);
|
|
151
|
-
const _ae2 = "(\"accesses\" | \"calls\" | \"contains\" | \"decorates\" | \"exports\" | \"extends\" | \"implements\" | \"imports\" | \"instantiates\" | \"overrides\" | \"renders\" | \"tests\" | \"type_ref\")";
|
|
152
|
-
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.project ||
|
|
146
|
+
const _av2 = new Set(["accesses", "calls", "contains", "decorates", "dispatches", "exports", "extends", "implements", "imports", "instantiates", "overrides", "renders", "tests", "type_ref"]);
|
|
147
|
+
const _ae2 = "(\"accesses\" | \"calls\" | \"contains\" | \"decorates\" | \"dispatches\" | \"exports\" | \"extends\" | \"implements\" | \"imports\" | \"instantiates\" | \"overrides\" | \"renders\" | \"tests\" | \"type_ref\")";
|
|
148
|
+
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.project || _assertGuard_1._assertGuard(_exceptionable, {
|
|
153
149
|
method: "typia.assert",
|
|
154
150
|
path: _path + ".project",
|
|
155
151
|
expected: "string",
|
|
156
152
|
value: input.project
|
|
157
|
-
}, _errorFactory)) && ("string" === typeof input.tsconfig ||
|
|
153
|
+
}, _errorFactory)) && ("string" === typeof input.tsconfig || _assertGuard_1._assertGuard(_exceptionable, {
|
|
158
154
|
method: "typia.assert",
|
|
159
155
|
path: _path + ".tsconfig",
|
|
160
156
|
expected: "string",
|
|
161
157
|
value: input.tsconfig
|
|
162
|
-
}, _errorFactory)) && ((Array.isArray(input.nodes) ||
|
|
158
|
+
}, _errorFactory)) && ((Array.isArray(input.nodes) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
163
159
|
method: "typia.assert",
|
|
164
160
|
path: _path + ".nodes",
|
|
165
|
-
expected: "Array<
|
|
161
|
+
expected: "Array<ITtscGraphDump.INode>",
|
|
166
162
|
value: input.nodes
|
|
167
|
-
}, _errorFactory)) && input.nodes.every((elem,
|
|
163
|
+
}, _errorFactory)) && input.nodes.every((elem, _index6) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
168
164
|
method: "typia.assert",
|
|
169
|
-
path: _path + ".nodes[" +
|
|
170
|
-
expected: "
|
|
165
|
+
path: _path + ".nodes[" + _index6 + "]",
|
|
166
|
+
expected: "ITtscGraphDump.INode",
|
|
171
167
|
value: elem
|
|
172
|
-
}, _errorFactory)) && _ao1(elem, _path + ".nodes[" +
|
|
168
|
+
}, _errorFactory)) && _ao1(elem, _path + ".nodes[" + _index6 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
173
169
|
method: "typia.assert",
|
|
174
|
-
path: _path + ".nodes[" +
|
|
175
|
-
expected: "
|
|
170
|
+
path: _path + ".nodes[" + _index6 + "]",
|
|
171
|
+
expected: "ITtscGraphDump.INode",
|
|
176
172
|
value: elem
|
|
177
|
-
}, _errorFactory)) ||
|
|
173
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
178
174
|
method: "typia.assert",
|
|
179
175
|
path: _path + ".nodes",
|
|
180
|
-
expected: "Array<
|
|
176
|
+
expected: "Array<ITtscGraphDump.INode>",
|
|
181
177
|
value: input.nodes
|
|
182
|
-
}, _errorFactory)) && ((Array.isArray(input.edges) ||
|
|
178
|
+
}, _errorFactory)) && ((Array.isArray(input.edges) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
183
179
|
method: "typia.assert",
|
|
184
180
|
path: _path + ".edges",
|
|
185
|
-
expected: "Array<
|
|
181
|
+
expected: "Array<ITtscGraphDump.IEdge>",
|
|
186
182
|
value: input.edges
|
|
187
|
-
}, _errorFactory)) && input.edges.every((elem,
|
|
183
|
+
}, _errorFactory)) && input.edges.every((elem, _index7) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
188
184
|
method: "typia.assert",
|
|
189
|
-
path: _path + ".edges[" +
|
|
190
|
-
expected: "
|
|
185
|
+
path: _path + ".edges[" + _index7 + "]",
|
|
186
|
+
expected: "ITtscGraphDump.IEdge",
|
|
191
187
|
value: elem
|
|
192
|
-
}, _errorFactory)) && _ao5(elem, _path + ".edges[" +
|
|
188
|
+
}, _errorFactory)) && _ao5(elem, _path + ".edges[" + _index7 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
193
189
|
method: "typia.assert",
|
|
194
|
-
path: _path + ".edges[" +
|
|
195
|
-
expected: "
|
|
190
|
+
path: _path + ".edges[" + _index7 + "]",
|
|
191
|
+
expected: "ITtscGraphDump.IEdge",
|
|
196
192
|
value: elem
|
|
197
|
-
}, _errorFactory)) ||
|
|
193
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
198
194
|
method: "typia.assert",
|
|
199
195
|
path: _path + ".edges",
|
|
200
|
-
expected: "Array<
|
|
196
|
+
expected: "Array<ITtscGraphDump.IEdge>",
|
|
201
197
|
value: input.edges
|
|
202
|
-
}, _errorFactory)) && (undefined === input.diagnostics || (Array.isArray(input.diagnostics) || _a._assertGuard(_exceptionable, {
|
|
203
|
-
method: "typia.assert",
|
|
204
|
-
path: _path + ".diagnostics",
|
|
205
|
-
expected: "(Array<ITtscGraphDiagnostic> | undefined)",
|
|
206
|
-
value: input.diagnostics
|
|
207
|
-
}, _errorFactory)) && input.diagnostics.every((elem, _index9) => ("object" === typeof elem && null !== elem || _a._assertGuard(_exceptionable, {
|
|
208
|
-
method: "typia.assert",
|
|
209
|
-
path: _path + ".diagnostics[" + _index9 + "]",
|
|
210
|
-
expected: "ITtscGraphDiagnostic",
|
|
211
|
-
value: elem
|
|
212
|
-
}, _errorFactory)) && _ao6(elem, _path + ".diagnostics[" + _index9 + "]", true && _exceptionable) || _a._assertGuard(_exceptionable, {
|
|
213
|
-
method: "typia.assert",
|
|
214
|
-
path: _path + ".diagnostics[" + _index9 + "]",
|
|
215
|
-
expected: "ITtscGraphDiagnostic",
|
|
216
|
-
value: elem
|
|
217
|
-
}, _errorFactory)) || _a._assertGuard(_exceptionable, {
|
|
218
|
-
method: "typia.assert",
|
|
219
|
-
path: _path + ".diagnostics",
|
|
220
|
-
expected: "(Array<ITtscGraphDiagnostic> | undefined)",
|
|
221
|
-
value: input.diagnostics
|
|
222
198
|
}, _errorFactory));
|
|
223
|
-
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id ||
|
|
199
|
+
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id || _assertGuard_1._assertGuard(_exceptionable, {
|
|
224
200
|
method: "typia.assert",
|
|
225
201
|
path: _path + ".id",
|
|
226
202
|
expected: "string",
|
|
227
203
|
value: input.id
|
|
228
|
-
}, _errorFactory)) && (true === _av0.has(input.kind) ||
|
|
204
|
+
}, _errorFactory)) && (true === _av0.has(input.kind) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
229
205
|
method: "typia.assert",
|
|
230
206
|
path: _path + ".kind",
|
|
231
207
|
expected: _ae0,
|
|
232
208
|
value: input.kind
|
|
233
|
-
}, _errorFactory)) && _ap0(input, _path, true && _exceptionable) && (undefined === input.qualifiedName || "string" === typeof input.qualifiedName ||
|
|
209
|
+
}, _errorFactory)) && _ap0(input, _path, true && _exceptionable) && (undefined === input.qualifiedName || "string" === typeof input.qualifiedName || _assertGuard_1._assertGuard(_exceptionable, {
|
|
234
210
|
method: "typia.assert",
|
|
235
211
|
path: _path + ".qualifiedName",
|
|
236
212
|
expected: "(string | undefined)",
|
|
237
213
|
value: input.qualifiedName
|
|
238
|
-
}, _errorFactory)) &&
|
|
214
|
+
}, _errorFactory)) && ("string" === typeof input.file || _assertGuard_1._assertGuard(_exceptionable, {
|
|
215
|
+
method: "typia.assert",
|
|
216
|
+
path: _path + ".file",
|
|
217
|
+
expected: "string",
|
|
218
|
+
value: input.file
|
|
219
|
+
}, _errorFactory)) && ("boolean" === typeof input.external || _assertGuard_1._assertGuard(_exceptionable, {
|
|
239
220
|
method: "typia.assert",
|
|
240
221
|
path: _path + ".external",
|
|
241
222
|
expected: "boolean",
|
|
242
223
|
value: input.external
|
|
243
|
-
}, _errorFactory)) && (undefined === input.ignored || "boolean" === typeof input.ignored ||
|
|
224
|
+
}, _errorFactory)) && (undefined === input.ignored || "boolean" === typeof input.ignored || _assertGuard_1._assertGuard(_exceptionable, {
|
|
244
225
|
method: "typia.assert",
|
|
245
226
|
path: _path + ".ignored",
|
|
246
227
|
expected: "(boolean | undefined)",
|
|
247
228
|
value: input.ignored
|
|
248
|
-
}, _errorFactory)) && (undefined === input.exported || "boolean" === typeof input.exported ||
|
|
229
|
+
}, _errorFactory)) && (undefined === input.exported || "boolean" === typeof input.exported || _assertGuard_1._assertGuard(_exceptionable, {
|
|
249
230
|
method: "typia.assert",
|
|
250
231
|
path: _path + ".exported",
|
|
251
232
|
expected: "(boolean | undefined)",
|
|
252
233
|
value: input.exported
|
|
253
|
-
}, _errorFactory)) && (undefined === input.
|
|
234
|
+
}, _errorFactory)) && (undefined === input.closure || "boolean" === typeof input.closure || _assertGuard_1._assertGuard(_exceptionable, {
|
|
235
|
+
method: "typia.assert",
|
|
236
|
+
path: _path + ".closure",
|
|
237
|
+
expected: "(boolean | undefined)",
|
|
238
|
+
value: input.closure
|
|
239
|
+
}, _errorFactory)) && (undefined === input.modifiers || (Array.isArray(input.modifiers) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
254
240
|
method: "typia.assert",
|
|
255
241
|
path: _path + ".modifiers",
|
|
256
242
|
expected: "(Array<TtscGraphNodeModifier> | undefined)",
|
|
257
243
|
value: input.modifiers
|
|
258
|
-
}, _errorFactory)) && input.modifiers.every((elem,
|
|
244
|
+
}, _errorFactory)) && input.modifiers.every((elem, _index8) => true === _av1.has(elem) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
259
245
|
method: "typia.assert",
|
|
260
|
-
path: _path + ".modifiers[" +
|
|
246
|
+
path: _path + ".modifiers[" + _index8 + "]",
|
|
261
247
|
expected: _ae1,
|
|
262
248
|
value: elem
|
|
263
|
-
}, _errorFactory)) ||
|
|
249
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
264
250
|
method: "typia.assert",
|
|
265
251
|
path: _path + ".modifiers",
|
|
266
252
|
expected: "(Array<TtscGraphNodeModifier> | undefined)",
|
|
267
253
|
value: input.modifiers
|
|
268
|
-
}, _errorFactory)) && (undefined === input.decorators || (Array.isArray(input.decorators) ||
|
|
254
|
+
}, _errorFactory)) && (undefined === input.decorators || (Array.isArray(input.decorators) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
269
255
|
method: "typia.assert",
|
|
270
256
|
path: _path + ".decorators",
|
|
271
257
|
expected: "(Array<ITtscGraphDecorator> | undefined)",
|
|
272
258
|
value: input.decorators
|
|
273
|
-
}, _errorFactory)) && input.decorators.every((elem,
|
|
259
|
+
}, _errorFactory)) && input.decorators.every((elem, _index9) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
274
260
|
method: "typia.assert",
|
|
275
|
-
path: _path + ".decorators[" +
|
|
261
|
+
path: _path + ".decorators[" + _index9 + "]",
|
|
276
262
|
expected: "ITtscGraphDecorator",
|
|
277
263
|
value: elem
|
|
278
|
-
}, _errorFactory)) && _ao2(elem, _path + ".decorators[" +
|
|
264
|
+
}, _errorFactory)) && _ao2(elem, _path + ".decorators[" + _index9 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
279
265
|
method: "typia.assert",
|
|
280
|
-
path: _path + ".decorators[" +
|
|
266
|
+
path: _path + ".decorators[" + _index9 + "]",
|
|
281
267
|
expected: "ITtscGraphDecorator",
|
|
282
268
|
value: elem
|
|
283
|
-
}, _errorFactory)) ||
|
|
269
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
284
270
|
method: "typia.assert",
|
|
285
271
|
path: _path + ".decorators",
|
|
286
272
|
expected: "(Array<ITtscGraphDecorator> | undefined)",
|
|
287
273
|
value: input.decorators
|
|
288
|
-
}, _errorFactory)) &&
|
|
274
|
+
}, _errorFactory)) && _ap1(input, _path, true && _exceptionable) && (undefined === input.implementation || ("object" === typeof input.implementation && null !== input.implementation || _assertGuard_1._assertGuard(_exceptionable, {
|
|
289
275
|
method: "typia.assert",
|
|
290
276
|
path: _path + ".implementation",
|
|
291
|
-
expected: "(
|
|
277
|
+
expected: "(ITtscGraphSpan | undefined)",
|
|
292
278
|
value: input.implementation
|
|
293
|
-
}, _errorFactory)) && _ao4(input.implementation, _path + ".implementation", true && _exceptionable) ||
|
|
279
|
+
}, _errorFactory)) && _ao4(input.implementation, _path + ".implementation", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
294
280
|
method: "typia.assert",
|
|
295
281
|
path: _path + ".implementation",
|
|
296
|
-
expected: "(
|
|
282
|
+
expected: "(ITtscGraphSpan | undefined)",
|
|
297
283
|
value: input.implementation
|
|
298
284
|
}, _errorFactory));
|
|
299
|
-
const _ao2 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && ((Array.isArray(input.arguments) ||
|
|
285
|
+
const _ao2 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && ((Array.isArray(input.arguments) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
300
286
|
method: "typia.assert",
|
|
301
287
|
path: _path + ".arguments",
|
|
302
288
|
expected: "Array<ITtscGraphDecorator.IArgument>",
|
|
303
289
|
value: input.arguments
|
|
304
|
-
}, _errorFactory)) && input.arguments.every((elem,
|
|
290
|
+
}, _errorFactory)) && input.arguments.every((elem, _index10) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
305
291
|
method: "typia.assert",
|
|
306
|
-
path: _path + ".arguments[" +
|
|
292
|
+
path: _path + ".arguments[" + _index10 + "]",
|
|
307
293
|
expected: "ITtscGraphDecorator.IArgument",
|
|
308
294
|
value: elem
|
|
309
|
-
}, _errorFactory)) && _ao3(elem, _path + ".arguments[" +
|
|
295
|
+
}, _errorFactory)) && _ao3(elem, _path + ".arguments[" + _index10 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
310
296
|
method: "typia.assert",
|
|
311
|
-
path: _path + ".arguments[" +
|
|
297
|
+
path: _path + ".arguments[" + _index10 + "]",
|
|
312
298
|
expected: "ITtscGraphDecorator.IArgument",
|
|
313
299
|
value: elem
|
|
314
|
-
}, _errorFactory)) ||
|
|
300
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
315
301
|
method: "typia.assert",
|
|
316
302
|
path: _path + ".arguments",
|
|
317
303
|
expected: "Array<ITtscGraphDecorator.IArgument>",
|
|
318
304
|
value: input.arguments
|
|
319
305
|
}, _errorFactory));
|
|
320
|
-
const _ao3 = (input, _path, _exceptionable = true) => undefined === input.literal || "string" === typeof input.literal || "number" === typeof input.literal || "boolean" === typeof input.literal ||
|
|
306
|
+
const _ao3 = (input, _path, _exceptionable = true) => undefined === input.literal || "string" === typeof input.literal || "number" === typeof input.literal || "boolean" === typeof input.literal || _assertGuard_1._assertGuard(_exceptionable, {
|
|
321
307
|
method: "typia.assert",
|
|
322
308
|
path: _path + ".literal",
|
|
323
309
|
expected: "(boolean | number | string | undefined)",
|
|
324
310
|
value: input.literal
|
|
325
311
|
}, _errorFactory);
|
|
326
|
-
const _ao4 = (input, _path, _exceptionable = true) =>
|
|
312
|
+
const _ao4 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || _assertGuard_1._assertGuard(_exceptionable, {
|
|
313
|
+
method: "typia.assert",
|
|
314
|
+
path: _path + ".file",
|
|
315
|
+
expected: "(string | undefined)",
|
|
316
|
+
value: input.file
|
|
317
|
+
}, _errorFactory)) && ("number" === typeof input.startLine || _assertGuard_1._assertGuard(_exceptionable, {
|
|
327
318
|
method: "typia.assert",
|
|
328
319
|
path: _path + ".startLine",
|
|
329
320
|
expected: "number",
|
|
330
321
|
value: input.startLine
|
|
331
|
-
}, _errorFactory)) && (undefined === input.startCol || "number" === typeof input.startCol ||
|
|
322
|
+
}, _errorFactory)) && (undefined === input.startCol || "number" === typeof input.startCol || _assertGuard_1._assertGuard(_exceptionable, {
|
|
332
323
|
method: "typia.assert",
|
|
333
324
|
path: _path + ".startCol",
|
|
334
325
|
expected: "(number | undefined)",
|
|
335
326
|
value: input.startCol
|
|
336
|
-
}, _errorFactory)) && (undefined === input.endLine || "number" === typeof input.endLine ||
|
|
327
|
+
}, _errorFactory)) && (undefined === input.endLine || "number" === typeof input.endLine || _assertGuard_1._assertGuard(_exceptionable, {
|
|
337
328
|
method: "typia.assert",
|
|
338
329
|
path: _path + ".endLine",
|
|
339
330
|
expected: "(number | undefined)",
|
|
340
331
|
value: input.endLine
|
|
341
|
-
}, _errorFactory)) && (undefined === input.endCol || "number" === typeof input.endCol ||
|
|
332
|
+
}, _errorFactory)) && (undefined === input.endCol || "number" === typeof input.endCol || _assertGuard_1._assertGuard(_exceptionable, {
|
|
342
333
|
method: "typia.assert",
|
|
343
334
|
path: _path + ".endCol",
|
|
344
335
|
expected: "(number | undefined)",
|
|
345
336
|
value: input.endCol
|
|
346
337
|
}, _errorFactory));
|
|
347
|
-
const _ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.from ||
|
|
338
|
+
const _ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.from || _assertGuard_1._assertGuard(_exceptionable, {
|
|
348
339
|
method: "typia.assert",
|
|
349
340
|
path: _path + ".from",
|
|
350
341
|
expected: "string",
|
|
351
342
|
value: input.from
|
|
352
|
-
}, _errorFactory)) && ("string" === typeof input.to ||
|
|
343
|
+
}, _errorFactory)) && ("string" === typeof input.to || _assertGuard_1._assertGuard(_exceptionable, {
|
|
353
344
|
method: "typia.assert",
|
|
354
345
|
path: _path + ".to",
|
|
355
346
|
expected: "string",
|
|
356
347
|
value: input.to
|
|
357
|
-
}, _errorFactory)) && (true === _av2.has(input.kind) ||
|
|
348
|
+
}, _errorFactory)) && (true === _av2.has(input.kind) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
358
349
|
method: "typia.assert",
|
|
359
350
|
path: _path + ".kind",
|
|
360
351
|
expected: _ae2,
|
|
361
352
|
value: input.kind
|
|
362
|
-
}, _errorFactory)) &&
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
path: _path + ".line",
|
|
366
|
-
expected: "number",
|
|
367
|
-
value: input.line
|
|
368
|
-
}, _errorFactory)) && (undefined === input.column || "number" === typeof input.column || _a._assertGuard(_exceptionable, {
|
|
369
|
-
method: "typia.assert",
|
|
370
|
-
path: _path + ".column",
|
|
371
|
-
expected: "(number | undefined)",
|
|
372
|
-
value: input.column
|
|
373
|
-
}, _errorFactory)) && ("string" === typeof input.code || "number" === typeof input.code || _a._assertGuard(_exceptionable, {
|
|
374
|
-
method: "typia.assert",
|
|
375
|
-
path: _path + ".code",
|
|
376
|
-
expected: "(number | string)",
|
|
377
|
-
value: input.code
|
|
378
|
-
}, _errorFactory)) && ("string" === typeof input.message || _a._assertGuard(_exceptionable, {
|
|
379
|
-
method: "typia.assert",
|
|
380
|
-
path: _path + ".message",
|
|
381
|
-
expected: "string",
|
|
382
|
-
value: input.message
|
|
383
|
-
}, _errorFactory)) && (undefined === input.severity || "error" === input.severity || "hint" === input.severity || "info" === input.severity || "warning" === input.severity || _a._assertGuard(_exceptionable, {
|
|
384
|
-
method: "typia.assert",
|
|
385
|
-
path: _path + ".severity",
|
|
386
|
-
expected: "(\"error\" | \"hint\" | \"info\" | \"warning\" | undefined)",
|
|
387
|
-
value: input.severity
|
|
388
|
-
}, _errorFactory)) && (undefined === input.origin || "lint" === input.origin || "plugin" === input.origin || "tsc" === input.origin || _a._assertGuard(_exceptionable, {
|
|
389
|
-
method: "typia.assert",
|
|
390
|
-
path: _path + ".origin",
|
|
391
|
-
expected: "(\"lint\" | \"plugin\" | \"tsc\" | undefined)",
|
|
392
|
-
value: input.origin
|
|
393
|
-
}, _errorFactory)) && (undefined === input.node || "string" === typeof input.node || _a._assertGuard(_exceptionable, {
|
|
394
|
-
method: "typia.assert",
|
|
395
|
-
path: _path + ".node",
|
|
396
|
-
expected: "(string | undefined)",
|
|
397
|
-
value: input.node
|
|
398
|
-
}, _errorFactory));
|
|
399
|
-
const _io0 = input => "string" === typeof input.project && "string" === typeof input.tsconfig && (Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (Array.isArray(input.edges) && input.edges.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (undefined === input.diagnostics || Array.isArray(input.diagnostics) && input.diagnostics.every(elem => "object" === typeof elem && null !== elem && _io6(elem)));
|
|
400
|
-
const _io1 = input => "string" === typeof input.id && true === _iv0.has(input.kind) && _ip0(input) && (undefined === input.qualifiedName || "string" === typeof input.qualifiedName) && _ip1(input) && "boolean" === typeof input.external && (undefined === input.ignored || "boolean" === typeof input.ignored) && (undefined === input.exported || "boolean" === typeof input.exported) && (undefined === input.modifiers || Array.isArray(input.modifiers) && input.modifiers.every(elem => true === _iv1.has(elem))) && (undefined === input.decorators || Array.isArray(input.decorators) && input.decorators.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && _ip2(input) && (undefined === input.implementation || "object" === typeof input.implementation && null !== input.implementation && _io4(input.implementation));
|
|
353
|
+
}, _errorFactory)) && _ap1(input, _path, true && _exceptionable);
|
|
354
|
+
const _io0 = input => "string" === typeof input.project && "string" === typeof input.tsconfig && (Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (Array.isArray(input.edges) && input.edges.every(elem => "object" === typeof elem && null !== elem && _io5(elem)));
|
|
355
|
+
const _io1 = input => "string" === typeof input.id && true === _iv0.has(input.kind) && _ip0(input) && (undefined === input.qualifiedName || "string" === typeof input.qualifiedName) && "string" === typeof input.file && "boolean" === typeof input.external && (undefined === input.ignored || "boolean" === typeof input.ignored) && (undefined === input.exported || "boolean" === typeof input.exported) && (undefined === input.closure || "boolean" === typeof input.closure) && (undefined === input.modifiers || Array.isArray(input.modifiers) && input.modifiers.every(elem => true === _iv1.has(elem))) && (undefined === input.decorators || Array.isArray(input.decorators) && input.decorators.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && _ip1(input) && (undefined === input.implementation || "object" === typeof input.implementation && null !== input.implementation && _io4(input.implementation));
|
|
401
356
|
const _io2 = input => _ip0(input) && (Array.isArray(input.arguments) && input.arguments.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io3(elem)));
|
|
402
357
|
const _io3 = input => undefined === input.literal || "string" === typeof input.literal || "number" === typeof input.literal || "boolean" === typeof input.literal;
|
|
403
|
-
const _io4 = input =>
|
|
404
|
-
const _io5 = input => "string" === typeof input.from && "string" === typeof input.to && true === _iv2.has(input.kind) &&
|
|
405
|
-
const _io6 = input => _ip1(input) && "number" === typeof input.line && (undefined === input.column || "number" === typeof input.column) && ("string" === typeof input.code || "number" === typeof input.code) && "string" === typeof input.message && (undefined === input.severity || "error" === input.severity || "hint" === input.severity || "info" === input.severity || "warning" === input.severity) && (undefined === input.origin || "lint" === input.origin || "plugin" === input.origin || "tsc" === input.origin) && (undefined === input.node || "string" === typeof input.node);
|
|
358
|
+
const _io4 = input => (undefined === input.file || "string" === typeof input.file) && "number" === typeof input.startLine && (undefined === input.startCol || "number" === typeof input.startCol) && (undefined === input.endLine || "number" === typeof input.endLine) && (undefined === input.endCol || "number" === typeof input.endCol);
|
|
359
|
+
const _io5 = input => "string" === typeof input.from && "string" === typeof input.to && true === _iv2.has(input.kind) && _ip1(input);
|
|
406
360
|
const __is = input => "object" === typeof input && null !== input && _io0(input);
|
|
407
361
|
let _errorFactory;
|
|
408
362
|
return (input, errorFactory) => {
|
|
409
363
|
if (false === __is(input)) {
|
|
410
364
|
_errorFactory = errorFactory;
|
|
411
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input ||
|
|
365
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
|
|
412
366
|
method: "typia.assert",
|
|
413
367
|
path: _path + "",
|
|
414
368
|
expected: "ITtscGraphDump",
|
|
415
369
|
value: input
|
|
416
|
-
}, _errorFactory)) && _ao0(input, _path + "", true) ||
|
|
370
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
|
|
417
371
|
method: "typia.assert",
|
|
418
372
|
path: _path + "",
|
|
419
373
|
expected: "ITtscGraphDump",
|