Updated demos.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user