Updated demos.

This commit is contained in:
Henning Dieterichs
2020-02-19 15:14:11 +01:00
parent 5bc4347f3c
commit 27b9bc1905
27 changed files with 793 additions and 82 deletions

View File

@@ -82,7 +82,7 @@ export interface TreeNode<TExtraData> {
export interface NodeGraphData {
id: string;
label: string;
label?: string;
color?: string;
shape?: "ellipse" | "box";
}
@@ -90,7 +90,7 @@ export interface NodeGraphData {
export interface EdgeGraphData {
from: string;
to: string;
label: string;
label?: string;
id?: string;
color?: string;
dashes?: boolean;

View File

@@ -24,6 +24,7 @@ export class TypeScriptAstDataExtractor
if (typeof data === "object" && "typescript" in (data as object)) {
return (data as any).typescript;
} else {
// This might refer to global.require which uses CWD for resolution!
const require = evalFn<(request: string) => unknown>("require");
return require("typescript") as typeof ts;
}