Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Fix flow cycle issue
Browse files Browse the repository at this point in the history
  • Loading branch information
YingHui Tan committed Jan 3, 2018
1 parent cbca87f commit 22d930a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

/* @flow */

import type { HeapGraphFormat } from "./types";
import type { ErrorHandler } from "./errors.js";

export type Compatibility = "browser" | "jsc-600-1-4-17" | "node-source-maps" | "node-cli" | "react-mocks";
Expand Down Expand Up @@ -48,7 +47,7 @@ export type SerializerOptions = {
inlineExpressions?: boolean,
simpleClosures?: boolean,
trace?: boolean,
heapGraphFormat?: HeapGraphFormat,
heapGraphFormat?: "DotLanguage" | "VISJS",
};

export type PartialEvaluatorOptions = {
Expand Down
3 changes: 1 addition & 2 deletions src/prepack-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

/* @flow */

import type { HeapGraphFormat } from "./types";
import type { ErrorHandler } from "./errors.js";
import type { SerializerOptions, RealmOptions, Compatibility, DebuggerOptions, ReactOutputTypes } from "./options";
import { Realm } from "./realm.js";
Expand All @@ -20,7 +19,7 @@ export type PrepackOptions = {|
additionalFunctions?: Array<string>,
abstractEffectsInAdditionalFunctions?: boolean,
lazyObjectsRuntime?: string,
heapGraphFormat?: HeapGraphFormat,
heapGraphFormat?: "DotLanguage" | "VISJS",
compatibility?: Compatibility,
debugNames?: boolean,
delayInitializations?: boolean,
Expand Down
3 changes: 1 addition & 2 deletions src/serializer/ResidualHeapGraphGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type { Modules } from "./modules.js";
import type { Realm } from "../realm.js";
import type { ObjectRefCount, AdditionalFunctionEffects } from "./types.js";
import type { ResidualHeapValueIdentifiers } from "./ResidualHeapValueIdentifiers";
import type { HeapGraphFormat } from "../types";

import invariant from "../invariant.js";
import {
Expand Down Expand Up @@ -198,7 +197,7 @@ export class ResidualHeapGraphGenerator extends ResidualHeapVisitor {
return shape;
}

generateResult(heapGraphFormat: HeapGraphFormat): string {
generateResult(heapGraphFormat: "DotLanguage" | "VISJS"): string {
return heapGraphFormat === "DotLanguage"
? this._generateDotGraphData(this._visitedValues, this._edges)
: this._generateVisJSGraphData(this._visitedValues, this._edges);
Expand Down
3 changes: 0 additions & 3 deletions src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,3 @@ export type ToType = {
// ECMA262 7.1.16
CanonicalNumericIndexString(realm: Realm, argument: StringValue): number | void,
};

// VIS.JS is used by https://prepack.io REPL to visualize the graph.
export type HeapGraphFormat = "DotLanguage" | "VISJS";

0 comments on commit 22d930a

Please sign in to comment.