-
Notifications
You must be signed in to change notification settings - Fork 2
/
mod.ts
53 lines (51 loc) · 1.43 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// deno-lint-ignore-file no-unused-vars
import type { getDecls } from "./decls.ts"
import type { DeclDeps, getDeclDeps } from "./decl_deps.ts"
import type { declDepsToGraph, getGraph, Graph } from "./graph.ts"
import type { getTopDeclDeps, TopDeclDeps } from "./top_decl_deps.ts"
/**
* @module
*
* ## `stackgraph/graph` Workflow
*
* ### Terminology
*
* - `decl`: top-level declaration (variable, function, class)
* - `deps`: reference to another `decl`
* - `decl deps`: Map of `decl` and its `deps`
* - `graph`: directed graph made with `decl deps`
* - `top decl deps`:
* - inversed `graph` folded into record
* - with leaf `decl` as keys
* - and all path `decl` as values
*
* ### Getting `decl`s
*
* 1. get all declarations from source file
* 2. filter out decl entrypoints with {@link getDecls}
*
* ### Getting `decl deps`
*
* using {@link getDeclDeps}:
*
* 1. search all deps from each decl
* 2. for each deps, do step 1
* 3. collect them into {@link DeclDeps}
*
* ### Getting `graph`
*
* generate {@link Graph} using {@link declDepsToGraph}
* or use shortcut {@link getGraph}
*
* ### Getting `top decl deps`
*
* generate {@link TopDeclDeps} using {@link getTopDeclDeps}
*/
export * from "./decl_deps.ts"
export * from "./decls.ts"
export * from "./fs.ts"
export * from "./github_uri.ts"
export * from "./graph_descendants.ts"
export * from "./graph.ts"
export * from "./top_decl_deps.ts"
export * from "./vscode_uri.ts"