Bug 1503278i - Update Debugger Frontend v98. r=dwalsh
authorJason Laster <jlaster@mozilla.com>
Tue, 30 Oct 2018 10:37:00 +0200
changeset 443658 8e3921cb196c5c0154fc855cb5151e21a293fa7c
parent 443657 d751dd2cd3370f63087f7fa36d836b86a83506b7
child 443659 1c5ee1a29757dc654cb24840ed649ca0eb0bfc06
child 443673 8b728318da55470f474845d933835ce87f8be0f4
push id34964
push useraciure@mozilla.com
push dateWed, 31 Oct 2018 05:08:54 +0000
treeherdermozilla-central@1c5ee1a29757 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1503278i - Update Debugger Frontend v98. r=dwalsh
devtools/client/debugger/new/README.mozilla
devtools/client/debugger/new/build/copy-module.js
devtools/client/debugger/new/src/actions/ast.js
devtools/client/debugger/new/src/actions/ast/moz.build
devtools/client/debugger/new/src/actions/ast/setInScopeLines.js
devtools/client/debugger/new/src/actions/breakpoints.js
devtools/client/debugger/new/src/actions/breakpoints/addBreakpoint.js
devtools/client/debugger/new/src/actions/breakpoints/index.js
devtools/client/debugger/new/src/actions/breakpoints/moz.build
devtools/client/debugger/new/src/actions/breakpoints/remapLocations.js
devtools/client/debugger/new/src/actions/breakpoints/syncBreakpoint.js
devtools/client/debugger/new/src/actions/coverage.js
devtools/client/debugger/new/src/actions/debuggee.js
devtools/client/debugger/new/src/actions/event-listeners.js
devtools/client/debugger/new/src/actions/expressions.js
devtools/client/debugger/new/src/actions/file-search.js
devtools/client/debugger/new/src/actions/index.js
devtools/client/debugger/new/src/actions/moz.build
devtools/client/debugger/new/src/actions/navigation.js
devtools/client/debugger/new/src/actions/pause/breakOnNext.js
devtools/client/debugger/new/src/actions/pause/commands.js
devtools/client/debugger/new/src/actions/pause/continueToHere.js
devtools/client/debugger/new/src/actions/pause/extra.js
devtools/client/debugger/new/src/actions/pause/fetchScopes.js
devtools/client/debugger/new/src/actions/pause/index.js
devtools/client/debugger/new/src/actions/pause/mapFrames.js
devtools/client/debugger/new/src/actions/pause/mapScopes.js
devtools/client/debugger/new/src/actions/pause/moz.build
devtools/client/debugger/new/src/actions/pause/pauseOnExceptions.js
devtools/client/debugger/new/src/actions/pause/paused.js
devtools/client/debugger/new/src/actions/pause/resumed.js
devtools/client/debugger/new/src/actions/pause/selectComponent.js
devtools/client/debugger/new/src/actions/pause/selectFrame.js
devtools/client/debugger/new/src/actions/pause/setPopupObjectProperties.js
devtools/client/debugger/new/src/actions/pause/skipPausing.js
devtools/client/debugger/new/src/actions/preview.js
devtools/client/debugger/new/src/actions/project-text-search.js
devtools/client/debugger/new/src/actions/quick-open.js
devtools/client/debugger/new/src/actions/replay.js
devtools/client/debugger/new/src/actions/source-tree.js
devtools/client/debugger/new/src/actions/sources/blackbox.js
devtools/client/debugger/new/src/actions/sources/index.js
devtools/client/debugger/new/src/actions/sources/loadSourceText.js
devtools/client/debugger/new/src/actions/sources/moz.build
devtools/client/debugger/new/src/actions/sources/newSources.js
devtools/client/debugger/new/src/actions/sources/prettyPrint.js
devtools/client/debugger/new/src/actions/sources/select.js
devtools/client/debugger/new/src/actions/sources/tabs.js
devtools/client/debugger/new/src/actions/tabs.js
devtools/client/debugger/new/src/actions/toolbox.js
devtools/client/debugger/new/src/actions/ui.js
devtools/client/debugger/new/src/actions/utils/create-store.js
devtools/client/debugger/new/src/actions/utils/middleware/history.js
devtools/client/debugger/new/src/actions/utils/middleware/log.js
devtools/client/debugger/new/src/actions/utils/middleware/moz.build
devtools/client/debugger/new/src/actions/utils/middleware/promise.js
devtools/client/debugger/new/src/actions/utils/middleware/thunk.js
devtools/client/debugger/new/src/actions/utils/middleware/timing.js
devtools/client/debugger/new/src/actions/utils/middleware/wait-service.js
devtools/client/debugger/new/src/actions/utils/moz.build
devtools/client/debugger/new/src/client/firefox.js
devtools/client/debugger/new/src/client/firefox/commands.js
devtools/client/debugger/new/src/client/firefox/create.js
devtools/client/debugger/new/src/client/firefox/events.js
devtools/client/debugger/new/src/client/firefox/fronts-device.js
devtools/client/debugger/new/src/client/firefox/moz.build
devtools/client/debugger/new/src/client/index.js
devtools/client/debugger/new/src/client/moz.build
devtools/client/debugger/new/src/components/A11yIntention.js
devtools/client/debugger/new/src/components/App.js
devtools/client/debugger/new/src/components/Editor/Breakpoint.js
devtools/client/debugger/new/src/components/Editor/Breakpoints.js
devtools/client/debugger/new/src/components/Editor/CallSite.js
devtools/client/debugger/new/src/components/Editor/CallSites.js
devtools/client/debugger/new/src/components/Editor/ConditionalPanel.js
devtools/client/debugger/new/src/components/Editor/DebugLine.js
devtools/client/debugger/new/src/components/Editor/EditorMenu.js
devtools/client/debugger/new/src/components/Editor/EmptyLines.js
devtools/client/debugger/new/src/components/Editor/Footer.js
devtools/client/debugger/new/src/components/Editor/GutterMenu.js
devtools/client/debugger/new/src/components/Editor/HighlightLine.js
devtools/client/debugger/new/src/components/Editor/HighlightLines.js
devtools/client/debugger/new/src/components/Editor/HitMarker.js
devtools/client/debugger/new/src/components/Editor/Preview/Popup.js
devtools/client/debugger/new/src/components/Editor/Preview/index.js
devtools/client/debugger/new/src/components/Editor/Preview/moz.build
devtools/client/debugger/new/src/components/Editor/SearchBar.js
devtools/client/debugger/new/src/components/Editor/Tab.js
devtools/client/debugger/new/src/components/Editor/Tabs.js
devtools/client/debugger/new/src/components/Editor/index.js
devtools/client/debugger/new/src/components/Editor/moz.build
devtools/client/debugger/new/src/components/PrimaryPanes/Outline.js
devtools/client/debugger/new/src/components/PrimaryPanes/OutlineFilter.js
devtools/client/debugger/new/src/components/PrimaryPanes/SourcesTree.js
devtools/client/debugger/new/src/components/PrimaryPanes/SourcesTreeItem.js
devtools/client/debugger/new/src/components/PrimaryPanes/index.js
devtools/client/debugger/new/src/components/PrimaryPanes/moz.build
devtools/client/debugger/new/src/components/ProjectSearch.js
devtools/client/debugger/new/src/components/QuickOpenModal.js
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/Breakpoint.js
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/BreakpointsContextMenu.js
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/ExceptionOption.js
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/index.js
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/moz.build
devtools/client/debugger/new/src/components/SecondaryPanes/CommandBar.js
devtools/client/debugger/new/src/components/SecondaryPanes/EventListeners.js
devtools/client/debugger/new/src/components/SecondaryPanes/Expressions.js
devtools/client/debugger/new/src/components/SecondaryPanes/Frames/Frame.js
devtools/client/debugger/new/src/components/SecondaryPanes/Frames/FrameMenu.js
devtools/client/debugger/new/src/components/SecondaryPanes/Frames/Group.js
devtools/client/debugger/new/src/components/SecondaryPanes/Frames/WhyPaused.js
devtools/client/debugger/new/src/components/SecondaryPanes/Frames/index.js
devtools/client/debugger/new/src/components/SecondaryPanes/Frames/moz.build
devtools/client/debugger/new/src/components/SecondaryPanes/FrameworkComponent.js
devtools/client/debugger/new/src/components/SecondaryPanes/ReactComponentStack.js
devtools/client/debugger/new/src/components/SecondaryPanes/Scopes.js
devtools/client/debugger/new/src/components/SecondaryPanes/UtilsBar.js
devtools/client/debugger/new/src/components/SecondaryPanes/Workers.js
devtools/client/debugger/new/src/components/SecondaryPanes/XHRBreakpoints.js
devtools/client/debugger/new/src/components/SecondaryPanes/index.js
devtools/client/debugger/new/src/components/SecondaryPanes/moz.build
devtools/client/debugger/new/src/components/ShortcutsModal.js
devtools/client/debugger/new/src/components/WelcomeBox.js
devtools/client/debugger/new/src/components/moz.build
devtools/client/debugger/new/src/components/shared/Accordion.js
devtools/client/debugger/new/src/components/shared/Badge.js
devtools/client/debugger/new/src/components/shared/BracketArrow.js
devtools/client/debugger/new/src/components/shared/Button/CloseButton.js
devtools/client/debugger/new/src/components/shared/Button/CommandBarButton.js
devtools/client/debugger/new/src/components/shared/Button/PaneToggleButton.js
devtools/client/debugger/new/src/components/shared/Button/index.js
devtools/client/debugger/new/src/components/shared/Button/moz.build
devtools/client/debugger/new/src/components/shared/Dropdown.js
devtools/client/debugger/new/src/components/shared/ManagedTree.js
devtools/client/debugger/new/src/components/shared/Modal.js
devtools/client/debugger/new/src/components/shared/Popover.js
devtools/client/debugger/new/src/components/shared/PreviewFunction.js
devtools/client/debugger/new/src/components/shared/ResultList.js
devtools/client/debugger/new/src/components/shared/SearchInput.js
devtools/client/debugger/new/src/components/shared/SourceIcon.js
devtools/client/debugger/new/src/components/shared/Svg.js
devtools/client/debugger/new/src/components/shared/moz.build
devtools/client/debugger/new/src/main.js
devtools/client/debugger/new/src/reducers/ast.js
devtools/client/debugger/new/src/reducers/async-requests.js
devtools/client/debugger/new/src/reducers/breakpoints.js
devtools/client/debugger/new/src/reducers/coverage.js
devtools/client/debugger/new/src/reducers/debuggee.js
devtools/client/debugger/new/src/reducers/event-listeners.js
devtools/client/debugger/new/src/reducers/expressions.js
devtools/client/debugger/new/src/reducers/file-search.js
devtools/client/debugger/new/src/reducers/index.js
devtools/client/debugger/new/src/reducers/moz.build
devtools/client/debugger/new/src/reducers/pause.js
devtools/client/debugger/new/src/reducers/pending-breakpoints.js
devtools/client/debugger/new/src/reducers/project-text-search.js
devtools/client/debugger/new/src/reducers/quick-open.js
devtools/client/debugger/new/src/reducers/replay.js
devtools/client/debugger/new/src/reducers/source-tree.js
devtools/client/debugger/new/src/reducers/sources.js
devtools/client/debugger/new/src/reducers/tabs.js
devtools/client/debugger/new/src/reducers/ui.js
devtools/client/debugger/new/src/selectors/breakpointAtLocation.js
devtools/client/debugger/new/src/selectors/breakpointSources.js
devtools/client/debugger/new/src/selectors/breakpoints.js
devtools/client/debugger/new/src/selectors/getCallStackFrames.js
devtools/client/debugger/new/src/selectors/inComponent.js
devtools/client/debugger/new/src/selectors/index.js
devtools/client/debugger/new/src/selectors/isSelectedFrameVisible.js
devtools/client/debugger/new/src/selectors/moz.build
devtools/client/debugger/new/src/selectors/visibleBreakpoints.js
devtools/client/debugger/new/src/selectors/visibleSelectedFrame.js
devtools/client/debugger/new/src/utils/DevToolsUtils.js
devtools/client/debugger/new/src/utils/assert.js
devtools/client/debugger/new/src/utils/ast.js
devtools/client/debugger/new/src/utils/asyncStoreHelper.js
devtools/client/debugger/new/src/utils/bootstrap.js
devtools/client/debugger/new/src/utils/breakpoint/astBreakpointLocation.js
devtools/client/debugger/new/src/utils/breakpoint/index.js
devtools/client/debugger/new/src/utils/breakpoint/moz.build
devtools/client/debugger/new/src/utils/build-query.js
devtools/client/debugger/new/src/utils/clipboard.js
devtools/client/debugger/new/src/utils/dbg.js
devtools/client/debugger/new/src/utils/defer.js
devtools/client/debugger/new/src/utils/editor/create-editor.js
devtools/client/debugger/new/src/utils/editor/get-expression.js
devtools/client/debugger/new/src/utils/editor/get-token-location.js
devtools/client/debugger/new/src/utils/editor/index.js
devtools/client/debugger/new/src/utils/editor/moz.build
devtools/client/debugger/new/src/utils/editor/source-documents.js
devtools/client/debugger/new/src/utils/editor/source-editor.js
devtools/client/debugger/new/src/utils/editor/source-search.js
devtools/client/debugger/new/src/utils/editor/token-events.js
devtools/client/debugger/new/src/utils/expressions.js
devtools/client/debugger/new/src/utils/fromJS.js
devtools/client/debugger/new/src/utils/function.js
devtools/client/debugger/new/src/utils/indentation.js
devtools/client/debugger/new/src/utils/isMinified.js
devtools/client/debugger/new/src/utils/location.js
devtools/client/debugger/new/src/utils/log.js
devtools/client/debugger/new/src/utils/makeRecord.js
devtools/client/debugger/new/src/utils/memoize.js
devtools/client/debugger/new/src/utils/moz.build
devtools/client/debugger/new/src/utils/path.js
devtools/client/debugger/new/src/utils/pause/frames/annotateFrames.js
devtools/client/debugger/new/src/utils/pause/frames/collapseFrames.js
devtools/client/debugger/new/src/utils/pause/frames/displayName.js
devtools/client/debugger/new/src/utils/pause/frames/getFrameUrl.js
devtools/client/debugger/new/src/utils/pause/frames/getLibraryFromUrl.js
devtools/client/debugger/new/src/utils/pause/frames/index.js
devtools/client/debugger/new/src/utils/pause/frames/moz.build
devtools/client/debugger/new/src/utils/pause/index.js
devtools/client/debugger/new/src/utils/pause/mapScopes/buildGeneratedBindingList.js
devtools/client/debugger/new/src/utils/pause/mapScopes/filtering.js
devtools/client/debugger/new/src/utils/pause/mapScopes/findGeneratedBindingFromPosition.js
devtools/client/debugger/new/src/utils/pause/mapScopes/getApplicableBindingsForOriginalPosition.js
devtools/client/debugger/new/src/utils/pause/mapScopes/getGeneratedLocationRanges.js
devtools/client/debugger/new/src/utils/pause/mapScopes/index.js
devtools/client/debugger/new/src/utils/pause/mapScopes/locColumn.js
devtools/client/debugger/new/src/utils/pause/mapScopes/mappingContains.js
devtools/client/debugger/new/src/utils/pause/mapScopes/moz.build
devtools/client/debugger/new/src/utils/pause/mapScopes/positionCmp.js
devtools/client/debugger/new/src/utils/pause/mapScopes/rangeMetadata.js
devtools/client/debugger/new/src/utils/pause/moz.build
devtools/client/debugger/new/src/utils/pause/pausePoints.js
devtools/client/debugger/new/src/utils/pause/scopes/getScope.js
devtools/client/debugger/new/src/utils/pause/scopes/getVariables.js
devtools/client/debugger/new/src/utils/pause/scopes/index.js
devtools/client/debugger/new/src/utils/pause/scopes/moz.build
devtools/client/debugger/new/src/utils/pause/scopes/utils.js
devtools/client/debugger/new/src/utils/pause/stepping.js
devtools/client/debugger/new/src/utils/pause/why.js
devtools/client/debugger/new/src/utils/prefs.js
devtools/client/debugger/new/src/utils/preview.js
devtools/client/debugger/new/src/utils/project-search.js
devtools/client/debugger/new/src/utils/quick-open.js
devtools/client/debugger/new/src/utils/result-list.js
devtools/client/debugger/new/src/utils/source-maps.js
devtools/client/debugger/new/src/utils/source-queue.js
devtools/client/debugger/new/src/utils/source.js
devtools/client/debugger/new/src/utils/sources-tree/addToTree.js
devtools/client/debugger/new/src/utils/sources-tree/collapseTree.js
devtools/client/debugger/new/src/utils/sources-tree/createTree.js
devtools/client/debugger/new/src/utils/sources-tree/formatTree.js
devtools/client/debugger/new/src/utils/sources-tree/getDirectories.js
devtools/client/debugger/new/src/utils/sources-tree/getURL.js
devtools/client/debugger/new/src/utils/sources-tree/index.js
devtools/client/debugger/new/src/utils/sources-tree/moz.build
devtools/client/debugger/new/src/utils/sources-tree/sortTree.js
devtools/client/debugger/new/src/utils/sources-tree/treeOrder.js
devtools/client/debugger/new/src/utils/sources-tree/updateTree.js
devtools/client/debugger/new/src/utils/sources-tree/utils.js
devtools/client/debugger/new/src/utils/tabs.js
devtools/client/debugger/new/src/utils/task.js
devtools/client/debugger/new/src/utils/telemetry.js
devtools/client/debugger/new/src/utils/text.js
devtools/client/debugger/new/src/utils/timings.js
devtools/client/debugger/new/src/utils/ui.js
devtools/client/debugger/new/src/utils/url.js
devtools/client/debugger/new/src/utils/utils.js
devtools/client/debugger/new/src/utils/wasm.js
devtools/client/debugger/new/src/utils/worker.js
devtools/client/debugger/new/src/workers/moz.build
devtools/client/debugger/new/src/workers/parser/getScopes/index.js
devtools/client/debugger/new/src/workers/parser/getScopes/moz.build
devtools/client/debugger/new/src/workers/parser/index.js
devtools/client/debugger/new/src/workers/parser/moz.build
devtools/client/debugger/new/src/workers/pretty-print/index.js
devtools/client/debugger/new/src/workers/pretty-print/moz.build
devtools/client/debugger/new/src/workers/search/index.js
devtools/client/debugger/new/src/workers/search/moz.build
--- a/devtools/client/debugger/new/README.mozilla
+++ b/devtools/client/debugger/new/README.mozilla
@@ -1,13 +1,13 @@
 This is the debugger.html project output.
 See https://github.com/devtools-html/debugger.html
 
-Version 97
+Version 98
 
-Comparison: https://github.com/devtools-html/debugger.html/compare/release-96...release-97
+Comparison: https://github.com/devtools-html/debugger.html/compare/release-97...release-98
 
 Packages:
 - babel-plugin-transform-es2015-modules-commonjs @6.26.2
 - babel-preset-react @6.24.1
 - react @16.4.1
 - react-dom @16.4.1
 - webpack @3.12.0
--- a/devtools/client/debugger/new/build/copy-module.js
+++ b/devtools/client/debugger/new/build/copy-module.js
@@ -2,74 +2,83 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
 const Babel = require("./babel");
 const fs = require("fs");
 const _path = require("path");
 const { execFileSync } = require("child_process");
 
-const mappings = {
-  "./source-editor": "devtools/client/sourceeditor/editor",
-  "../editor/source-editor": "devtools/client/sourceeditor/editor",
-  "./test-flag": "devtools/shared/flags",
-  "./fronts-device": "devtools/shared/fronts/device",
-  immutable: "devtools/client/shared/vendor/immutable",
-  lodash: "devtools/client/shared/vendor/lodash",
-  react: "devtools/client/shared/vendor/react",
-  "react-dom": "devtools/client/shared/vendor/react-dom",
-  "react-dom-factories": "devtools/client/shared/vendor/react-dom-factories",
-  "react-redux": "devtools/client/shared/vendor/react-redux",
-  redux: "devtools/client/shared/vendor/redux",
-  "prop-types": "devtools/client/shared/vendor/react-prop-types",
-  "devtools-services": "Services",
-
-  "wasmparser/dist/WasmParser": "devtools/client/shared/vendor/WasmParser",
-  "wasmparser/dist/WasmDis": "devtools/client/shared/vendor/WasmDis",
-
-  // The excluded files below should not be required while the Debugger runs
-  // in Firefox. Here, "devtools/shared/flags" is used as a dummy module.
+const EXCLUDED_FILES = {
   "../assets/panel/debugger.properties": "devtools/shared/flags",
   "devtools-connection": "devtools/shared/flags",
   "chrome-remote-interface": "devtools/shared/flags",
-  "devtools-launchpad": "devtools/shared/flags",
+  "devtools-launchpad": "devtools/shared/flags"
+};
 
-  "devtools-reps": "devtools/client/shared/components/reps/reps.js",
-  "devtools-source-map": "devtools/client/shared/source-map/index.js",
-};
+const mappings =  Object.assign(
+  {
+    "./source-editor": "devtools/client/sourceeditor/editor",
+    "../editor/source-editor": "devtools/client/sourceeditor/editor",
+    "./test-flag": "devtools/shared/flags",
+    "./fronts-device": "devtools/shared/fronts/device",
+    immutable: "devtools/client/shared/vendor/immutable",
+    lodash: "devtools/client/shared/vendor/lodash",
+    react: "devtools/client/shared/vendor/react",
+    "react-dom": "devtools/client/shared/vendor/react-dom",
+    "react-dom-factories": "devtools/client/shared/vendor/react-dom-factories",
+    "react-redux": "devtools/client/shared/vendor/react-redux",
+    redux: "devtools/client/shared/vendor/redux",
+    "prop-types": "devtools/client/shared/vendor/react-prop-types",
+    "devtools-services": "Services",
+    "wasmparser/dist/WasmParser": "devtools/client/shared/vendor/WasmParser",
+    "wasmparser/dist/WasmDis": "devtools/client/shared/vendor/WasmDis"
+  },
+  EXCLUDED_FILES
+);
+
 const mappingValues = Object.values(mappings);
 
+// Add two additional mappings that cannot be reused when creating the
+// webpack bundles.
+mappings["devtools-reps"] = "devtools/client/shared/components/reps/reps.js";
+mappings["devtools-source-map"] = "devtools/client/shared/source-map/index.js";
+
+function isRequire(t, node) {
+  return node && t.isCallExpression(node) && node.callee.name == "require";
+}
+
+function isImport(t, node) {
+  return node && t.isImportDeclaration(node);
+}
+
 // List of vendored modules.
 // Should be synchronized with vendors.js
 const VENDORS = [
   "classnames",
   "devtools-components",
   "devtools-config",
   "devtools-contextmenu",
   "devtools-environment",
   "devtools-modules",
   "devtools-splitter",
   "devtools-utils",
   "fuzzaldrin-plus",
   "lodash-move",
   "react-aria-components/src/tabs",
   "react-transition-group/Transition",
   "reselect",
-  "Svg",
+  "Svg"
 ];
 
 const moduleMapping = {
   Telemetry: "devtools/client/shared/telemetry",
   asyncStorage: "devtools/shared/async-storage"
 };
 
-function isRequire(t, node) {
-  return node && t.isCallExpression(node) && node.callee.name == "require";
-}
-
 /*
  * Updates devtools-modules imports such as
  * `import { Telemetry } from "devtools-modules"`
  * so that we can customize how we resolve certain modules in the package
  *
  * In the case of multiple declarations we need to move
  * the telemetry module into its own import.
  */
@@ -186,17 +195,17 @@ function transformMC({ types: t }) {
           !(value.startsWith("devtools") || mappingValues.includes(value))
         ) {
           path.replaceWith(t.stringLiteral(`${value}/index`));
           return;
         }
       }
     }
   };
-}
+};
 
 Babel.registerPlugin("transform-mc", transformMC);
 
 function transform(filePath) {
   const doc = fs.readFileSync(filePath, "utf8");
   const out = Babel.transform(doc, {
     plugins: [
 			"transform-flow-strip-types",
--- a/devtools/client/debugger/new/src/actions/ast.js
+++ b/devtools/client/debugger/new/src/actions/ast.js
@@ -1,155 +1,149 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.setSourceMetaData = setSourceMetaData;
-exports.setSymbols = setSymbols;
-exports.setOutOfScopeLocations = setOutOfScopeLocations;
-exports.setPausePoints = setPausePoints;
-
-var _selectors = require("../selectors/index");
-
-var _pause = require("./pause/index");
-
-var _tabs = require("./tabs");
-
-var _setInScopeLines = require("./ast/setInScopeLines");
-
-var _parser = require("../workers/parser/index");
-
-var _promise = require("./utils/middleware/promise");
-
-var _prefs = require("../utils/prefs");
-
-var _source = require("../utils/source");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function setSourceMetaData(sourceId) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    const source = (0, _selectors.getSource)(getState(), sourceId);
+
+// @flow
+
+import {
+  getSource,
+  getSourceFromId,
+  hasSymbols,
+  getSelectedLocation,
+  isPaused
+} from "../selectors";
+
+import { mapFrames, fetchExtra } from "./pause";
+import { updateTab } from "./tabs";
 
-    if (!source || !(0, _source.isLoaded)(source) || source.isWasm) {
+import { setInScopeLines } from "./ast/setInScopeLines";
+import {
+  getSymbols,
+  findOutOfScopeLocations,
+  getFramework,
+  getPausePoints,
+  type AstPosition
+} from "../workers/parser";
+
+import { PROMISE } from "./utils/middleware/promise";
+import { features } from "../utils/prefs";
+import { isLoaded, isGenerated } from "../utils/source";
+
+import type { SourceId } from "../types";
+import type { ThunkArgs, Action } from "./types";
+
+export function setSourceMetaData(sourceId: SourceId) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
+    const source = getSource(getState(), sourceId);
+    if (!source || !isLoaded(source) || source.isWasm) {
       return;
     }
 
-    const framework = await (0, _parser.getFramework)(source.id);
-
+    const framework = await getFramework(source.id);
     if (framework) {
-      dispatch((0, _tabs.updateTab)(source, framework));
+      dispatch(updateTab(source, framework));
     }
 
-    dispatch({
-      type: "SET_SOURCE_METADATA",
-      sourceId: source.id,
-      sourceMetaData: {
-        framework
-      }
-    });
+    dispatch(
+      ({
+        type: "SET_SOURCE_METADATA",
+        sourceId: source.id,
+        sourceMetaData: {
+          framework
+        }
+      }: Action)
+    );
   };
 }
 
-function setSymbols(sourceId) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    const source = (0, _selectors.getSourceFromId)(getState(), sourceId);
+export function setSymbols(sourceId: SourceId) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
+    const source = getSourceFromId(getState(), sourceId);
 
-    if (source.isWasm || (0, _selectors.hasSymbols)(getState(), source) || !(0, _source.isLoaded)(source)) {
+    if (source.isWasm || hasSymbols(getState(), source) || !isLoaded(source)) {
       return;
     }
 
     await dispatch({
       type: "SET_SYMBOLS",
       sourceId,
-      [_promise.PROMISE]: (0, _parser.getSymbols)(sourceId)
+      [PROMISE]: getSymbols(sourceId)
     });
 
-    if ((0, _selectors.isPaused)(getState())) {
-      await dispatch((0, _pause.fetchExtra)());
-      await dispatch((0, _pause.mapFrames)());
+    if (isPaused(getState())) {
+      await dispatch(fetchExtra());
+      await dispatch(mapFrames());
     }
 
     await dispatch(setPausePoints(sourceId));
     await dispatch(setSourceMetaData(sourceId));
   };
 }
 
-function setOutOfScopeLocations() {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    const location = (0, _selectors.getSelectedLocation)(getState());
-
+export function setOutOfScopeLocations() {
+  return async ({ dispatch, getState }: ThunkArgs) => {
+    const location = getSelectedLocation(getState());
     if (!location) {
       return;
     }
 
-    const source = (0, _selectors.getSourceFromId)(getState(), location.sourceId);
-    let locations = null;
+    const source = getSourceFromId(getState(), location.sourceId);
 
-    if (location.line && source && !source.isWasm && (0, _selectors.isPaused)(getState())) {
-      locations = await (0, _parser.findOutOfScopeLocations)(source.id, location);
+    let locations = null;
+    if (location.line && source && !source.isWasm && isPaused(getState())) {
+      locations = await findOutOfScopeLocations(
+        source.id,
+        ((location: any): AstPosition)
+      );
     }
 
-    dispatch({
-      type: "OUT_OF_SCOPE_LOCATIONS",
-      locations
-    });
-    dispatch((0, _setInScopeLines.setInScopeLines)());
+    dispatch(
+      ({
+        type: "OUT_OF_SCOPE_LOCATIONS",
+        locations
+      }: Action)
+    );
+    dispatch(setInScopeLines());
   };
 }
 
 function compressPausePoints(pausePoints) {
   const compressed = {};
-
   for (const line in pausePoints) {
     compressed[line] = {};
-
     for (const col in pausePoints[line]) {
       const point = pausePoints[line][col];
       compressed[line][col] = (point.break ? 1 : 0) | (point.step ? 2 : 0);
     }
   }
 
   return compressed;
 }
 
-function setPausePoints(sourceId) {
-  return async ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const source = (0, _selectors.getSourceFromId)(getState(), sourceId);
-
-    if (!_prefs.features.pausePoints || !source || !source.text) {
+export function setPausePoints(sourceId: SourceId) {
+  return async ({ dispatch, getState, client }: ThunkArgs) => {
+    const source = getSourceFromId(getState(), sourceId);
+    if (!features.pausePoints || !source || !source.text) {
       return;
     }
 
     if (source.isWasm) {
       return;
     }
 
-    const pausePoints = await (0, _parser.getPausePoints)(sourceId);
+    const pausePoints = await getPausePoints(sourceId);
     const compressed = compressPausePoints(pausePoints);
 
-    if ((0, _source.isGenerated)(source)) {
+    if (isGenerated(source)) {
       await client.setPausePoints(sourceId, compressed);
     }
 
-    dispatch({
-      type: "SET_PAUSE_POINTS",
-      sourceText: source.text || "",
-      sourceId,
-      pausePoints
-    });
+    dispatch(
+      ({
+        type: "SET_PAUSE_POINTS",
+        sourceText: source.text || "",
+        sourceId,
+        pausePoints
+      }: Action)
+    );
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/ast/moz.build
+++ b/devtools/client/debugger/new/src/actions/ast/moz.build
@@ -2,11 +2,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DevToolsModules(
+DebuggerModules(
     'setInScopeLines.js',
 )
--- a/devtools/client/debugger/new/src/actions/ast/setInScopeLines.js
+++ b/devtools/client/debugger/new/src/actions/ast/setInScopeLines.js
@@ -1,46 +1,45 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.setInScopeLines = setInScopeLines;
-
-var _selectors = require("../../selectors/index");
-
-var _source = require("../../utils/source");
-
-var _lodash = require("devtools/client/shared/vendor/lodash");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function getOutOfScopeLines(outOfScopeLocations) {
+
+import { getOutOfScopeLocations, getSelectedSource } from "../../selectors";
+import { getSourceLineCount } from "../../utils/source";
+
+import { range, flatMap, uniq, without } from "lodash";
+
+function getOutOfScopeLines(outOfScopeLocations: AstLocation[]) {
   if (!outOfScopeLocations) {
     return null;
   }
 
-  return (0, _lodash.uniq)((0, _lodash.flatMap)(outOfScopeLocations, location => (0, _lodash.range)(location.start.line, location.end.line)));
+  return uniq(
+    flatMap(outOfScopeLocations, location =>
+      range(location.start.line, location.end.line)
+    )
+  );
 }
 
-function setInScopeLines() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    const source = (0, _selectors.getSelectedSource)(getState());
-    const outOfScopeLocations = (0, _selectors.getOutOfScopeLocations)(getState());
+export function setInScopeLines() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    const source = getSelectedSource(getState());
+    const outOfScopeLocations = getOutOfScopeLocations(getState());
 
     if (!source || !source.text) {
       return;
     }
 
     const linesOutOfScope = getOutOfScopeLines(outOfScopeLocations);
-    const sourceNumLines = (0, _source.getSourceLineCount)(source);
-    const sourceLines = (0, _lodash.range)(1, sourceNumLines + 1);
-    const inScopeLines = !linesOutOfScope ? sourceLines : (0, _lodash.without)(sourceLines, ...linesOutOfScope);
+
+    const sourceNumLines = getSourceLineCount(source);
+    const sourceLines = range(1, sourceNumLines + 1);
+
+    const inScopeLines = !linesOutOfScope
+      ? sourceLines
+      : without(sourceLines, ...linesOutOfScope);
+
     dispatch({
       type: "IN_SCOPE_LINES",
       lines: inScopeLines
     });
   };
-}
\ No newline at end of file
+}
deleted file mode 100644
--- a/devtools/client/debugger/new/src/actions/breakpoints.js
+++ /dev/null
@@ -1,534 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.syncBreakpoint = syncBreakpoint;
-exports.addBreakpoint = addBreakpoint;
-exports.addHiddenBreakpoint = addHiddenBreakpoint;
-exports.removeBreakpoint = removeBreakpoint;
-exports.enableBreakpoint = enableBreakpoint;
-exports.disableBreakpoint = disableBreakpoint;
-exports.toggleAllBreakpoints = toggleAllBreakpoints;
-exports.toggleBreakpoints = toggleBreakpoints;
-exports.removeAllBreakpoints = removeAllBreakpoints;
-exports.removeBreakpoints = removeBreakpoints;
-exports.remapBreakpoints = remapBreakpoints;
-exports.setBreakpointCondition = setBreakpointCondition;
-exports.toggleBreakpoint = toggleBreakpoint;
-exports.toggleBreakpointsAtLine = toggleBreakpointsAtLine;
-exports.addOrToggleDisabledBreakpoint = addOrToggleDisabledBreakpoint;
-exports.toggleDisabledBreakpoint = toggleDisabledBreakpoint;
-
-var _promise = require("./utils/middleware/promise");
-
-var _selectors = require("../selectors/index");
-
-var _breakpoint = require("../utils/breakpoint/index");
-
-var _addBreakpoint = require("./breakpoints/addBreakpoint");
-
-var _addBreakpoint2 = _interopRequireDefault(_addBreakpoint);
-
-var _remapLocations = require("./breakpoints/remapLocations");
-
-var _remapLocations2 = _interopRequireDefault(_remapLocations);
-
-var _ast = require("../reducers/ast");
-
-var _syncBreakpoint = require("./breakpoints/syncBreakpoint");
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-
-/**
- * Redux actions for breakpoints
- * @module actions/breakpoints
- */
-// this will need to be changed so that addCLientBreakpoint is removed
-
-/**
- * Syncing a breakpoint add breakpoint information that is stored, and
- * contact the server for more data.
- *
- * @memberof actions/breakpoints
- * @static
- * @param {String} $1.sourceId String  value
- * @param {PendingBreakpoint} $1.location PendingBreakpoint  value
- */
-function syncBreakpoint(sourceId, pendingBreakpoint) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const response = await (0, _syncBreakpoint.syncClientBreakpoint)(getState, client, sourceMaps, sourceId, pendingBreakpoint);
-
-    if (!response) {
-      return;
-    }
-
-    const {
-      breakpoint,
-      previousLocation
-    } = response;
-    return dispatch({
-      type: "SYNC_BREAKPOINT",
-      breakpoint,
-      previousLocation
-    });
-  };
-}
-/**
- * Add a new breakpoint
- *
- * @memberof actions/breakpoints
- * @static
- * @param {String} $1.condition Conditional breakpoint condition value
- * @param {Boolean} $1.disabled Disable value for breakpoint value
- */
-
-
-function addBreakpoint(location, {
-  condition,
-  hidden
-} = {}) {
-  const breakpoint = (0, _breakpoint.createBreakpoint)(location, {
-    condition,
-    hidden
-  });
-  return ({
-    dispatch,
-    getState,
-    sourceMaps,
-    client
-  }) => {
-    return dispatch({
-      type: "ADD_BREAKPOINT",
-      breakpoint,
-      [_promise.PROMISE]: (0, _addBreakpoint2.default)(getState, client, sourceMaps, breakpoint)
-    });
-  };
-}
-/**
- * Add a new hidden breakpoint
- *
- * @memberOf actions/breakpoints
- * @param location
- * @return {function(ThunkArgs)}
- */
-
-
-function addHiddenBreakpoint(location) {
-  return ({
-    dispatch
-  }) => {
-    return dispatch(addBreakpoint(location, {
-      hidden: true
-    }));
-  };
-}
-/**
- * Remove a single breakpoint
- *
- * @memberof actions/breakpoints
- * @static
- */
-
-
-function removeBreakpoint(location) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const bp = (0, _selectors.getBreakpoint)(getState(), location);
-
-    if (!bp || bp.loading) {
-      return;
-    } // If the breakpoint is already disabled, we don't need to communicate
-    // with the server. We just need to dispatch an action
-    // simulating a successful server request
-
-
-    if (bp.disabled) {
-      return dispatch({
-        type: "REMOVE_BREAKPOINT",
-        breakpoint: bp,
-        status: "done"
-      });
-    }
-
-    return dispatch({
-      type: "REMOVE_BREAKPOINT",
-      breakpoint: bp,
-      disabled: false,
-      [_promise.PROMISE]: client.removeBreakpoint(bp.generatedLocation)
-    });
-  };
-}
-/**
- * Enabling a breakpoint
- * will reuse the existing breakpoint information that is stored.
- *
- * @memberof actions/breakpoints
- * @static
- * @param {Location} $1.location Location  value
- */
-
-
-function enableBreakpoint(location) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const breakpoint = (0, _selectors.getBreakpoint)(getState(), location);
-
-    if (!breakpoint || breakpoint.loading) {
-      return;
-    } // To instantly reflect in the UI, we optimistically enable the breakpoint
-
-
-    const enabledBreakpoint = { ...breakpoint,
-      disabled: false
-    };
-    return dispatch({
-      type: "ENABLE_BREAKPOINT",
-      breakpoint: enabledBreakpoint,
-      [_promise.PROMISE]: (0, _addBreakpoint2.default)(getState, client, sourceMaps, breakpoint)
-    });
-  };
-}
-/**
- * Disable a single breakpoint
- *
- * @memberof actions/breakpoints
- * @static
- */
-
-
-function disableBreakpoint(location) {
-  return async ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const bp = (0, _selectors.getBreakpoint)(getState(), location);
-
-    if (!bp || bp.loading) {
-      return;
-    }
-
-    await client.removeBreakpoint(bp.generatedLocation);
-    const newBreakpoint = { ...bp,
-      disabled: true
-    };
-    return dispatch({
-      type: "DISABLE_BREAKPOINT",
-      breakpoint: newBreakpoint
-    });
-  };
-}
-/**
- * Toggle All Breakpoints
- *
- * @memberof actions/breakpoints
- * @static
- */
-
-
-function toggleAllBreakpoints(shouldDisableBreakpoints) {
-  return async ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const breakpoints = (0, _selectors.getBreakpoints)(getState());
-    const modifiedBreakpoints = [];
-
-    for (const [, breakpoint] of breakpoints) {
-      if (shouldDisableBreakpoints) {
-        await client.removeBreakpoint(breakpoint.generatedLocation);
-        const newBreakpoint = { ...breakpoint,
-          disabled: true
-        };
-        modifiedBreakpoints.push(newBreakpoint);
-      } else {
-        const newBreakpoint = { ...breakpoint,
-          disabled: false
-        };
-        modifiedBreakpoints.push(newBreakpoint);
-      }
-    }
-
-    if (shouldDisableBreakpoints) {
-      return dispatch({
-        type: "DISABLE_ALL_BREAKPOINTS",
-        breakpoints: modifiedBreakpoints
-      });
-    }
-
-    return dispatch({
-      type: "ENABLE_ALL_BREAKPOINTS",
-      breakpoints: modifiedBreakpoints
-    });
-  };
-}
-/**
- * Toggle Breakpoints
- *
- * @memberof actions/breakpoints
- * @static
- */
-
-
-function toggleBreakpoints(shouldDisableBreakpoints, breakpoints) {
-  return async ({
-    dispatch
-  }) => {
-    const promises = breakpoints.valueSeq().toJS().map(([, breakpoint]) => shouldDisableBreakpoints ? dispatch(disableBreakpoint(breakpoint.location)) : dispatch(enableBreakpoint(breakpoint.location)));
-    await Promise.all(promises);
-  };
-}
-/**
- * Removes all breakpoints
- *
- * @memberof actions/breakpoints
- * @static
- */
-
-
-function removeAllBreakpoints() {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    const breakpointList = (0, _selectors.getBreakpoints)(getState()).valueSeq().toJS();
-    return Promise.all(breakpointList.map(bp => dispatch(removeBreakpoint(bp.location))));
-  };
-}
-/**
- * Removes breakpoints
- *
- * @memberof actions/breakpoints
- * @static
- */
-
-
-function removeBreakpoints(breakpoints) {
-  return async ({
-    dispatch
-  }) => {
-    const breakpointList = breakpoints.valueSeq().toJS();
-    return Promise.all(breakpointList.map(bp => dispatch(removeBreakpoint(bp.location))));
-  };
-}
-
-function remapBreakpoints(sourceId) {
-  return async ({
-    dispatch,
-    getState,
-    sourceMaps
-  }) => {
-    const breakpoints = (0, _selectors.getBreakpoints)(getState());
-    const newBreakpoints = await (0, _remapLocations2.default)(breakpoints, sourceId, sourceMaps);
-    return dispatch({
-      type: "REMAP_BREAKPOINTS",
-      breakpoints: newBreakpoints
-    });
-  };
-}
-/**
- * Update the condition of a breakpoint.
- *
- * @throws {Error} "not implemented"
- * @memberof actions/breakpoints
- * @static
- * @param {Location} location
- *        @see DebuggerController.Breakpoints.addBreakpoint
- * @param {string} condition
- *        The condition to set on the breakpoint
- * @param {Boolean} $1.disabled Disable value for breakpoint value
- */
-
-
-function setBreakpointCondition(location, {
-  condition
-} = {}) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const bp = (0, _selectors.getBreakpoint)(getState(), location);
-
-    if (!bp) {
-      return dispatch(addBreakpoint(location, {
-        condition
-      }));
-    }
-
-    if (bp.loading) {
-      return;
-    }
-
-    if (bp.disabled) {
-      await dispatch(enableBreakpoint(location));
-      bp.disabled = !bp.disabled;
-    }
-
-    await client.setBreakpointCondition(bp.id, location, condition, sourceMaps.isOriginalId(bp.location.sourceId));
-    const newBreakpoint = { ...bp,
-      condition
-    };
-    (0, _breakpoint.assertBreakpoint)(newBreakpoint);
-    return dispatch({
-      type: "SET_BREAKPOINT_CONDITION",
-      breakpoint: newBreakpoint
-    });
-  };
-}
-
-function toggleBreakpoint(line, column) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const state = getState();
-    const selectedSource = (0, _selectors.getSelectedSource)(state);
-
-    if (!line || !selectedSource) {
-      return;
-    }
-
-    const bp = (0, _selectors.getBreakpointAtLocation)(state, {
-      line,
-      column
-    });
-    const isEmptyLine = (0, _ast.isEmptyLineInSource)(state, line, selectedSource.id);
-
-    if (!bp && isEmptyLine || bp && bp.loading) {
-      return;
-    }
-
-    if (bp) {
-      // NOTE: it's possible the breakpoint has slid to a column
-      return dispatch(removeBreakpoint({
-        sourceId: bp.location.sourceId,
-        sourceUrl: bp.location.sourceUrl,
-        line: bp.location.line,
-        column: column || bp.location.column
-      }));
-    }
-
-    return dispatch(addBreakpoint({
-      sourceId: selectedSource.id,
-      sourceUrl: selectedSource.url,
-      line: line,
-      column: column
-    }));
-  };
-}
-
-function toggleBreakpointsAtLine(line, column) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const state = getState();
-    const selectedSource = (0, _selectors.getSelectedSource)(state);
-
-    if (!line || !selectedSource) {
-      return;
-    }
-
-    const bps = (0, _selectors.getBreakpointsAtLine)(state, line);
-    const isEmptyLine = (0, _ast.isEmptyLineInSource)(state, line, selectedSource.id);
-
-    if (isEmptyLine) {
-      return;
-    }
-
-    if (bps.size === 0) {
-      return dispatch(addBreakpoint({
-        sourceId: selectedSource.id,
-        sourceUrl: selectedSource.url,
-        line,
-        column
-      }));
-    }
-
-    return Promise.all(bps.map(bp => dispatch(removeBreakpoint(bp.location))));
-  };
-}
-
-function addOrToggleDisabledBreakpoint(line, column) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const selectedSource = (0, _selectors.getSelectedSource)(getState());
-
-    if (!line || !selectedSource) {
-      return;
-    }
-
-    const bp = (0, _selectors.getBreakpointAtLocation)(getState(), {
-      line,
-      column
-    });
-
-    if (bp && bp.loading) {
-      return;
-    }
-
-    if (bp) {
-      // NOTE: it's possible the breakpoint has slid to a column
-      return dispatch(toggleDisabledBreakpoint(line, column || bp.location.column));
-    }
-
-    return dispatch(addBreakpoint({
-      sourceId: selectedSource.id,
-      sourceUrl: selectedSource.url,
-      line: line,
-      column: column
-    }));
-  };
-}
-
-function toggleDisabledBreakpoint(line, column) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const bp = (0, _selectors.getBreakpointAtLocation)(getState(), {
-      line,
-      column
-    });
-
-    if (!bp || bp.loading) {
-      return;
-    }
-
-    if (!bp.disabled) {
-      return dispatch(disableBreakpoint(bp.location));
-    }
-
-    return dispatch(enableBreakpoint(bp.location));
-  };
-}
\ No newline at end of file
--- a/devtools/client/debugger/new/src/actions/breakpoints/addBreakpoint.js
+++ b/devtools/client/debugger/new/src/actions/breakpoints/addBreakpoint.js
@@ -1,164 +1,156 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.addHiddenBreakpoint = addHiddenBreakpoint;
-exports.enableBreakpoint = enableBreakpoint;
-exports.addBreakpoint = addBreakpoint;
-
-var _devtoolsSourceMap = require("devtools/client/shared/source-map/index.js");
-
-var _breakpoint = require("../../utils/breakpoint/index");
-
-var _promise = require("../utils/middleware/promise");
-
-var _selectors = require("../../selectors/index");
-
-var _sourceMaps = require("../../utils/source-maps");
-
-var _source = require("../../utils/source");
-
-var _telemetry = require("../../utils/telemetry");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+
+import { isOriginalId } from "devtools-source-map";
+import {
+  locationMoved,
+  breakpointExists,
+  assertBreakpoint,
+  createBreakpoint,
+  getASTLocation,
+  assertLocation
+} from "../../utils/breakpoint";
+import { PROMISE } from "../utils/middleware/promise";
+import { getSource, getSymbols, getBreakpoint } from "../../selectors";
+import { getGeneratedLocation } from "../../utils/source-maps";
+import { getTextAtPosition } from "../../utils/source";
+import { recordEvent } from "../../utils/telemetry";
+
 async function addBreakpointPromise(getState, client, sourceMaps, breakpoint) {
   const state = getState();
-  const source = (0, _selectors.getSource)(state, breakpoint.location.sourceId);
-  const location = { ...breakpoint.location,
+  const source = getSource(state, breakpoint.location.sourceId);
+
+  const location = {
+    ...breakpoint.location,
     sourceId: source.id,
     sourceUrl: source.url
   };
-  const generatedLocation = await (0, _sourceMaps.getGeneratedLocation)(state, source, location, sourceMaps);
-  const generatedSource = (0, _selectors.getSource)(state, generatedLocation.sourceId);
-  (0, _breakpoint.assertLocation)(location);
-  (0, _breakpoint.assertLocation)(generatedLocation);
+
+  const generatedLocation = await getGeneratedLocation(
+    state,
+    source,
+    location,
+    sourceMaps
+  );
 
-  if ((0, _breakpoint.breakpointExists)(state, location)) {
-    const newBreakpoint = { ...breakpoint,
-      location,
-      generatedLocation
-    };
-    (0, _breakpoint.assertBreakpoint)(newBreakpoint);
-    return {
-      breakpoint: newBreakpoint
-    };
+  const generatedSource = getSource(state, generatedLocation.sourceId);
+
+  assertLocation(location);
+  assertLocation(generatedLocation);
+
+  if (breakpointExists(state, location)) {
+    const newBreakpoint = { ...breakpoint, location, generatedLocation };
+    assertBreakpoint(newBreakpoint);
+    return { breakpoint: newBreakpoint };
   }
 
-  const {
-    id,
-    hitCount,
-    actualLocation
-  } = await client.setBreakpoint(generatedLocation, breakpoint.condition, (0, _devtoolsSourceMap.isOriginalId)(location.sourceId));
+  const { id, hitCount, actualLocation } = await client.setBreakpoint(
+    generatedLocation,
+    breakpoint.condition,
+    isOriginalId(location.sourceId)
+  );
+
   const newGeneratedLocation = actualLocation || generatedLocation;
-  const newLocation = await sourceMaps.getOriginalLocation(newGeneratedLocation);
-  const symbols = (0, _selectors.getSymbols)(getState(), source);
-  const astLocation = await (0, _breakpoint.getASTLocation)(source, symbols, newLocation);
-  const originalText = (0, _source.getTextAtPosition)(source, location);
-  const text = (0, _source.getTextAtPosition)(generatedSource, actualLocation);
+  const newLocation = await sourceMaps.getOriginalLocation(
+    newGeneratedLocation
+  );
+
+  const symbols = getSymbols(getState(), source);
+  const astLocation = await getASTLocation(source, symbols, newLocation);
+
+  const originalText = getTextAtPosition(source, location);
+  const text = getTextAtPosition(generatedSource, actualLocation);
+
   const newBreakpoint = {
     id,
     disabled: false,
     hidden: breakpoint.hidden,
     loading: false,
     condition: breakpoint.condition,
     location: newLocation,
     astLocation,
     hitCount,
     generatedLocation: newGeneratedLocation,
     text,
     originalText
   };
-  (0, _breakpoint.assertBreakpoint)(newBreakpoint);
-  const previousLocation = (0, _breakpoint.locationMoved)(location, newLocation) ? location : null;
+
+  assertBreakpoint(newBreakpoint);
+
+  const previousLocation = locationMoved(location, newLocation)
+    ? location
+    : null;
+
   return {
     breakpoint: newBreakpoint,
     previousLocation
   };
 }
+
 /**
  * Add a new hidden breakpoint
  *
  * @memberOf actions/breakpoints
  * @param location
  * @return {function(ThunkArgs)}
  */
-
-
-function addHiddenBreakpoint(location) {
-  return ({
-    dispatch
-  }) => {
-    return dispatch(addBreakpoint(location, {
-      hidden: true
-    }));
+export function addHiddenBreakpoint(location: Location) {
+  return ({ dispatch }: ThunkArgs) => {
+    return dispatch(addBreakpoint(location, { hidden: true }));
   };
 }
+
 /**
  * Enabling a breakpoint
  * will reuse the existing breakpoint information that is stored.
  *
  * @memberof actions/breakpoints
  * @static
  * @param {Location} $1.location Location  value
  */
-
-
-function enableBreakpoint(location) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const breakpoint = (0, _selectors.getBreakpoint)(getState(), location);
-
+export function enableBreakpoint(location: Location) {
+  return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
+    const breakpoint = getBreakpoint(getState(), location);
     if (!breakpoint || breakpoint.loading) {
       return;
-    } // To instantly reflect in the UI, we optimistically enable the breakpoint
+    }
 
-
-    const enabledBreakpoint = { ...breakpoint,
+    // To instantly reflect in the UI, we optimistically enable the breakpoint
+    const enabledBreakpoint = {
+      ...breakpoint,
       disabled: false
     };
+
     return dispatch({
       type: "ENABLE_BREAKPOINT",
       breakpoint: enabledBreakpoint,
-      [_promise.PROMISE]: addBreakpointPromise(getState, client, sourceMaps, breakpoint)
+      [PROMISE]: addBreakpointPromise(getState, client, sourceMaps, breakpoint)
     });
   };
 }
+
 /**
  * Add a new breakpoint
  *
  * @memberof actions/breakpoints
  * @static
  * @param {String} $1.condition Conditional breakpoint condition value
  * @param {Boolean} $1.disabled Disable value for breakpoint value
  */
 
+export function addBreakpoint(
+  location: Location,
+  { condition, hidden }: addBreakpointOptions = {}
+) {
+  const breakpoint = createBreakpoint(location, { condition, hidden });
+  return ({ dispatch, getState, sourceMaps, client }: ThunkArgs) => {
+    recordEvent("add_breakpoint");
 
-function addBreakpoint(location, {
-  condition,
-  hidden
-} = {}) {
-  const breakpoint = (0, _breakpoint.createBreakpoint)(location, {
-    condition,
-    hidden
-  });
-  return ({
-    dispatch,
-    getState,
-    sourceMaps,
-    client
-  }) => {
-    (0, _telemetry.recordEvent)("add_breakpoint");
     return dispatch({
       type: "ADD_BREAKPOINT",
       breakpoint,
-      [_promise.PROMISE]: addBreakpointPromise(getState, client, sourceMaps, breakpoint)
+      [PROMISE]: addBreakpointPromise(getState, client, sourceMaps, breakpoint)
     });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/breakpoints/index.js
+++ b/devtools/client/debugger/new/src/actions/breakpoints/index.js
@@ -1,540 +1,491 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.syncBreakpoint = exports.enableBreakpoint = exports.addHiddenBreakpoint = exports.addBreakpoint = undefined;
-exports.removeBreakpoint = removeBreakpoint;
-exports.disableBreakpoint = disableBreakpoint;
-exports.toggleAllBreakpoints = toggleAllBreakpoints;
-exports.toggleBreakpoints = toggleBreakpoints;
-exports.removeAllBreakpoints = removeAllBreakpoints;
-exports.removeBreakpoints = removeBreakpoints;
-exports.remapBreakpoints = remapBreakpoints;
-exports.setBreakpointCondition = setBreakpointCondition;
-exports.toggleBreakpoint = toggleBreakpoint;
-exports.toggleBreakpointsAtLine = toggleBreakpointsAtLine;
-exports.addOrToggleDisabledBreakpoint = addOrToggleDisabledBreakpoint;
-exports.toggleDisabledBreakpoint = toggleDisabledBreakpoint;
-exports.enableXHRBreakpoint = enableXHRBreakpoint;
-exports.disableXHRBreakpoint = disableXHRBreakpoint;
-exports.updateXHRBreakpoint = updateXHRBreakpoint;
-exports.togglePauseOnAny = togglePauseOnAny;
-exports.setXHRBreakpoint = setXHRBreakpoint;
-exports.removeXHRBreakpoint = removeXHRBreakpoint;
-
-var _devtoolsSourceMap = require("devtools/client/shared/source-map/index.js");
-
-var _promise = require("../utils/middleware/promise");
-
-var _selectors = require("../../selectors/index");
-
-var _breakpoint = require("../../utils/breakpoint/index");
-
-var _addBreakpoint = require("./addBreakpoint");
-
-var _remapLocations = require("./remapLocations");
-
-var _remapLocations2 = _interopRequireDefault(_remapLocations);
-
-var _syncBreakpoint = require("./syncBreakpoint");
-
-var _ast = require("../../reducers/ast");
-
-var _telemetry = require("../../utils/telemetry");
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
 /**
  * Redux actions for breakpoints
  * @module actions/breakpoints
  */
 
+import { isOriginalId } from "devtools-source-map";
+import { PROMISE } from "../utils/middleware/promise";
+import {
+  getBreakpoint,
+  getBreakpoints,
+  getXHRBreakpoints,
+  getSelectedSource,
+  getBreakpointAtLocation,
+  getBreakpointsAtLine
+} from "../../selectors";
+import { assertBreakpoint, createXHRBreakpoint } from "../../utils/breakpoint";
+import {
+  addBreakpoint,
+  addHiddenBreakpoint,
+  enableBreakpoint
+} from "./addBreakpoint";
+import remapLocations from "./remapLocations";
+import { syncBreakpoint } from "./syncBreakpoint";
+import { isEmptyLineInSource } from "../../reducers/ast";
+
+// this will need to be changed so that addCLientBreakpoint is removed
+
+import type { ThunkArgs, Action } from "../types";
+import type { Breakpoint, Location, XHRBreakpoint } from "../../types";
+import type { BreakpointsMap } from "../../reducers/types";
+
+import { recordEvent } from "../../utils/telemetry";
+
+type addBreakpointOptions = {
+  condition?: string,
+  hidden?: boolean
+};
+
 /**
  * Remove a single breakpoint
  *
  * @memberof actions/breakpoints
  * @static
  */
-function removeBreakpoint(location) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const bp = (0, _selectors.getBreakpoint)(getState(), location);
-
+export function removeBreakpoint(location: Location) {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const bp = getBreakpoint(getState(), location);
     if (!bp || bp.loading) {
       return;
     }
 
-    (0, _telemetry.recordEvent)("remove_breakpoint"); // If the breakpoint is already disabled, we don't need to communicate
+    recordEvent("remove_breakpoint");
+
+    // If the breakpoint is already disabled, we don't need to communicate
     // with the server. We just need to dispatch an action
     // simulating a successful server request
-
     if (bp.disabled) {
-      return dispatch({
-        type: "REMOVE_BREAKPOINT",
-        breakpoint: bp,
-        status: "done"
-      });
+      return dispatch(
+        ({
+          type: "REMOVE_BREAKPOINT",
+          breakpoint: bp,
+          status: "done"
+        }: Action)
+      );
     }
 
     return dispatch({
       type: "REMOVE_BREAKPOINT",
       breakpoint: bp,
       disabled: false,
-      [_promise.PROMISE]: client.removeBreakpoint(bp.generatedLocation)
+      [PROMISE]: client.removeBreakpoint(bp.generatedLocation)
     });
   };
 }
+
 /**
  * Disable a single breakpoint
  *
  * @memberof actions/breakpoints
  * @static
  */
-
-
-function disableBreakpoint(location) {
-  return async ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const bp = (0, _selectors.getBreakpoint)(getState(), location);
+export function disableBreakpoint(location: Location) {
+  return async ({ dispatch, getState, client }: ThunkArgs) => {
+    const bp = getBreakpoint(getState(), location);
 
     if (!bp || bp.loading) {
       return;
     }
 
     await client.removeBreakpoint(bp.generatedLocation);
-    const newBreakpoint = { ...bp,
-      disabled: true
-    };
-    return dispatch({
-      type: "DISABLE_BREAKPOINT",
-      breakpoint: newBreakpoint
-    });
+    const newBreakpoint: Breakpoint = { ...bp, disabled: true };
+
+    return dispatch(
+      ({
+        type: "DISABLE_BREAKPOINT",
+        breakpoint: newBreakpoint
+      }: Action)
+    );
   };
 }
+
 /**
  * Toggle All Breakpoints
  *
  * @memberof actions/breakpoints
  * @static
  */
-
+export function toggleAllBreakpoints(shouldDisableBreakpoints: boolean) {
+  return async ({ dispatch, getState, client }: ThunkArgs) => {
+    const breakpoints = getBreakpoints(getState());
 
-function toggleAllBreakpoints(shouldDisableBreakpoints) {
-  return async ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const breakpoints = (0, _selectors.getBreakpoints)(getState());
     const modifiedBreakpoints = [];
 
     for (const [, breakpoint] of breakpoints) {
       if (shouldDisableBreakpoints) {
         await client.removeBreakpoint(breakpoint.generatedLocation);
-        const newBreakpoint = { ...breakpoint,
-          disabled: true
-        };
+        const newBreakpoint: Breakpoint = { ...breakpoint, disabled: true };
         modifiedBreakpoints.push(newBreakpoint);
       } else {
-        const newBreakpoint = { ...breakpoint,
-          disabled: false
-        };
+        const newBreakpoint: Breakpoint = { ...breakpoint, disabled: false };
         modifiedBreakpoints.push(newBreakpoint);
       }
     }
 
     if (shouldDisableBreakpoints) {
-      return dispatch({
-        type: "DISABLE_ALL_BREAKPOINTS",
-        breakpoints: modifiedBreakpoints
-      });
+      return dispatch(
+        ({
+          type: "DISABLE_ALL_BREAKPOINTS",
+          breakpoints: modifiedBreakpoints
+        }: Action)
+      );
     }
 
-    return dispatch({
-      type: "ENABLE_ALL_BREAKPOINTS",
-      breakpoints: modifiedBreakpoints
-    });
+    return dispatch(
+      ({
+        type: "ENABLE_ALL_BREAKPOINTS",
+        breakpoints: modifiedBreakpoints
+      }: Action)
+    );
   };
 }
+
 /**
  * Toggle Breakpoints
  *
  * @memberof actions/breakpoints
  * @static
  */
-
+export function toggleBreakpoints(
+  shouldDisableBreakpoints: boolean,
+  breakpoints: BreakpointsMap
+) {
+  return async ({ dispatch }: ThunkArgs) => {
+    const promises = breakpoints
+      .valueSeq()
+      .toJS()
+      .map(
+        ([, breakpoint]) =>
+          shouldDisableBreakpoints
+            ? dispatch(disableBreakpoint(breakpoint.location))
+            : dispatch(enableBreakpoint(breakpoint.location))
+      );
 
-function toggleBreakpoints(shouldDisableBreakpoints, breakpoints) {
-  return async ({
-    dispatch
-  }) => {
-    const promises = breakpoints.valueSeq().toJS().map(([, breakpoint]) => shouldDisableBreakpoints ? dispatch(disableBreakpoint(breakpoint.location)) : dispatch((0, _addBreakpoint.enableBreakpoint)(breakpoint.location)));
     await Promise.all(promises);
   };
 }
+
 /**
  * Removes all breakpoints
  *
  * @memberof actions/breakpoints
  * @static
  */
-
-
-function removeAllBreakpoints() {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    const breakpointList = (0, _selectors.getBreakpoints)(getState()).valueSeq().toJS();
-    return Promise.all(breakpointList.map(bp => dispatch(removeBreakpoint(bp.location))));
+export function removeAllBreakpoints() {
+  return async ({ dispatch, getState }: ThunkArgs) => {
+    const breakpointList = getBreakpoints(getState())
+      .valueSeq()
+      .toJS();
+    return Promise.all(
+      breakpointList.map(bp => dispatch(removeBreakpoint(bp.location)))
+    );
   };
 }
+
 /**
  * Removes breakpoints
  *
  * @memberof actions/breakpoints
  * @static
  */
-
-
-function removeBreakpoints(breakpoints) {
-  return async ({
-    dispatch
-  }) => {
+export function removeBreakpoints(breakpoints: BreakpointsMap) {
+  return async ({ dispatch }: ThunkArgs) => {
     const breakpointList = breakpoints.valueSeq().toJS();
-    return Promise.all(breakpointList.map(bp => dispatch(removeBreakpoint(bp.location))));
+    return Promise.all(
+      breakpointList.map(bp => dispatch(removeBreakpoint(bp.location)))
+    );
   };
 }
 
-function remapBreakpoints(sourceId) {
-  return async ({
-    dispatch,
-    getState,
-    sourceMaps
-  }) => {
-    const breakpoints = (0, _selectors.getBreakpoints)(getState());
-    const newBreakpoints = await (0, _remapLocations2.default)(breakpoints, sourceId, sourceMaps);
-    return dispatch({
-      type: "REMAP_BREAKPOINTS",
-      breakpoints: newBreakpoints
-    });
+export function remapBreakpoints(sourceId: string) {
+  return async ({ dispatch, getState, sourceMaps }: ThunkArgs) => {
+    const breakpoints = getBreakpoints(getState());
+    const newBreakpoints = await remapLocations(
+      breakpoints,
+      sourceId,
+      sourceMaps
+    );
+
+    return dispatch(
+      ({
+        type: "REMAP_BREAKPOINTS",
+        breakpoints: newBreakpoints
+      }: Action)
+    );
   };
 }
+
 /**
  * Update the condition of a breakpoint.
  *
  * @throws {Error} "not implemented"
  * @memberof actions/breakpoints
  * @static
  * @param {Location} location
  *        @see DebuggerController.Breakpoints.addBreakpoint
  * @param {string} condition
  *        The condition to set on the breakpoint
  * @param {Boolean} $1.disabled Disable value for breakpoint value
  */
-
-
-function setBreakpointCondition(location, {
-  condition
-} = {}) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const bp = (0, _selectors.getBreakpoint)(getState(), location);
-
+export function setBreakpointCondition(
+  location: Location,
+  { condition }: addBreakpointOptions = {}
+) {
+  return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
+    const bp = getBreakpoint(getState(), location);
     if (!bp) {
-      return dispatch((0, _addBreakpoint.addBreakpoint)(location, {
-        condition
-      }));
+      return dispatch(addBreakpoint(location, { condition }));
     }
 
     if (bp.loading) {
       return;
     }
 
     if (bp.disabled) {
-      await dispatch((0, _addBreakpoint.enableBreakpoint)(location));
+      await dispatch(enableBreakpoint(location));
       bp.disabled = !bp.disabled;
     }
 
-    await client.setBreakpointCondition(bp.id, location, condition, (0, _devtoolsSourceMap.isOriginalId)(bp.location.sourceId));
-    const newBreakpoint = { ...bp,
-      condition
-    };
-    (0, _breakpoint.assertBreakpoint)(newBreakpoint);
-    return dispatch({
-      type: "SET_BREAKPOINT_CONDITION",
-      breakpoint: newBreakpoint
-    });
+    await client.setBreakpointCondition(
+      bp.id,
+      location,
+      condition,
+      isOriginalId(bp.location.sourceId)
+    );
+
+    const newBreakpoint = { ...bp, condition };
+
+    assertBreakpoint(newBreakpoint);
+
+    return dispatch(
+      ({
+        type: "SET_BREAKPOINT_CONDITION",
+        breakpoint: newBreakpoint
+      }: Action)
+    );
   };
 }
 
-function toggleBreakpoint(line, column) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
+export function toggleBreakpoint(line: ?number, column?: number) {
+  return ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
     const state = getState();
-    const selectedSource = (0, _selectors.getSelectedSource)(state);
+    const selectedSource = getSelectedSource(state);
 
     if (!line || !selectedSource) {
       return;
     }
 
-    const bp = (0, _selectors.getBreakpointAtLocation)(state, {
-      line,
-      column
-    });
-    const isEmptyLine = (0, _ast.isEmptyLineInSource)(state, line, selectedSource.id);
+    const bp = getBreakpointAtLocation(state, { line, column });
+    const isEmptyLine = isEmptyLineInSource(state, line, selectedSource.id);
 
-    if (!bp && isEmptyLine || bp && bp.loading) {
+    if ((!bp && isEmptyLine) || (bp && bp.loading)) {
       return;
     }
 
     if (bp) {
       // NOTE: it's possible the breakpoint has slid to a column
-      return dispatch(removeBreakpoint({
-        sourceId: bp.location.sourceId,
-        sourceUrl: bp.location.sourceUrl,
-        line: bp.location.line,
-        column: column || bp.location.column
-      }));
+      return dispatch(
+        removeBreakpoint({
+          sourceId: bp.location.sourceId,
+          sourceUrl: bp.location.sourceUrl,
+          line: bp.location.line,
+          column: column || bp.location.column
+        })
+      );
     }
-
-    return dispatch((0, _addBreakpoint.addBreakpoint)({
-      sourceId: selectedSource.id,
-      sourceUrl: selectedSource.url,
-      line: line,
-      column: column
-    }));
+    return dispatch(
+      addBreakpoint({
+        sourceId: selectedSource.id,
+        sourceUrl: selectedSource.url,
+        line: line,
+        column: column
+      })
+    );
   };
 }
 
-function toggleBreakpointsAtLine(line, column) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
+export function toggleBreakpointsAtLine(line: number, column?: number) {
+  return ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
     const state = getState();
-    const selectedSource = (0, _selectors.getSelectedSource)(state);
+    const selectedSource = getSelectedSource(state);
 
     if (!line || !selectedSource) {
       return;
     }
 
-    const bps = (0, _selectors.getBreakpointsAtLine)(state, line);
-    const isEmptyLine = (0, _ast.isEmptyLineInSource)(state, line, selectedSource.id);
+    const bps = getBreakpointsAtLine(state, line);
+    const isEmptyLine = isEmptyLineInSource(state, line, selectedSource.id);
 
     if (bps.size === 0 && !isEmptyLine) {
-      return dispatch((0, _addBreakpoint.addBreakpoint)({
-        sourceId: selectedSource.id,
-        sourceUrl: selectedSource.url,
-        line,
-        column
-      }));
+      return dispatch(
+        addBreakpoint({
+          sourceId: selectedSource.id,
+          sourceUrl: selectedSource.url,
+          line,
+          column
+        })
+      );
     }
 
     return Promise.all(bps.map(bp => dispatch(removeBreakpoint(bp.location))));
   };
 }
 
-function addOrToggleDisabledBreakpoint(line, column) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const selectedSource = (0, _selectors.getSelectedSource)(getState());
+export function addOrToggleDisabledBreakpoint(line: ?number, column?: number) {
+  return ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
+    const selectedSource = getSelectedSource(getState());
 
     if (!line || !selectedSource) {
       return;
     }
 
-    const bp = (0, _selectors.getBreakpointAtLocation)(getState(), {
-      line,
-      column
-    });
+    const bp = getBreakpointAtLocation(getState(), { line, column });
 
     if (bp && bp.loading) {
       return;
     }
 
     if (bp) {
       // NOTE: it's possible the breakpoint has slid to a column
-      return dispatch(toggleDisabledBreakpoint(line, column || bp.location.column));
+      return dispatch(
+        toggleDisabledBreakpoint(line, column || bp.location.column)
+      );
     }
 
-    return dispatch((0, _addBreakpoint.addBreakpoint)({
-      sourceId: selectedSource.id,
-      sourceUrl: selectedSource.url,
-      line: line,
-      column: column
-    }));
+    return dispatch(
+      addBreakpoint({
+        sourceId: selectedSource.id,
+        sourceUrl: selectedSource.url,
+        line: line,
+        column: column
+      })
+    );
   };
 }
 
-function toggleDisabledBreakpoint(line, column) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const bp = (0, _selectors.getBreakpointAtLocation)(getState(), {
-      line,
-      column
-    });
-
+export function toggleDisabledBreakpoint(line: number, column?: number) {
+  return ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
+    const bp = getBreakpointAtLocation(getState(), { line, column });
     if (!bp || bp.loading) {
       return;
     }
 
     if (!bp.disabled) {
       return dispatch(disableBreakpoint(bp.location));
     }
-
-    return dispatch((0, _addBreakpoint.enableBreakpoint)(bp.location));
+    return dispatch(enableBreakpoint(bp.location));
   };
 }
 
-function enableXHRBreakpoint(index, bp) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const xhrBreakpoints = (0, _selectors.getXHRBreakpoints)(getState());
+export function enableXHRBreakpoint(index: number, bp: XHRBreakpoint) {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const xhrBreakpoints = getXHRBreakpoints(getState());
     const breakpoint = bp || xhrBreakpoints.get(index);
-    const enabledBreakpoint = { ...breakpoint,
+    const enabledBreakpoint = {
+      ...breakpoint,
       disabled: false
     };
+
     return dispatch({
       type: "ENABLE_XHR_BREAKPOINT",
       breakpoint: enabledBreakpoint,
       index,
-      [_promise.PROMISE]: client.setXHRBreakpoint(breakpoint.path, breakpoint.method)
+      [PROMISE]: client.setXHRBreakpoint(breakpoint.path, breakpoint.method)
     });
   };
 }
 
-function disableXHRBreakpoint(index, bp) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const xhrBreakpoints = (0, _selectors.getXHRBreakpoints)(getState());
+export function disableXHRBreakpoint(index: number, bp: XHRBreakpoint) {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const xhrBreakpoints = getXHRBreakpoints(getState());
     const breakpoint = bp || xhrBreakpoints.get(index);
-    const disabledBreakpoint = { ...breakpoint,
+    const disabledBreakpoint = {
+      ...breakpoint,
       disabled: true
     };
+
     return dispatch({
       type: "DISABLE_XHR_BREAKPOINT",
       breakpoint: disabledBreakpoint,
       index,
-      [_promise.PROMISE]: client.removeXHRBreakpoint(breakpoint.path, breakpoint.method)
+      [PROMISE]: client.removeXHRBreakpoint(breakpoint.path, breakpoint.method)
     });
   };
 }
 
-function updateXHRBreakpoint(index, path, method) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const xhrBreakpoints = (0, _selectors.getXHRBreakpoints)(getState());
+export function updateXHRBreakpoint(
+  index: number,
+  path: string,
+  method: string
+) {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const xhrBreakpoints = getXHRBreakpoints(getState());
     const breakpoint = xhrBreakpoints.get(index);
-    const updatedBreakpoint = { ...breakpoint,
+
+    const updatedBreakpoint = {
+      ...breakpoint,
       path,
       method,
       text: `URL contains "${path}"`
     };
+
     return dispatch({
       type: "UPDATE_XHR_BREAKPOINT",
       breakpoint: updatedBreakpoint,
       index,
-      [_promise.PROMISE]: Promise.all([client.removeXHRBreakpoint(breakpoint.path, breakpoint.method), client.setXHRBreakpoint(path, method)])
+      [PROMISE]: Promise.all([
+        client.removeXHRBreakpoint(breakpoint.path, breakpoint.method),
+        client.setXHRBreakpoint(path, method)
+      ])
     });
   };
 }
-
-function togglePauseOnAny() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    const xhrBreakpoints = (0, _selectors.getXHRBreakpoints)(getState());
-    const index = xhrBreakpoints.findIndex(({
-      path
-    }) => path.length === 0);
-
+export function togglePauseOnAny() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    const xhrBreakpoints = getXHRBreakpoints(getState());
+    const index = xhrBreakpoints.findIndex(({ path }) => path.length === 0);
     if (index < 0) {
       return dispatch(setXHRBreakpoint("", "ANY"));
     }
 
     const bp = xhrBreakpoints.get(index);
-
     if (bp.disabled) {
       return dispatch(enableXHRBreakpoint(index, bp));
     }
 
     return dispatch(disableXHRBreakpoint(index, bp));
   };
 }
 
-function setXHRBreakpoint(path, method) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const breakpoint = (0, _breakpoint.createXHRBreakpoint)(path, method);
+export function setXHRBreakpoint(path: string, method: string) {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const breakpoint = createXHRBreakpoint(path, method);
+
     return dispatch({
       type: "SET_XHR_BREAKPOINT",
       breakpoint,
-      [_promise.PROMISE]: client.setXHRBreakpoint(path, method)
+      [PROMISE]: client.setXHRBreakpoint(path, method)
     });
   };
 }
 
-function removeXHRBreakpoint(index) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const xhrBreakpoints = (0, _selectors.getXHRBreakpoints)(getState());
+export function removeXHRBreakpoint(index: number) {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const xhrBreakpoints = getXHRBreakpoints(getState());
     const breakpoint = xhrBreakpoints.get(index);
     return dispatch({
       type: "REMOVE_XHR_BREAKPOINT",
       breakpoint,
       index,
-      [_promise.PROMISE]: client.removeXHRBreakpoint(breakpoint.path, breakpoint.method)
+      [PROMISE]: client.removeXHRBreakpoint(breakpoint.path, breakpoint.method)
     });
   };
 }
 
-exports.addBreakpoint = _addBreakpoint.addBreakpoint;
-exports.addHiddenBreakpoint = _addBreakpoint.addHiddenBreakpoint;
-exports.enableBreakpoint = _addBreakpoint.enableBreakpoint;
-exports.syncBreakpoint = _syncBreakpoint.syncBreakpoint;
\ No newline at end of file
+export { addBreakpoint, addHiddenBreakpoint, enableBreakpoint, syncBreakpoint };
--- a/devtools/client/debugger/new/src/actions/breakpoints/moz.build
+++ b/devtools/client/debugger/new/src/actions/breakpoints/moz.build
@@ -2,14 +2,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DevToolsModules(
+DebuggerModules(
     'addBreakpoint.js',
     'index.js',
     'remapLocations.js',
     'syncBreakpoint.js',
 )
--- a/devtools/client/debugger/new/src/actions/breakpoints/remapLocations.js
+++ b/devtools/client/debugger/new/src/actions/breakpoints/remapLocations.js
@@ -1,23 +1,28 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.default = remapLocations;
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function remapLocations(breakpoints, sourceId, sourceMaps) {
-  const sourceBreakpoints = breakpoints.map(async breakpoint => {
-    if (breakpoint.location.sourceId !== sourceId) {
-      return breakpoint;
-    }
+
+// @flow
+
+import type { Breakpoint } from "../../types";
+import type { BreakpointsMap } from "../../selectors";
 
-    const location = await sourceMaps.getOriginalLocation(breakpoint.location);
-    return { ...breakpoint,
-      location
-    };
-  });
+export default function remapLocations(
+  breakpoints: Breakpoint[],
+  sourceId: string,
+  sourceMaps: Object
+) {
+  const sourceBreakpoints: BreakpointsMap = breakpoints.map(
+    async breakpoint => {
+      if (breakpoint.location.sourceId !== sourceId) {
+        return breakpoint;
+      }
+      const location = await sourceMaps.getOriginalLocation(
+        breakpoint.location
+      );
+      return { ...breakpoint, location };
+    }
+  );
+
   return Promise.all(sourceBreakpoints.valueSeq());
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/breakpoints/syncBreakpoint.js
+++ b/devtools/client/debugger/new/src/actions/breakpoints/syncBreakpoint.js
@@ -1,155 +1,221 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.syncBreakpointPromise = syncBreakpointPromise;
-exports.syncBreakpoint = syncBreakpoint;
-
-var _breakpoint = require("../../utils/breakpoint/index");
-
-var _sourceMaps = require("../../utils/source-maps");
-
-var _source = require("../../utils/source");
-
-var _devtoolsSourceMap = require("devtools/client/shared/source-map/index.js");
-
-var _selectors = require("../../selectors/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-async function makeScopedLocation({
-  name,
-  offset
-}, location, source) {
-  const scope = await (0, _breakpoint.findScopeByName)(source, name); // fallback onto the location line, if the scope is not found
+
+// @flow
+import {
+  locationMoved,
+  createBreakpoint,
+  assertBreakpoint,
+  assertPendingBreakpoint,
+  findScopeByName
+} from "../../utils/breakpoint";
+
+import { getGeneratedLocation } from "../../utils/source-maps";
+import { getTextAtPosition } from "../../utils/source";
+import { originalToGeneratedId, isOriginalId } from "devtools-source-map";
+import { getSource } from "../../selectors";
+import type { ThunkArgs, Action } from "../types";
+
+import type {
+  Location,
+  ASTLocation,
+  PendingBreakpoint,
+  SourceId,
+  Breakpoint
+} from "../../types";
+
+type BreakpointSyncData = {
+  previousLocation: Location,
+  breakpoint: ?Breakpoint
+};
+
+async function makeScopedLocation(
+  { name, offset }: ASTLocation,
+  location: Location,
+  source
+) {
+  const scope = await findScopeByName(source, name);
+  // fallback onto the location line, if the scope is not found
   // note: we may at some point want to delete the breakpoint if the scope
   // disappears
-
   const line = scope ? scope.location.start.line + offset.line : location.line;
   return {
     line,
     column: location.column,
     sourceUrl: source.url,
     sourceId: source.id
   };
 }
 
-function createSyncData(id, pendingBreakpoint, location, generatedLocation, previousLocation, text, originalText) {
-  const overrides = { ...pendingBreakpoint,
+function createSyncData(
+  id: SourceId,
+  pendingBreakpoint: PendingBreakpoint,
+  location: Location,
+  generatedLocation: Location,
+  previousLocation: Location,
+  text: string,
+  originalText: string
+): BreakpointSyncData {
+  const overrides = {
+    ...pendingBreakpoint,
     generatedLocation,
     id,
     text,
     originalText
   };
-  const breakpoint = (0, _breakpoint.createBreakpoint)(location, overrides);
-  (0, _breakpoint.assertBreakpoint)(breakpoint);
-  return {
-    breakpoint,
-    previousLocation
-  };
-} // we have three forms of syncing: disabled syncing, existing server syncing
+  const breakpoint = createBreakpoint(location, overrides);
+
+  assertBreakpoint(breakpoint);
+  return { breakpoint, previousLocation };
+}
+
+// we have three forms of syncing: disabled syncing, existing server syncing
 // and adding a new breakpoint
-
+export async function syncBreakpointPromise(
+  getState: Function,
+  client: Object,
+  sourceMaps: Object,
+  sourceId: SourceId,
+  pendingBreakpoint: PendingBreakpoint
+): Promise<BreakpointSyncData | null> {
+  assertPendingBreakpoint(pendingBreakpoint);
 
-async function syncBreakpointPromise(getState, client, sourceMaps, sourceId, pendingBreakpoint) {
-  (0, _breakpoint.assertPendingBreakpoint)(pendingBreakpoint);
-  const source = (0, _selectors.getSource)(getState(), sourceId);
-  const generatedSourceId = (0, _devtoolsSourceMap.isOriginalId)(sourceId) ? (0, _devtoolsSourceMap.originalToGeneratedId)(sourceId) : sourceId;
-  const generatedSource = (0, _selectors.getSource)(getState(), generatedSourceId);
+  const source = getSource(getState(), sourceId);
+
+  const generatedSourceId = isOriginalId(sourceId)
+    ? originalToGeneratedId(sourceId)
+    : sourceId;
+
+  const generatedSource = getSource(getState(), generatedSourceId);
 
   if (!source) {
     return null;
   }
 
-  const {
-    location,
-    astLocation
-  } = pendingBreakpoint;
-  const previousLocation = { ...location,
-    sourceId
-  };
-  const scopedLocation = await makeScopedLocation(astLocation, previousLocation, source);
-  const scopedGeneratedLocation = await (0, _sourceMaps.getGeneratedLocation)(getState(), source, scopedLocation, sourceMaps); // this is the generatedLocation of the pending breakpoint, with
+  const { location, astLocation } = pendingBreakpoint;
+  const previousLocation = { ...location, sourceId };
+
+  const scopedLocation = await makeScopedLocation(
+    astLocation,
+    previousLocation,
+    source
+  );
+
+  const scopedGeneratedLocation = await getGeneratedLocation(
+    getState(),
+    source,
+    scopedLocation,
+    sourceMaps
+  );
+
+  // this is the generatedLocation of the pending breakpoint, with
   // the source id updated to reflect the new connection
-
-  const generatedLocation = { ...pendingBreakpoint.generatedLocation,
+  const generatedLocation = {
+    ...pendingBreakpoint.generatedLocation,
     sourceId: generatedSourceId
   };
-  const isSameLocation = !(0, _breakpoint.locationMoved)(generatedLocation, scopedGeneratedLocation);
+
+  const isSameLocation = !locationMoved(
+    generatedLocation,
+    scopedGeneratedLocation
+  );
+
   const existingClient = client.getBreakpointByLocation(generatedLocation);
+
   /** ******* CASE 1: No server change ***********/
   // early return if breakpoint is disabled or we are in the sameLocation
   // send update only to redux
-
-  if (pendingBreakpoint.disabled || existingClient && isSameLocation) {
+  if (pendingBreakpoint.disabled || (existingClient && isSameLocation)) {
     const id = pendingBreakpoint.disabled ? "" : existingClient.id;
-    const originalText = (0, _source.getTextAtPosition)(source, previousLocation);
-    const text = (0, _source.getTextAtPosition)(generatedSource, generatedLocation);
-    return createSyncData(id, pendingBreakpoint, scopedLocation, scopedGeneratedLocation, previousLocation, text, originalText);
-  } // clear server breakpoints if they exist and we have moved
+    const originalText = getTextAtPosition(source, previousLocation);
+    const text = getTextAtPosition(generatedSource, generatedLocation);
 
+    return createSyncData(
+      id,
+      pendingBreakpoint,
+      scopedLocation,
+      scopedGeneratedLocation,
+      previousLocation,
+      text,
+      originalText
+    );
+  }
 
+  // clear server breakpoints if they exist and we have moved
   if (existingClient) {
     await client.removeBreakpoint(generatedLocation);
   }
+
   /** ******* Case 2: Add New Breakpoint ***********/
   // If we are not disabled, set the breakpoint on the server and get
   // that info so we can set it on our breakpoints.
 
-
   if (!scopedGeneratedLocation.line) {
-    return {
-      previousLocation,
-      breakpoint: null
-    };
+    return { previousLocation, breakpoint: null };
   }
 
-  const {
-    id,
-    actualLocation
-  } = await client.setBreakpoint(scopedGeneratedLocation, pendingBreakpoint.condition, (0, _devtoolsSourceMap.isOriginalId)(sourceId)); // the breakpoint might have slid server side, so we want to get the location
+  const { id, actualLocation } = await client.setBreakpoint(
+    scopedGeneratedLocation,
+    pendingBreakpoint.condition,
+    isOriginalId(sourceId)
+  );
+
+  // the breakpoint might have slid server side, so we want to get the location
   // based on the server's return value
+  const newGeneratedLocation = actualLocation;
+  const newLocation = await sourceMaps.getOriginalLocation(
+    newGeneratedLocation
+  );
 
-  const newGeneratedLocation = actualLocation;
-  const newLocation = await sourceMaps.getOriginalLocation(newGeneratedLocation);
-  const originalText = (0, _source.getTextAtPosition)(source, newLocation);
-  const text = (0, _source.getTextAtPosition)(generatedSource, newGeneratedLocation);
-  return createSyncData(id, pendingBreakpoint, newLocation, newGeneratedLocation, previousLocation, text, originalText);
+  const originalText = getTextAtPosition(source, newLocation);
+  const text = getTextAtPosition(generatedSource, newGeneratedLocation);
+
+  return createSyncData(
+    id,
+    pendingBreakpoint,
+    newLocation,
+    newGeneratedLocation,
+    previousLocation,
+    text,
+    originalText
+  );
 }
+
 /**
  * Syncing a breakpoint add breakpoint information that is stored, and
  * contact the server for more data.
  *
  * @memberof actions/breakpoints
  * @static
  * @param {String} $1.sourceId String  value
  * @param {PendingBreakpoint} $1.location PendingBreakpoint  value
  */
-
-
-function syncBreakpoint(sourceId, pendingBreakpoint) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const response = await syncBreakpointPromise(getState, client, sourceMaps, sourceId, pendingBreakpoint);
+export function syncBreakpoint(
+  sourceId: SourceId,
+  pendingBreakpoint: PendingBreakpoint
+) {
+  return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
+    const response = await syncBreakpointPromise(
+      getState,
+      client,
+      sourceMaps,
+      sourceId,
+      pendingBreakpoint
+    );
 
     if (!response) {
       return;
     }
 
-    const {
-      breakpoint,
-      previousLocation
-    } = response;
-    return dispatch({
-      type: "SYNC_BREAKPOINT",
-      breakpoint,
-      previousLocation
-    });
+    const { breakpoint, previousLocation } = response;
+
+    return dispatch(
+      ({
+        type: "SYNC_BREAKPOINT",
+        breakpoint,
+        previousLocation
+      }: Action)
+    );
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/coverage.js
+++ b/devtools/client/debugger/new/src/actions/coverage.js
@@ -1,27 +1,20 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.recordCoverage = recordCoverage;
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function recordCoverage() {
-  return async function ({
-    dispatch,
-    getState,
-    client
-  }) {
-    const {
-      coverage
-    } = await client.recordCoverage();
-    return dispatch({
-      type: "RECORD_COVERAGE",
-      value: {
-        coverage
-      }
-    });
+
+// @flow
+
+import type { Action, ThunkArgs } from "./types";
+
+export function recordCoverage() {
+  return async function({ dispatch, getState, client }: ThunkArgs) {
+    const { coverage } = await client.recordCoverage();
+
+    return dispatch(
+      ({
+        type: "RECORD_COVERAGE",
+        value: { coverage }
+      }: Action)
+    );
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/debuggee.js
+++ b/devtools/client/debugger/new/src/actions/debuggee.js
@@ -1,24 +1,14 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.updateWorkers = updateWorkers;
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function updateWorkers() {
-  return async function ({
-    dispatch,
-    client
-  }) {
-    const {
-      workers
-    } = await client.fetchWorkers();
-    dispatch({
-      type: "SET_WORKERS",
-      workers
-    });
+
+// @flow
+
+import type { Action, ThunkArgs } from "./types";
+
+export function updateWorkers() {
+  return async function({ dispatch, client }: ThunkArgs) {
+    const { workers } = await client.fetchWorkers();
+    dispatch(({ type: "SET_WORKERS", workers }: Action));
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/event-listeners.js
+++ b/devtools/client/debugger/new/src/actions/event-listeners.js
@@ -1,44 +1,34 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.fetchEventListeners = fetchEventListeners;
-exports.updateEventBreakpoints = updateEventBreakpoints;
-
-var _DevToolsUtils = require("../utils/DevToolsUtils");
-
-var _selectors = require("../selectors/index");
-
-var _waitService = require("./utils/middleware/wait-service");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
 /* global window gThreadClient setNamedTimeout EVENTS */
-
 /* eslint no-shadow: 0  */
 
 /**
  * Redux actions for the event listeners state
  * @module actions/event-listeners
  */
+
+import { reportException } from "../utils/DevToolsUtils";
+import { isPaused, getSourceByURL } from "../selectors";
+import { NAME as WAIT_UNTIL } from "./utils/middleware/wait-service";
+
 // delay is in ms
 const FETCH_EVENT_LISTENERS_DELAY = 200;
 let fetchListenersTimerID;
+
 /**
  * @memberof utils/utils
  * @static
  */
-
-async function asPaused(state, client, func) {
-  if (!(0, _selectors.isPaused)(state)) {
+async function asPaused(state: any, client: any, func: any) {
+  if (!isPaused(state)) {
     await client.interrupt();
     let result;
 
     try {
       result = await func(client);
     } catch (e) {
       // Try to put the debugger back in a working state by resuming
       // it
@@ -47,134 +37,132 @@ async function asPaused(state, client, f
     }
 
     await client.resume();
     return result;
   }
 
   return func(client);
 }
+
 /**
  * @memberof actions/event-listeners
  * @static
  */
-
-
-function fetchEventListeners() {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
+export function fetchEventListeners() {
+  return ({ dispatch, getState, client }) => {
     // Make sure we"re not sending a batch of closely repeated requests.
     // This can easily happen whenever new sources are fetched.
     if (fetchListenersTimerID) {
       clearTimeout(fetchListenersTimerID);
     }
 
     fetchListenersTimerID = setTimeout(() => {
       // In case there is still a request of listeners going on (it
       // takes several RDP round trips right now), make sure we wait
       // on a currently running request
       if (getState().eventListeners.fetchingListeners) {
         dispatch({
-          type: _waitService.NAME,
-          predicate: action => action.type === "FETCH_EVENT_LISTENERS" && action.status === "done",
+          type: WAIT_UNTIL,
+          predicate: action =>
+            action.type === "FETCH_EVENT_LISTENERS" && action.status === "done",
           run: dispatch => dispatch(fetchEventListeners())
         });
         return;
       }
 
       dispatch({
         type: "FETCH_EVENT_LISTENERS",
         status: "begin"
       });
+
       asPaused(getState(), client, _getEventListeners).then(listeners => {
         dispatch({
           type: "FETCH_EVENT_LISTENERS",
           status: "done",
           listeners: formatListeners(getState(), listeners)
         });
       });
     }, FETCH_EVENT_LISTENERS_DELAY);
   };
 }
 
 function formatListeners(state, listeners) {
   return listeners.map(l => {
     return {
       selector: l.node.selector,
       type: l.type,
-      sourceId: (0, _selectors.getSourceByURL)(state, l.function.location.url).id,
+      sourceId: getSourceByURL(state, l.function.location.url).id,
       line: l.function.location.line
     };
   });
 }
 
 async function _getEventListeners(threadClient) {
-  const response = await threadClient.eventListeners(); // Make sure all the listeners are sorted by the event type, since
-  // they"re not guaranteed to be clustered together.
+  const response = await threadClient.eventListeners();
 
-  response.listeners.sort((a, b) => a.type > b.type ? 1 : -1); // Add all the listeners in the debugger view event linsteners container.
+  // Make sure all the listeners are sorted by the event type, since
+  // they"re not guaranteed to be clustered together.
+  response.listeners.sort((a, b) => (a.type > b.type ? 1 : -1));
 
+  // Add all the listeners in the debugger view event linsteners container.
   const fetchedDefinitions = new Map();
   const listeners = [];
-
   for (const listener of response.listeners) {
     let definitionSite;
-
     if (fetchedDefinitions.has(listener.function.actor)) {
       definitionSite = fetchedDefinitions.get(listener.function.actor);
     } else if (listener.function.class == "Function") {
-      definitionSite = await _getDefinitionSite(threadClient, listener.function);
-
+      definitionSite = await _getDefinitionSite(
+        threadClient,
+        listener.function
+      );
       if (!definitionSite) {
         // We don"t know where this listener comes from so don"t show it in
         // the UI as breaking on it doesn"t work (bug 942899).
         continue;
       }
 
       fetchedDefinitions.set(listener.function.actor, definitionSite);
     }
-
     listener.function.url = definitionSite;
     listeners.push(listener);
   }
+  fetchedDefinitions.clear();
 
-  fetchedDefinitions.clear();
   return listeners;
 }
 
 async function _getDefinitionSite(threadClient, func) {
   const grip = threadClient.pauseGrip(func);
   let response;
 
   try {
     response = await grip.getDefinitionSite();
   } catch (e) {
     // Don't make this error fatal, it would break the entire events pane.
-    (0, _DevToolsUtils.reportException)("_getDefinitionSite", e);
+    reportException("_getDefinitionSite", e);
     return null;
   }
 
   return response.source.url;
 }
+
 /**
  * @memberof actions/event-listeners
  * @static
  * @param {string} eventNames
  */
-
-
-function updateEventBreakpoints(eventNames) {
+export function updateEventBreakpoints(eventNames) {
   return dispatch => {
     setNamedTimeout("event-breakpoints-update", 0, () => {
       gThreadClient.pauseOnDOMEvents(eventNames, () => {
         // Notify that event breakpoints were added/removed on the server.
         window.emit(EVENTS.EVENT_BREAKPOINTS_UPDATED);
+
         dispatch({
           type: "UPDATE_EVENT_BREAKPOINTS",
           eventNames: eventNames
         });
       });
     });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/expressions.js
+++ b/devtools/client/debugger/new/src/actions/expressions.js
@@ -1,237 +1,187 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.addExpression = addExpression;
-exports.autocomplete = autocomplete;
-exports.clearAutocomplete = clearAutocomplete;
-exports.clearExpressionError = clearExpressionError;
-exports.updateExpression = updateExpression;
-exports.deleteExpression = deleteExpression;
-exports.evaluateExpressions = evaluateExpressions;
-exports.getMappedExpression = getMappedExpression;
-
-var _selectors = require("../selectors/index");
-
-var _promise = require("./utils/middleware/promise");
-
-var _expressions = require("../utils/expressions");
-
-var _prefs = require("../utils/prefs");
-
-var _source = require("../utils/source");
-
-var _parser = require("../workers/parser/index");
-
-var parser = _interopRequireWildcard(_parser);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import {
+  getExpression,
+  getExpressions,
+  getSelectedFrame,
+  getSelectedFrameId,
+  getSourceFromId,
+  getSelectedSource,
+  getSelectedScopeMappings,
+  getSelectedFrameBindings
+} from "../selectors";
+import { PROMISE } from "./utils/middleware/promise";
+import { wrapExpression } from "../utils/expressions";
+import { features } from "../utils/prefs";
+import { isOriginal } from "../utils/source";
+
+import * as parser from "../workers/parser";
+import type { Expression } from "../types";
+import type { ThunkArgs } from "./types";
+
 /**
  * Add expression for debugger to watch
  *
  * @param {object} expression
  * @param {number} expression.id
  * @memberof actions/pause
  * @static
  */
-function addExpression(input) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
+export function addExpression(input: string) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
     if (!input) {
       return;
     }
 
     const expressionError = await parser.hasSyntaxError(input);
-    const expression = (0, _selectors.getExpression)(getState(), input);
 
+    const expression = getExpression(getState(), input);
     if (expression) {
       return dispatch(evaluateExpression(expression));
     }
 
-    dispatch({
-      type: "ADD_EXPRESSION",
-      input,
-      expressionError
-    });
-    const newExpression = (0, _selectors.getExpression)(getState(), input);
+    dispatch({ type: "ADD_EXPRESSION", input, expressionError });
 
+    const newExpression = getExpression(getState(), input);
     if (newExpression) {
       return dispatch(evaluateExpression(newExpression));
     }
   };
 }
 
-function autocomplete(input, cursor) {
-  return async ({
-    dispatch,
-    getState,
-    client
-  }) => {
+export function autocomplete(input: string, cursor: number) {
+  return async ({ dispatch, getState, client }: ThunkArgs) => {
     if (!input) {
       return;
     }
-
-    const frameId = (0, _selectors.getSelectedFrameId)(getState());
+    const frameId = getSelectedFrameId(getState());
     const result = await client.autocomplete(input, cursor, frameId);
-    await dispatch({
-      type: "AUTOCOMPLETE",
-      input,
-      result
-    });
+    await dispatch({ type: "AUTOCOMPLETE", input, result });
   };
 }
 
-function clearAutocomplete() {
-  return {
-    type: "CLEAR_AUTOCOMPLETE"
-  };
+export function clearAutocomplete() {
+  return { type: "CLEAR_AUTOCOMPLETE" };
 }
 
-function clearExpressionError() {
-  return {
-    type: "CLEAR_EXPRESSION_ERROR"
-  };
+export function clearExpressionError() {
+  return { type: "CLEAR_EXPRESSION_ERROR" };
 }
 
-function updateExpression(input, expression) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
+export function updateExpression(input: string, expression: Expression) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
     if (!input) {
       return;
     }
 
     const expressionError = await parser.hasSyntaxError(input);
     dispatch({
       type: "UPDATE_EXPRESSION",
       expression,
       input: expressionError ? expression.input : input,
       expressionError
     });
+
     dispatch(evaluateExpressions());
   };
 }
+
 /**
  *
  * @param {object} expression
  * @param {number} expression.id
  * @memberof actions/pause
  * @static
  */
-
-
-function deleteExpression(expression) {
-  return ({
-    dispatch
-  }) => {
+export function deleteExpression(expression: Expression) {
+  return ({ dispatch }: ThunkArgs) => {
     dispatch({
       type: "DELETE_EXPRESSION",
       input: expression.input
     });
   };
 }
+
 /**
  *
  * @memberof actions/pause
  * @param {number} selectedFrameId
  * @static
  */
-
-
-function evaluateExpressions() {
-  return async function ({
-    dispatch,
-    getState,
-    client
-  }) {
-    const expressions = (0, _selectors.getExpressions)(getState()).toJS();
-    const inputs = expressions.map(({
-      input
-    }) => input);
-    const frameId = (0, _selectors.getSelectedFrameId)(getState());
+export function evaluateExpressions() {
+  return async function({ dispatch, getState, client }: ThunkArgs) {
+    const expressions = getExpressions(getState()).toJS();
+    const inputs = expressions.map(({ input }) => input);
+    const frameId = getSelectedFrameId(getState());
     const results = await client.evaluateExpressions(inputs, frameId);
-    dispatch({
-      type: "EVALUATE_EXPRESSIONS",
-      inputs,
-      results
-    });
+    dispatch({ type: "EVALUATE_EXPRESSIONS", inputs, results });
   };
 }
 
-function evaluateExpression(expression) {
-  return async function ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) {
+function evaluateExpression(expression: Expression) {
+  return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
     if (!expression.input) {
       console.warn("Expressions should not be empty");
       return;
     }
 
     let input = expression.input;
-    const frame = (0, _selectors.getSelectedFrame)(getState());
+    const frame = getSelectedFrame(getState());
 
     if (frame) {
-      const {
-        location
-      } = frame;
-      const source = (0, _selectors.getSourceFromId)(getState(), location.sourceId);
-      const selectedSource = (0, _selectors.getSelectedSource)(getState());
+      const { location } = frame;
+      const source = getSourceFromId(getState(), location.sourceId);
 
-      if (selectedSource && (0, _source.isOriginal)(source) && (0, _source.isOriginal)(selectedSource)) {
+      const selectedSource = getSelectedSource(getState());
+
+      if (selectedSource && isOriginal(source) && isOriginal(selectedSource)) {
         const mapResult = await dispatch(getMappedExpression(input));
-
         if (mapResult) {
           input = mapResult.expression;
         }
       }
     }
 
-    const frameId = (0, _selectors.getSelectedFrameId)(getState());
+    const frameId = getSelectedFrameId(getState());
+
     return dispatch({
       type: "EVALUATE_EXPRESSION",
       input: expression.input,
-      [_promise.PROMISE]: client.evaluateInFrame((0, _expressions.wrapExpression)(input), frameId)
+      [PROMISE]: client.evaluateInFrame(wrapExpression(input), frameId)
     });
   };
 }
+
 /**
  * Gets information about original variable names from the source map
  * and replaces all posible generated names.
  */
-
+export function getMappedExpression(expression: string) {
+  return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
+    const mappings = getSelectedScopeMappings(getState());
+    const bindings = getSelectedFrameBindings(getState());
 
-function getMappedExpression(expression) {
-  return async function ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) {
-    const mappings = (0, _selectors.getSelectedScopeMappings)(getState());
-    const bindings = (0, _selectors.getSelectedFrameBindings)(getState()); // We bail early if we do not need to map the expression. This is important
+    // We bail early if we do not need to map the expression. This is important
     // because mapping an expression can be slow if the parser worker is
     // busy doing other work.
     //
     // 1. there are no mappings - we do not need to map original expressions
     // 2. does not contain `await` - we do not need to map top level awaits
     // 3. does not contain `=` - we do not need to map assignments
-
     if (!mappings && !expression.match(/(await|=)/)) {
       return null;
     }
 
-    return parser.mapExpression(expression, mappings, bindings || [], _prefs.features.mapExpressionBindings, _prefs.features.mapAwaitExpression);
+    return parser.mapExpression(
+      expression,
+      mappings,
+      bindings || [],
+      features.mapExpressionBindings,
+      features.mapAwaitExpression
+    );
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/file-search.js
+++ b/devtools/client/debugger/new/src/actions/file-search.js
@@ -1,209 +1,199 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.doSearch = doSearch;
-exports.doSearchForHighlight = doSearchForHighlight;
-exports.setFileSearchQuery = setFileSearchQuery;
-exports.toggleFileSearchModifier = toggleFileSearchModifier;
-exports.updateSearchResults = updateSearchResults;
-exports.searchContents = searchContents;
-exports.searchContentsForHighlight = searchContentsForHighlight;
-exports.traverseResults = traverseResults;
-exports.closeFileSearch = closeFileSearch;
-
-var _editor = require("../utils/editor/index");
-
-var _wasm = require("../utils/wasm");
-
-var _search = require("../workers/search/index");
-
-var _selectors = require("../selectors/index");
-
-var _ui = require("./ui");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function doSearch(query, editor) {
-  return ({
-    getState,
-    dispatch
-  }) => {
-    const selectedSource = (0, _selectors.getSelectedSource)(getState());
+
+// @flow
+
+import {
+  clearSearch,
+  find,
+  findNext,
+  findPrev,
+  removeOverlay,
+  searchSourceForHighlight
+} from "../utils/editor";
+import { isWasm, renderWasmText } from "../utils/wasm";
+import { getMatches } from "../workers/search";
+import type { Action, FileTextSearchModifier, ThunkArgs } from "./types";
 
+import {
+  getSelectedSource,
+  getFileSearchModifiers,
+  getFileSearchQuery,
+  getFileSearchResults
+} from "../selectors";
+
+import {
+  closeActiveSearch,
+  clearHighlightLineRange,
+  setActiveSearch
+} from "./ui";
+type Editor = Object;
+type Match = Object;
+
+export function doSearch(query: string, editor: Editor) {
+  return ({ getState, dispatch }: ThunkArgs) => {
+    const selectedSource = getSelectedSource(getState());
     if (!selectedSource || !selectedSource.text) {
       return;
     }
 
     dispatch(setFileSearchQuery(query));
     dispatch(searchContents(query, editor));
   };
 }
 
-function doSearchForHighlight(query, editor, line, ch) {
-  return async ({
-    getState,
-    dispatch
-  }) => {
-    const selectedSource = (0, _selectors.getSelectedSource)(getState());
-
+export function doSearchForHighlight(
+  query: string,
+  editor: Editor,
+  line: number,
+  ch: number
+) {
+  return async ({ getState, dispatch }: ThunkArgs) => {
+    const selectedSource = getSelectedSource(getState());
     if (!selectedSource || !selectedSource.text) {
       return;
     }
-
     dispatch(searchContentsForHighlight(query, editor, line, ch));
   };
 }
 
-function setFileSearchQuery(query) {
+export function setFileSearchQuery(query: string): Action {
   return {
     type: "UPDATE_FILE_SEARCH_QUERY",
     query
   };
 }
 
-function toggleFileSearchModifier(modifier) {
-  return {
-    type: "TOGGLE_FILE_SEARCH_MODIFIER",
-    modifier
-  };
+export function toggleFileSearchModifier(
+  modifier: FileTextSearchModifier
+): Action {
+  return { type: "TOGGLE_FILE_SEARCH_MODIFIER", modifier };
 }
 
-function updateSearchResults(characterIndex, line, matches) {
-  const matchIndex = matches.findIndex(elm => elm.line === line && elm.ch === characterIndex);
+export function updateSearchResults(
+  characterIndex: number,
+  line: number,
+  matches: Match[]
+): Action {
+  const matchIndex = matches.findIndex(
+    elm => elm.line === line && elm.ch === characterIndex
+  );
+
   return {
     type: "UPDATE_SEARCH_RESULTS",
     results: {
       matches,
       matchIndex,
       count: matches.length,
       index: characterIndex
     }
   };
 }
 
-function searchContents(query, editor) {
-  return async ({
-    getState,
-    dispatch
-  }) => {
-    const modifiers = (0, _selectors.getFileSearchModifiers)(getState());
-    const selectedSource = (0, _selectors.getSelectedSource)(getState());
+export function searchContents(query: string, editor: Object) {
+  return async ({ getState, dispatch }: ThunkArgs) => {
+    const modifiers = getFileSearchModifiers(getState());
+    const selectedSource = getSelectedSource(getState());
 
     if (!editor || !selectedSource || !selectedSource.text || !modifiers) {
       return;
     }
 
-    const ctx = {
-      ed: editor,
-      cm: editor.codeMirror
-    };
+    const ctx = { ed: editor, cm: editor.codeMirror };
 
     if (!query) {
-      (0, _editor.clearSearch)(ctx.cm, query);
+      clearSearch(ctx.cm, query);
       return;
     }
 
     const _modifiers = modifiers.toJS();
+    const sourceId = selectedSource.id;
+    const text = isWasm(sourceId)
+      ? renderWasmText(sourceId, selectedSource.text).join("\n")
+      : selectedSource.text;
 
-    const sourceId = selectedSource.id;
-    const text = (0, _wasm.isWasm)(sourceId) ? (0, _wasm.renderWasmText)(sourceId, selectedSource.text).join("\n") : selectedSource.text;
-    const matches = await (0, _search.getMatches)(query, text, _modifiers);
-    const res = (0, _editor.find)(ctx, query, true, _modifiers);
+    const matches = await getMatches(query, text, _modifiers);
 
+    const res = find(ctx, query, true, _modifiers);
     if (!res) {
       return;
     }
 
-    const {
-      ch,
-      line
-    } = res;
+    const { ch, line } = res;
+
     dispatch(updateSearchResults(ch, line, matches));
   };
 }
 
-function searchContentsForHighlight(query, editor, line, ch) {
-  return async ({
-    getState,
-    dispatch
-  }) => {
-    const modifiers = (0, _selectors.getFileSearchModifiers)(getState());
-    const selectedSource = (0, _selectors.getSelectedSource)(getState());
+export function searchContentsForHighlight(
+  query: string,
+  editor: Object,
+  line: number,
+  ch: number
+) {
+  return async ({ getState, dispatch }: ThunkArgs) => {
+    const modifiers = getFileSearchModifiers(getState());
+    const selectedSource = getSelectedSource(getState());
 
-    if (!query || !editor || !selectedSource || !selectedSource.text || !modifiers) {
+    if (
+      !query ||
+      !editor ||
+      !selectedSource ||
+      !selectedSource.text ||
+      !modifiers
+    ) {
       return;
     }
 
-    const ctx = {
-      ed: editor,
-      cm: editor.codeMirror
-    };
-
+    const ctx = { ed: editor, cm: editor.codeMirror };
     const _modifiers = modifiers.toJS();
 
-    (0, _editor.searchSourceForHighlight)(ctx, false, query, true, _modifiers, line, ch);
+    searchSourceForHighlight(ctx, false, query, true, _modifiers, line, ch);
   };
 }
 
-function traverseResults(rev, editor) {
-  return async ({
-    getState,
-    dispatch
-  }) => {
+export function traverseResults(rev: boolean, editor: Editor) {
+  return async ({ getState, dispatch }: ThunkArgs) => {
     if (!editor) {
       return;
     }
 
-    const ctx = {
-      ed: editor,
-      cm: editor.codeMirror
-    };
-    const query = (0, _selectors.getFileSearchQuery)(getState());
-    const modifiers = (0, _selectors.getFileSearchModifiers)(getState());
-    const {
-      matches
-    } = (0, _selectors.getFileSearchResults)(getState());
+    const ctx = { ed: editor, cm: editor.codeMirror };
+
+    const query = getFileSearchQuery(getState());
+    const modifiers = getFileSearchModifiers(getState());
+    const { matches } = getFileSearchResults(getState());
 
     if (query === "") {
-      dispatch((0, _ui.setActiveSearch)("file"));
+      dispatch(setActiveSearch("file"));
     }
 
     if (modifiers) {
       const matchedLocations = matches || [];
-      const results = rev ? (0, _editor.findPrev)(ctx, query, true, modifiers.toJS()) : (0, _editor.findNext)(ctx, query, true, modifiers.toJS());
+      const results = rev
+        ? findPrev(ctx, query, true, modifiers.toJS())
+        : findNext(ctx, query, true, modifiers.toJS());
 
       if (!results) {
         return;
       }
-
-      const {
-        ch,
-        line
-      } = results;
+      const { ch, line } = results;
       dispatch(updateSearchResults(ch, line, matchedLocations));
     }
   };
 }
 
-function closeFileSearch(editor) {
-  return ({
-    getState,
-    dispatch
-  }) => {
+export function closeFileSearch(editor: Editor) {
+  return ({ getState, dispatch }: ThunkArgs) => {
     if (editor) {
-      const query = (0, _selectors.getFileSearchQuery)(getState());
-      const ctx = {
-        ed: editor,
-        cm: editor.codeMirror
-      };
-      (0, _editor.removeOverlay)(ctx, query);
+      const query = getFileSearchQuery(getState());
+      const ctx = { ed: editor, cm: editor.codeMirror };
+      removeOverlay(ctx, query);
     }
 
     dispatch(setFileSearchQuery(""));
-    dispatch((0, _ui.closeActiveSearch)());
-    dispatch((0, _ui.clearHighlightLineRange)());
+    dispatch(closeActiveSearch());
+    dispatch(clearHighlightLineRange());
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/index.js
+++ b/devtools/client/debugger/new/src/actions/index.js
@@ -1,97 +1,43 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-
-var _breakpoints = require("./breakpoints/index");
-
-var breakpoints = _interopRequireWildcard(_breakpoints);
-
-var _expressions = require("./expressions");
-
-var expressions = _interopRequireWildcard(_expressions);
-
-var _eventListeners = require("./event-listeners");
-
-var eventListeners = _interopRequireWildcard(_eventListeners);
-
-var _pause = require("./pause/index");
-
-var pause = _interopRequireWildcard(_pause);
-
-var _navigation = require("./navigation");
-
-var navigation = _interopRequireWildcard(_navigation);
-
-var _ui = require("./ui");
-
-var ui = _interopRequireWildcard(_ui);
-
-var _fileSearch = require("./file-search");
-
-var fileSearch = _interopRequireWildcard(_fileSearch);
-
-var _ast = require("./ast");
-
-var ast = _interopRequireWildcard(_ast);
-
-var _coverage = require("./coverage");
-
-var coverage = _interopRequireWildcard(_coverage);
-
-var _projectTextSearch = require("./project-text-search");
-
-var projectTextSearch = _interopRequireWildcard(_projectTextSearch);
-
-var _quickOpen = require("./quick-open");
-
-var quickOpen = _interopRequireWildcard(_quickOpen);
-
-var _sourceTree = require("./source-tree");
-
-var sourceTree = _interopRequireWildcard(_sourceTree);
-
-var _sources = require("./sources/index");
-
-var sources = _interopRequireWildcard(_sources);
-
-var _tabs = require("./tabs");
-
-var tabs = _interopRequireWildcard(_tabs);
-
-var _debuggee = require("./debuggee");
-
-var debuggee = _interopRequireWildcard(_debuggee);
-
-var _toolbox = require("./toolbox");
-
-var toolbox = _interopRequireWildcard(_toolbox);
-
-var _preview = require("./preview");
-
-var preview = _interopRequireWildcard(_preview);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-exports.default = { ...navigation,
+
+// @flow
+
+import * as breakpoints from "./breakpoints";
+import * as expressions from "./expressions";
+import * as eventListeners from "./event-listeners";
+import * as pause from "./pause";
+import * as navigation from "./navigation";
+import * as ui from "./ui";
+import * as fileSearch from "./file-search";
+import * as ast from "./ast";
+import * as coverage from "./coverage";
+import * as projectTextSearch from "./project-text-search";
+import * as quickOpen from "./quick-open";
+import * as sourceTree from "./source-tree";
+import * as sources from "./sources";
+import * as tabs from "./tabs";
+import * as debuggee from "./debuggee";
+import * as toolbox from "./toolbox";
+import * as preview from "./preview";
+
+export default {
+  ...navigation,
   ...breakpoints,
   ...expressions,
   ...eventListeners,
   ...sources,
   ...tabs,
   ...pause,
   ...ui,
   ...fileSearch,
   ...ast,
   ...coverage,
   ...projectTextSearch,
   ...quickOpen,
   ...sourceTree,
   ...debuggee,
   ...toolbox,
   ...preview
-};
\ No newline at end of file
+};
--- a/devtools/client/debugger/new/src/actions/moz.build
+++ b/devtools/client/debugger/new/src/actions/moz.build
@@ -6,17 +6,17 @@
 DIRS += [
     'ast',
     'breakpoints',
     'pause',
     'sources',
     'utils',
 ]
 
-DevToolsModules(
+DebuggerModules(
     'ast.js',
     'coverage.js',
     'debuggee.js',
     'event-listeners.js',
     'expressions.js',
     'file-search.js',
     'index.js',
     'navigation.js',
--- a/devtools/client/debugger/new/src/actions/navigation.js
+++ b/devtools/client/debugger/new/src/actions/navigation.js
@@ -1,102 +1,76 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.willNavigate = willNavigate;
-exports.navigate = navigate;
-exports.connect = connect;
-exports.navigated = navigated;
-
-var _editor = require("../utils/editor/index");
-
-var _sourceQueue = require("../utils/source-queue");
-
-var _sourceQueue2 = _interopRequireDefault(_sourceQueue);
-
-var _sources = require("../reducers/sources");
-
-var _utils = require("../utils/utils");
-
-var _sources2 = require("./sources/index");
-
-var _debuggee = require("./debuggee");
-
-var _parser = require("../workers/parser/index");
-
-var _wasm = require("../utils/wasm");
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import { clearDocuments } from "../utils/editor";
+import sourceQueue from "../utils/source-queue";
+import { getSources } from "../reducers/sources";
+import { waitForMs } from "../utils/utils";
+
+import { newSources } from "./sources";
+import { updateWorkers } from "./debuggee";
+
+import {
+  clearASTs,
+  clearSymbols,
+  clearScopes,
+  clearSources
+} from "../workers/parser";
+
+import { clearWasmStates } from "../utils/wasm";
+
+import type { Action, ThunkArgs } from "./types";
+
 /**
  * Redux actions for the navigation state
  * @module actions/navigation
  */
 
 /**
  * @memberof actions/navigation
  * @static
  */
-function willNavigate(event) {
-  return async function ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) {
+export function willNavigate(event: Object) {
+  return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
     await sourceMaps.clearSourceMaps();
-    (0, _wasm.clearWasmStates)();
-    (0, _editor.clearDocuments)();
-    (0, _parser.clearSymbols)();
-    (0, _parser.clearASTs)();
-    (0, _parser.clearScopes)();
-    (0, _parser.clearSources)();
+    clearWasmStates();
+    clearDocuments();
+    clearSymbols();
+    clearASTs();
+    clearScopes();
+    clearSources();
     dispatch(navigate(event.url));
   };
 }
 
-function navigate(url) {
-  _sourceQueue2.default.clear();
+export function navigate(url: string): Action {
+  sourceQueue.clear();
 
   return {
     type: "NAVIGATE",
     url
   };
 }
 
-function connect(url, canRewind) {
-  return async function ({
-    dispatch
-  }) {
-    await dispatch((0, _debuggee.updateWorkers)());
-    dispatch({
-      type: "CONNECT",
-      url,
-      canRewind
-    });
+export function connect(url: string, canRewind: boolean) {
+  return async function({ dispatch }: ThunkArgs) {
+    await dispatch(updateWorkers());
+    dispatch(({ type: "CONNECT", url, canRewind }: Action));
   };
 }
+
 /**
  * @memberof actions/navigation
  * @static
  */
-
-
-function navigated() {
-  return async function ({
-    dispatch,
-    getState,
-    client
-  }) {
-    await (0, _utils.waitForMs)(100);
-
-    if (Object.keys((0, _sources.getSources)(getState())).length == 0) {
+export function navigated() {
+  return async function({ dispatch, getState, client }: ThunkArgs) {
+    await waitForMs(100);
+    if (Object.keys(getSources(getState())).length == 0) {
       const sources = await client.fetchSources();
-      dispatch((0, _sources2.newSources)(sources));
+      dispatch(newSources(sources));
     }
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/breakOnNext.js
+++ b/devtools/client/debugger/new/src/actions/pause/breakOnNext.js
@@ -1,30 +1,22 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.breakOnNext = breakOnNext;
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import type { ThunkArgs } from "../types";
+
 /**
  * Debugger breakOnNext command.
  * It's different from the comand action because we also want to
  * highlight the pause icon.
  *
  * @memberof actions/pause
  * @static
  */
-function breakOnNext() {
-  return async ({
-    dispatch,
-    client
-  }) => {
+export function breakOnNext() {
+  return async ({ dispatch, client }: ThunkArgs) => {
     await client.breakOnNext();
-    return dispatch({
-      type: "BREAK_ON_NEXT"
-    });
+    return dispatch({ type: "BREAK_ON_NEXT" });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/commands.js
+++ b/devtools/client/debugger/new/src/actions/pause/commands.js
@@ -1,260 +1,199 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.command = command;
-exports.stepIn = stepIn;
-exports.stepOver = stepOver;
-exports.stepOut = stepOut;
-exports.resume = resume;
-exports.rewind = rewind;
-exports.reverseStepIn = reverseStepIn;
-exports.reverseStepOver = reverseStepOver;
-exports.reverseStepOut = reverseStepOut;
-exports.astCommand = astCommand;
-
-var _selectors = require("../../selectors/index");
-
-var _promise = require("../utils/middleware/promise");
-
-var _parser = require("../../workers/parser/index");
-
-var _breakpoints = require("../breakpoints/index");
-
-var _prefs = require("../../utils/prefs");
-
-var _telemetry = require("../../utils/telemetry");
-
 /* -*- indent-tabs-mode: nil; js-indent-level: 2; js-indent-level: 2 -*- */
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import { isPaused, getSource, getTopFrame } from "../../selectors";
+import { PROMISE } from "../utils/middleware/promise";
+import { getNextStep } from "../../workers/parser";
+import { addHiddenBreakpoint } from "../breakpoints";
+import { features } from "../../utils/prefs";
+import { recordEvent } from "../../utils/telemetry";
+
+import type { Source } from "../../types";
+import type { ThunkArgs } from "../types";
+import type { Command } from "../../reducers/types";
+
 /**
  * Debugger commands like stepOver, stepIn, stepUp
  *
  * @param string $0.type
  * @memberof actions/pause
  * @static
  */
-function command(type) {
-  return async ({
-    dispatch,
-    client
-  }) => {
+export function command(type: Command) {
+  return async ({ dispatch, client }: ThunkArgs) => {
     return dispatch({
       type: "COMMAND",
       command: type,
-      [_promise.PROMISE]: client[type]()
+      [PROMISE]: client[type]()
     });
   };
 }
+
 /**
  * StepIn
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
-
-
-function stepIn() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    if ((0, _selectors.isPaused)(getState())) {
+export function stepIn() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    if (isPaused(getState())) {
       return dispatch(command("stepIn"));
     }
   };
 }
+
 /**
  * stepOver
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
-
-
-function stepOver() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    if ((0, _selectors.isPaused)(getState())) {
+export function stepOver() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    if (isPaused(getState())) {
       return dispatch(astCommand("stepOver"));
     }
   };
 }
+
 /**
  * stepOut
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
-
-
-function stepOut() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    if ((0, _selectors.isPaused)(getState())) {
+export function stepOut() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    if (isPaused(getState())) {
       return dispatch(command("stepOut"));
     }
   };
 }
+
 /**
  * resume
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
-
-
-function resume() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    if ((0, _selectors.isPaused)(getState())) {
-      (0, _telemetry.recordEvent)("continue");
+export function resume() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    if (isPaused(getState())) {
+      recordEvent("continue");
       return dispatch(command("resume"));
     }
   };
 }
+
 /**
  * rewind
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
-
-
-function rewind() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    if ((0, _selectors.isPaused)(getState())) {
+export function rewind() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    if (isPaused(getState())) {
       return dispatch(command("rewind"));
     }
   };
 }
+
 /**
  * reverseStepIn
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
-
-
-function reverseStepIn() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    if ((0, _selectors.isPaused)(getState())) {
+export function reverseStepIn() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    if (isPaused(getState())) {
       return dispatch(command("reverseStepIn"));
     }
   };
 }
+
 /**
  * reverseStepOver
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
-
-
-function reverseStepOver() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    if ((0, _selectors.isPaused)(getState())) {
+export function reverseStepOver() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    if (isPaused(getState())) {
       return dispatch(astCommand("reverseStepOver"));
     }
   };
 }
+
 /**
  * reverseStepOut
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
-
-
-function reverseStepOut() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    if ((0, _selectors.isPaused)(getState())) {
+export function reverseStepOut() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    if (isPaused(getState())) {
       return dispatch(command("reverseStepOut"));
     }
   };
 }
+
 /*
  * Checks for await or yield calls on the paused line
  * This avoids potentially expensive parser calls when we are likely
  * not at an async expression.
  */
-
-
-function hasAwait(source, pauseLocation) {
-  const {
-    line,
-    column
-  } = pauseLocation;
-
+function hasAwait(source: Source, pauseLocation) {
+  const { line, column } = pauseLocation;
   if (source.isWasm || !source.text) {
     return false;
   }
 
   const lineText = source.text.split("\n")[line - 1];
 
   if (!lineText) {
     return false;
   }
 
   const snippet = lineText.slice(column - 50, column + 50);
+
   return !!snippet.match(/(yield|await)/);
 }
+
 /**
  * @memberOf actions/pause
  * @static
  * @param stepType
  * @returns {function(ThunkArgs)}
  */
-
-
-function astCommand(stepType) {
-  return async ({
-    dispatch,
-    getState,
-    sourceMaps
-  }) => {
-    if (!_prefs.features.asyncStepping) {
+export function astCommand(stepType: Command) {
+  return async ({ dispatch, getState, sourceMaps }: ThunkArgs) => {
+    if (!features.asyncStepping) {
       return dispatch(command(stepType));
     }
 
     if (stepType == "stepOver") {
       // This type definition is ambiguous:
-      const frame = (0, _selectors.getTopFrame)(getState());
-      const source = (0, _selectors.getSource)(getState(), frame.location.sourceId);
+      const frame: any = getTopFrame(getState());
+      const source = getSource(getState(), frame.location.sourceId);
 
       if (source && hasAwait(source, frame.location)) {
-        const nextLocation = await (0, _parser.getNextStep)(source.id, frame.location);
-
+        const nextLocation = await getNextStep(source.id, frame.location);
         if (nextLocation) {
-          await dispatch((0, _breakpoints.addHiddenBreakpoint)(nextLocation));
+          await dispatch(addHiddenBreakpoint(nextLocation));
           return dispatch(command("resume"));
         }
       }
     }
 
     return dispatch(command(stepType));
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/continueToHere.js
+++ b/devtools/client/debugger/new/src/actions/pause/continueToHere.js
@@ -1,43 +1,44 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.continueToHere = continueToHere;
-
-var _selectors = require("../../selectors/index");
-
-var _breakpoints = require("../breakpoints/index");
-
-var _commands = require("./commands");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function continueToHere(line) {
-  return async function ({
-    dispatch,
-    getState
-  }) {
-    const selectedSource = (0, _selectors.getSelectedSource)(getState());
-    const selectedFrame = (0, _selectors.getSelectedFrame)(getState());
+
+// @flow
+
+import {
+  getSelectedSource,
+  getSelectedFrame,
+  getCanRewind
+} from "../../selectors";
+import { addHiddenBreakpoint } from "../breakpoints";
+import { resume, rewind } from "./commands";
+
+import type { ThunkArgs } from "../types";
+
+export function continueToHere(line: number) {
+  return async function({ dispatch, getState }: ThunkArgs) {
+    const selectedSource = getSelectedSource(getState());
+    const selectedFrame = getSelectedFrame(getState());
 
     if (!selectedFrame || !selectedSource) {
       return;
     }
 
     const debugLine = selectedFrame.location.line;
-
     if (debugLine == line) {
       return;
     }
 
-    const action = (0, _selectors.getCanRewind)(getState()) && line < debugLine ? _commands.rewind : _commands.resume;
-    await dispatch((0, _breakpoints.addHiddenBreakpoint)({
-      line,
-      column: undefined,
-      sourceId: selectedSource.id
-    }));
+    const action =
+      getCanRewind(getState()) && line < debugLine ? rewind : resume;
+
+    await dispatch(
+      addHiddenBreakpoint({
+        line,
+        column: undefined,
+        sourceId: selectedSource.id
+      })
+    );
+
     dispatch(action());
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/extra.js
+++ b/devtools/client/debugger/new/src/actions/pause/extra.js
@@ -1,107 +1,98 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.fetchExtra = fetchExtra;
-exports.getExtra = getExtra;
-
-var _selectors = require("../../selectors/index");
-
-var _preview = require("../../utils/preview");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+
+// @flow
+
+import { inComponent, getSelectedFrame } from "../../selectors";
+import { isImmutablePreview } from "../../utils/preview";
+
+import type { ThunkArgs } from "../types";
+
 async function getReactProps(evaluate, displayName) {
-  const componentNames = await evaluate(`
+  const componentNames = await evaluate(
+    `
     if(this.hasOwnProperty('_reactInternalFiber')) {
       let componentNames = [];
       let componentNode = this._reactInternalFiber;
       while(componentNode) {
         componentNames.push(componentNode.type.name);
         componentNode = componentNode._debugOwner
       }
       componentNames;
     }
     else {
       [this._reactInternalInstance.getName()];
     }
-    `);
-  const items = componentNames.result.preview && componentNames.result.preview.items;
-  let extra = {
-    displayName
-  };
+    `
+  );
 
+  const items =
+    componentNames.result.preview && componentNames.result.preview.items;
+
+  let extra = { displayName };
   if (items) {
-    extra = {
-      displayName,
-      componentStack: items
-    };
+    extra = { displayName, componentStack: items };
   }
 
   return extra;
 }
 
-async function getImmutableProps(expression, evaluate) {
+async function getImmutableProps(expression: string, evaluate) {
   // NOTE: it's possible the expression is a statement e.g `_this.fields;`
   expression = expression.replace(/;$/, "");
+
   const immutableEntries = await evaluate(`${expression}.toJS()`);
   const immutableType = await evaluate(`${expression}.constructor.name`);
+
   return {
     type: immutableType.result,
     entries: immutableEntries.result
   };
 }
 
 async function getExtraProps(getState, expression, result, evaluate) {
   const props = {};
-  const component = (0, _selectors.inComponent)(getState());
+
+  const component = inComponent(getState());
 
   if (component) {
     props.react = await getReactProps(evaluate, component);
   }
 
-  if ((0, _preview.isImmutablePreview)(result)) {
+  if (isImmutablePreview(result)) {
     props.immutable = await getImmutableProps(expression, evaluate);
   }
 
   return props;
 }
 
-function fetchExtra() {
-  return async function ({
-    dispatch,
-    getState
-  }) {
-    const frame = (0, _selectors.getSelectedFrame)(getState());
-
+export function fetchExtra() {
+  return async function({ dispatch, getState }: ThunkArgs) {
+    const frame = getSelectedFrame(getState());
     if (!frame) {
       return;
     }
 
     const extra = await dispatch(getExtra("this;", frame.this));
     dispatch({
       type: "ADD_EXTRA",
       extra: extra
     });
   };
 }
 
-function getExtra(expression, result) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const selectedFrame = (0, _selectors.getSelectedFrame)(getState());
-
+export function getExtra(expression: string, result: Object) {
+  return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
+    const selectedFrame = getSelectedFrame(getState());
     if (!selectedFrame) {
       return {};
     }
 
-    const extra = await getExtraProps(getState, expression, result, expr => client.evaluateInFrame(expr, selectedFrame.id));
+    const extra = await getExtraProps(getState, expression, result, expr =>
+      client.evaluateInFrame(expr, selectedFrame.id)
+    );
+
     return extra;
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/fetchScopes.js
+++ b/devtools/client/debugger/new/src/actions/pause/fetchScopes.js
@@ -1,40 +1,29 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.fetchScopes = fetchScopes;
-
-var _selectors = require("../../selectors/index");
-
-var _mapScopes = require("./mapScopes");
-
-var _promise = require("../utils/middleware/promise");
-
-var _extra = require("./extra");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function fetchScopes() {
-  return async function ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) {
-    const frame = (0, _selectors.getSelectedFrame)(getState());
+
+// @flow
 
-    if (!frame || (0, _selectors.getGeneratedFrameScope)(getState(), frame.id)) {
+import { getSelectedFrame, getGeneratedFrameScope } from "../../selectors";
+import { mapScopes } from "./mapScopes";
+import { PROMISE } from "../utils/middleware/promise";
+import { fetchExtra } from "./extra";
+import type { ThunkArgs } from "../types";
+
+export function fetchScopes() {
+  return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
+    const frame = getSelectedFrame(getState());
+    if (!frame || getGeneratedFrameScope(getState(), frame.id)) {
       return;
     }
 
     const scopes = dispatch({
       type: "ADD_SCOPES",
       frame,
-      [_promise.PROMISE]: client.getFrameScopes(frame)
+      [PROMISE]: client.getFrameScopes(frame)
     });
-    await dispatch((0, _extra.fetchExtra)());
-    await dispatch((0, _mapScopes.mapScopes)(scopes, frame));
+
+    await dispatch(fetchExtra());
+    await dispatch(mapScopes(scopes, frame));
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/index.js
+++ b/devtools/client/debugger/new/src/actions/pause/index.js
@@ -1,161 +1,32 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-
-var _commands = require("./commands");
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
-Object.defineProperty(exports, "stepIn", {
-  enumerable: true,
-  get: function () {
-    return _commands.stepIn;
-  }
-});
-Object.defineProperty(exports, "stepOver", {
-  enumerable: true,
-  get: function () {
-    return _commands.stepOver;
-  }
-});
-Object.defineProperty(exports, "stepOut", {
-  enumerable: true,
-  get: function () {
-    return _commands.stepOut;
-  }
-});
-Object.defineProperty(exports, "resume", {
-  enumerable: true,
-  get: function () {
-    return _commands.resume;
-  }
-});
-Object.defineProperty(exports, "rewind", {
-  enumerable: true,
-  get: function () {
-    return _commands.rewind;
-  }
-});
-Object.defineProperty(exports, "reverseStepIn", {
-  enumerable: true,
-  get: function () {
-    return _commands.reverseStepIn;
-  }
-});
-Object.defineProperty(exports, "reverseStepOver", {
-  enumerable: true,
-  get: function () {
-    return _commands.reverseStepOver;
-  }
-});
-Object.defineProperty(exports, "reverseStepOut", {
-  enumerable: true,
-  get: function () {
-    return _commands.reverseStepOut;
-  }
-});
+// @flow
 
-var _fetchScopes = require("./fetchScopes");
-
-Object.defineProperty(exports, "fetchScopes", {
-  enumerable: true,
-  get: function () {
-    return _fetchScopes.fetchScopes;
-  }
-});
-
-var _paused = require("./paused");
-
-Object.defineProperty(exports, "paused", {
-  enumerable: true,
-  get: function () {
-    return _paused.paused;
-  }
-});
-
-var _resumed = require("./resumed");
+/**
+ * Redux actions for the pause state
+ * @module actions/pause
+ */
 
-Object.defineProperty(exports, "resumed", {
-  enumerable: true,
-  get: function () {
-    return _resumed.resumed;
-  }
-});
-
-var _continueToHere = require("./continueToHere");
-
-Object.defineProperty(exports, "continueToHere", {
-  enumerable: true,
-  get: function () {
-    return _continueToHere.continueToHere;
-  }
-});
-
-var _breakOnNext = require("./breakOnNext");
-
-Object.defineProperty(exports, "breakOnNext", {
-  enumerable: true,
-  get: function () {
-    return _breakOnNext.breakOnNext;
-  }
-});
-
-var _mapFrames = require("./mapFrames");
-
-Object.defineProperty(exports, "mapFrames", {
-  enumerable: true,
-  get: function () {
-    return _mapFrames.mapFrames;
-  }
-});
-
-var _extra = require("./extra");
-
-Object.defineProperty(exports, "fetchExtra", {
-  enumerable: true,
-  get: function () {
-    return _extra.fetchExtra;
-  }
-});
-Object.defineProperty(exports, "getExtra", {
-  enumerable: true,
-  get: function () {
-    return _extra.getExtra;
-  }
-});
-
-var _setPopupObjectProperties = require("./setPopupObjectProperties");
-
-Object.defineProperty(exports, "setPopupObjectProperties", {
-  enumerable: true,
-  get: function () {
-    return _setPopupObjectProperties.setPopupObjectProperties;
-  }
-});
-
-var _pauseOnExceptions = require("./pauseOnExceptions");
-
-Object.defineProperty(exports, "pauseOnExceptions", {
-  enumerable: true,
-  get: function () {
-    return _pauseOnExceptions.pauseOnExceptions;
-  }
-});
-
-var _selectFrame = require("./selectFrame");
-
-Object.defineProperty(exports, "selectFrame", {
-  enumerable: true,
-  get: function () {
-    return _selectFrame.selectFrame;
-  }
-});
-
-var _skipPausing = require("./skipPausing");
-
-Object.defineProperty(exports, "toggleSkipPausing", {
-  enumerable: true,
-  get: function () {
-    return _skipPausing.toggleSkipPausing;
-  }
-});
\ No newline at end of file
+export {
+  stepIn,
+  stepOver,
+  stepOut,
+  resume,
+  rewind,
+  reverseStepIn,
+  reverseStepOver,
+  reverseStepOut
+} from "./commands";
+export { fetchScopes } from "./fetchScopes";
+export { paused } from "./paused";
+export { resumed } from "./resumed";
+export { continueToHere } from "./continueToHere";
+export { breakOnNext } from "./breakOnNext";
+export { mapFrames } from "./mapFrames";
+export { fetchExtra, getExtra } from "./extra";
+export { setPopupObjectProperties } from "./setPopupObjectProperties";
+export { pauseOnExceptions } from "./pauseOnExceptions";
+export { selectFrame } from "./selectFrame";
+export { toggleSkipPausing } from "./skipPausing";
--- a/devtools/client/debugger/new/src/actions/pause/mapFrames.js
+++ b/devtools/client/debugger/new/src/actions/pause/mapFrames.js
@@ -1,114 +1,118 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.updateFrameLocation = updateFrameLocation;
-exports.mapDisplayNames = mapDisplayNames;
-exports.mapFrames = mapFrames;
-
-var _selectors = require("../../selectors/index");
-
-var _assert = require("../../utils/assert");
-
-var _assert2 = _interopRequireDefault(_assert);
-
-var _ast = require("../../utils/ast");
-
-var _devtoolsSourceMap = require("devtools/client/shared/source-map/index.js");
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function updateFrameLocation(frame, sourceMaps) {
+
+// @flow
+
+import { getFrames, getSymbols, getSource } from "../../selectors";
+import assert from "../../utils/assert";
+import { findClosestFunction } from "../../utils/ast";
+
+import type { Frame } from "../../types";
+import type { State } from "../../reducers/types";
+import type { ThunkArgs } from "../types";
+
+import { isGeneratedId } from "devtools-source-map";
+
+export function updateFrameLocation(frame: Frame, sourceMaps: any) {
   if (frame.isOriginal) {
     return Promise.resolve(frame);
   }
-
-  return sourceMaps.getOriginalLocation(frame.location).then(loc => ({ ...frame,
+  return sourceMaps.getOriginalLocation(frame.location).then(loc => ({
+    ...frame,
     location: loc,
     generatedLocation: frame.generatedLocation || frame.location
   }));
 }
 
-function updateFrameLocations(frames, sourceMaps) {
+function updateFrameLocations(
+  frames: Frame[],
+  sourceMaps: any
+): Promise<Frame[]> {
   if (!frames || frames.length == 0) {
     return Promise.resolve(frames);
   }
 
-  return Promise.all(frames.map(frame => updateFrameLocation(frame, sourceMaps)));
+  return Promise.all(
+    frames.map(frame => updateFrameLocation(frame, sourceMaps))
+  );
 }
 
-function mapDisplayNames(frames, getState) {
+export function mapDisplayNames(
+  frames: Frame[],
+  getState: () => State
+): Frame[] {
   return frames.map(frame => {
     if (frame.isOriginal) {
       return frame;
     }
-
-    const source = (0, _selectors.getSource)(getState(), frame.location.sourceId);
+    const source = getSource(getState(), frame.location.sourceId);
 
     if (!source) {
       return frame;
     }
 
-    const symbols = (0, _selectors.getSymbols)(getState(), source);
+    const symbols = getSymbols(getState(), source);
 
     if (!symbols || !symbols.functions) {
       return frame;
     }
 
-    const originalFunction = (0, _ast.findClosestFunction)(symbols, frame.location);
+    const originalFunction = findClosestFunction(symbols, frame.location);
 
     if (!originalFunction) {
       return frame;
     }
 
     const originalDisplayName = originalFunction.name;
-    return { ...frame,
-      originalDisplayName
-    };
+    return { ...frame, originalDisplayName };
   });
 }
 
-function isWasmOriginalSourceFrame(frame, getState) {
-  if ((0, _devtoolsSourceMap.isGeneratedId)(frame.location.sourceId)) {
+function isWasmOriginalSourceFrame(frame, getState: () => State): boolean {
+  if (isGeneratedId(frame.location.sourceId)) {
     return false;
   }
+  const generatedSource = getSource(
+    getState(),
+    frame.generatedLocation.sourceId
+  );
 
-  const generatedSource = (0, _selectors.getSource)(getState(), frame.generatedLocation.sourceId);
   return Boolean(generatedSource && generatedSource.isWasm);
 }
 
-async function expandFrames(frames, sourceMaps, getState) {
+async function expandFrames(
+  frames: Frame[],
+  sourceMaps: any,
+  getState: () => State
+): Promise<Frame[]> {
   const result = [];
-
   for (let i = 0; i < frames.length; ++i) {
     const frame = frames[i];
-
     if (frame.isOriginal || !isWasmOriginalSourceFrame(frame, getState)) {
       result.push(frame);
       continue;
     }
-
-    const originalFrames = await sourceMaps.getOriginalStackFrames(frame.generatedLocation);
-
+    const originalFrames = await sourceMaps.getOriginalStackFrames(
+      frame.generatedLocation
+    );
     if (!originalFrames) {
       result.push(frame);
       continue;
     }
 
-    (0, _assert2.default)(originalFrames.length > 0, "Expected at least one original frame"); // First entry has not specific location -- use one from original frame.
-
-    originalFrames[0] = { ...originalFrames[0],
+    assert(originalFrames.length > 0, "Expected at least one original frame");
+    // First entry has not specific location -- use one from original frame.
+    originalFrames[0] = {
+      ...originalFrames[0],
       location: frame.location
     };
+
     originalFrames.forEach((originalFrame, j) => {
       // Keep outer most frame with true actor ID, and generate uniquie
       // one for the nested frames.
       const id = j == 0 ? frame.id : `${frame.id}-originalFrame${j}`;
       result.push({
         id,
         displayName: originalFrame.displayName,
         location: originalFrame.location,
@@ -117,43 +121,37 @@ async function expandFrames(frames, sour
         isOriginal: true,
         // More fields that will be added by the mapDisplayNames and
         // updateFrameLocation.
         generatedLocation: frame.generatedLocation,
         originalDisplayName: originalFrame.displayName
       });
     });
   }
-
   return result;
 }
+
 /**
  * Map call stack frame locations and display names to originals.
  * e.g.
  * 1. When the debuggee pauses
  * 2. When a source is pretty printed
  * 3. When symbols are loaded
  * @memberof actions/pause
  * @static
  */
-
-
-function mapFrames() {
-  return async function ({
-    dispatch,
-    getState,
-    sourceMaps
-  }) {
-    const frames = (0, _selectors.getFrames)(getState());
-
+export function mapFrames() {
+  return async function({ dispatch, getState, sourceMaps }: ThunkArgs) {
+    const frames = getFrames(getState());
     if (!frames) {
       return;
     }
 
     let mappedFrames = await updateFrameLocations(frames, sourceMaps);
     mappedFrames = await expandFrames(mappedFrames, sourceMaps, getState);
     mappedFrames = mapDisplayNames(mappedFrames, getState);
+
     dispatch({
       type: "MAP_FRAMES",
       frames: mappedFrames
     });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/mapScopes.js
+++ b/devtools/client/debugger/new/src/actions/pause/mapScopes.js
@@ -1,53 +1,61 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.mapScopes = mapScopes;
-
-var _selectors = require("../../selectors/index");
-
-var _loadSourceText = require("../sources/loadSourceText");
-
-var _promise = require("../utils/middleware/promise");
-
-var _prefs = require("../../utils/prefs");
-
-var _log = require("../../utils/log");
-
-var _source = require("../../utils/source");
-
-var _mapScopes = require("../../utils/pause/mapScopes/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function mapScopes(scopes, frame) {
-  return async function ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) {
-    const generatedSource = (0, _selectors.getSource)(getState(), frame.generatedLocation.sourceId);
-    const source = (0, _selectors.getSource)(getState(), frame.location.sourceId);
+
+// @flow
+
+import { getSource } from "../../selectors";
+import { loadSourceText } from "../sources/loadSourceText";
+import { PROMISE } from "../utils/middleware/promise";
+
+import { features } from "../../utils/prefs";
+import { log } from "../../utils/log";
+import { isGenerated } from "../../utils/source";
+import type { Frame, Scope } from "../../types";
+
+import type { ThunkArgs } from "../types";
+
+import { buildMappedScopes } from "../../utils/pause/mapScopes";
+
+export function mapScopes(scopes: Promise<Scope>, frame: Frame) {
+  return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
+    const generatedSource = getSource(
+      getState(),
+      frame.generatedLocation.sourceId
+    );
+
+    const source = getSource(getState(), frame.location.sourceId);
+
     await dispatch({
       type: "MAP_SCOPES",
       frame,
-      [_promise.PROMISE]: async function () {
-        if (!_prefs.features.mapScopes || !source || !generatedSource || generatedSource.isWasm || source.isPrettyPrinted || (0, _source.isGenerated)(source)) {
+      [PROMISE]: (async function() {
+        if (
+          !features.mapScopes ||
+          !source ||
+          !generatedSource ||
+          generatedSource.isWasm ||
+          source.isPrettyPrinted ||
+          isGenerated(source)
+        ) {
           return null;
         }
 
-        await dispatch((0, _loadSourceText.loadSourceText)(source));
+        await dispatch(loadSourceText(source));
 
         try {
-          return await (0, _mapScopes.buildMappedScopes)(source, frame, (await scopes), sourceMaps, client);
+          return await buildMappedScopes(
+            source,
+            frame,
+            await scopes,
+            sourceMaps,
+            client
+          );
         } catch (e) {
-          (0, _log.log)(e);
+          log(e);
           return null;
         }
-      }()
+      })()
     });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/moz.build
+++ b/devtools/client/debugger/new/src/actions/pause/moz.build
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DevToolsModules(
+DebuggerModules(
     'breakOnNext.js',
     'commands.js',
     'continueToHere.js',
     'extra.js',
     'fetchScopes.js',
     'index.js',
     'mapFrames.js',
     'mapScopes.js',
--- a/devtools/client/debugger/new/src/actions/pause/pauseOnExceptions.js
+++ b/devtools/client/debugger/new/src/actions/pause/pauseOnExceptions.js
@@ -1,41 +1,39 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.pauseOnExceptions = pauseOnExceptions;
-
-var _promise = require("../utils/middleware/promise");
-
-var _telemetry = require("../../utils/telemetry");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import { PROMISE } from "../utils/middleware/promise";
+import { recordEvent } from "../../utils/telemetry";
+import type { ThunkArgs } from "../types";
+
 /**
  *
  * @memberof actions/pause
  * @static
  */
-function pauseOnExceptions(shouldPauseOnExceptions, shouldPauseOnCaughtExceptions) {
-  return ({
-    dispatch,
-    client
-  }) => {
+export function pauseOnExceptions(
+  shouldPauseOnExceptions: boolean,
+  shouldPauseOnCaughtExceptions: boolean
+) {
+  return ({ dispatch, client }: ThunkArgs) => {
     /* eslint-disable camelcase */
-    (0, _telemetry.recordEvent)("pause_on_exceptions", {
+    recordEvent("pause_on_exceptions", {
       exceptions: shouldPauseOnExceptions,
       // There's no "n" in the key below (#1463117)
       caught_exceptio: shouldPauseOnCaughtExceptions
     });
     /* eslint-enable camelcase */
 
     return dispatch({
       type: "PAUSE_ON_EXCEPTIONS",
       shouldPauseOnExceptions,
       shouldPauseOnCaughtExceptions,
-      [_promise.PROMISE]: client.pauseOnExceptions(shouldPauseOnExceptions, shouldPauseOnCaughtExceptions)
+      [PROMISE]: client.pauseOnExceptions(
+        shouldPauseOnExceptions,
+        shouldPauseOnCaughtExceptions
+      )
     });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/paused.js
+++ b/devtools/client/debugger/new/src/actions/pause/paused.js
@@ -1,101 +1,88 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.paused = paused;
-
-var _selectors = require("../../selectors/index");
-
-var _ = require("./index");
-
-var _breakpoints = require("../breakpoints/index");
-
-var _expressions = require("../expressions");
-
-var _sources = require("../sources/index");
-
-var _loadSourceText = require("../sources/loadSourceText");
-
-var _ui = require("../ui");
-
-var _commands = require("./commands");
-
-var _pause = require("../../utils/pause/index");
-
-var _mapFrames = require("./mapFrames");
-
-var _fetchScopes = require("./fetchScopes");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-async function getOriginalSourceForFrame(state, frame) {
-  return (0, _selectors.getSources)(state)[frame.location.sourceId];
+
+// @flow
+import {
+  getHiddenBreakpointLocation,
+  isEvaluatingExpression,
+  getSelectedFrame,
+  getSources
+} from "../../selectors";
+
+import { mapFrames } from ".";
+import { removeBreakpoint } from "../breakpoints";
+import { evaluateExpressions } from "../expressions";
+import { selectLocation } from "../sources";
+import { loadSourceText } from "../sources/loadSourceText";
+import { togglePaneCollapse } from "../ui";
+import { command } from "./commands";
+import { shouldStep } from "../../utils/pause";
+
+import { updateFrameLocation } from "./mapFrames";
+
+import { fetchScopes } from "./fetchScopes";
+
+import type { Pause, Frame } from "../../types";
+import type { ThunkArgs } from "../types";
+
+async function getOriginalSourceForFrame(state, frame: Frame) {
+  return getSources(state)[frame.location.sourceId];
 }
 /**
  * Debugger has just paused
  *
  * @param {object} pauseInfo
  * @memberof actions/pause
  * @static
  */
-
+export function paused(pauseInfo: Pause) {
+  return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
+    const { frames, why, loadedObjects } = pauseInfo;
+    const topFrame = frames.length > 0 ? frames[0] : null;
 
-function paused(pauseInfo) {
-  return async function ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) {
-    const {
-      frames,
-      why,
-      loadedObjects
-    } = pauseInfo;
-    const topFrame = frames.length > 0 ? frames[0] : null; // NOTE: do not step when leaving a frame or paused at a debugger statement
+    // NOTE: do not step when leaving a frame or paused at a debugger statement
+    if (topFrame && !why.frameFinished && why.type == "resumeLimit") {
+      const mappedFrame = await updateFrameLocation(topFrame, sourceMaps);
+      const source = await getOriginalSourceForFrame(getState(), mappedFrame);
 
-    if (topFrame && !why.frameFinished && why.type == "resumeLimit") {
-      const mappedFrame = await (0, _mapFrames.updateFrameLocation)(topFrame, sourceMaps);
-      const source = await getOriginalSourceForFrame(getState(), mappedFrame); // Ensure that the original file has loaded if there is one.
+      // Ensure that the original file has loaded if there is one.
+      await dispatch(loadSourceText(source));
 
-      await dispatch((0, _loadSourceText.loadSourceText)(source));
-
-      if ((0, _pause.shouldStep)(mappedFrame, getState(), sourceMaps)) {
-        dispatch((0, _commands.command)("stepOver"));
+      if (shouldStep(mappedFrame, getState(), sourceMaps)) {
+        dispatch(command("stepOver"));
         return;
       }
     }
 
     dispatch({
       type: "PAUSED",
       why,
       frames,
       selectedFrameId: topFrame ? topFrame.id : undefined,
       loadedObjects: loadedObjects || []
     });
-    const hiddenBreakpointLocation = (0, _selectors.getHiddenBreakpointLocation)(getState());
 
+    const hiddenBreakpointLocation = getHiddenBreakpointLocation(getState());
     if (hiddenBreakpointLocation) {
-      dispatch((0, _breakpoints.removeBreakpoint)(hiddenBreakpointLocation));
+      dispatch(removeBreakpoint(hiddenBreakpointLocation));
     }
 
-    await dispatch((0, _.mapFrames)());
-    const selectedFrame = (0, _selectors.getSelectedFrame)(getState());
+    await dispatch(mapFrames());
 
+    const selectedFrame = getSelectedFrame(getState());
     if (selectedFrame) {
-      await dispatch((0, _sources.selectLocation)(selectedFrame.location));
+      await dispatch(selectLocation(selectedFrame.location));
     }
 
-    dispatch((0, _ui.togglePaneCollapse)("end", false));
-    await dispatch((0, _fetchScopes.fetchScopes)()); // Run after fetching scoping data so that it may make use of the sourcemap
-    // expression mappings for local variables.
+    dispatch(togglePaneCollapse("end", false));
+    await dispatch(fetchScopes());
 
+    // Run after fetching scoping data so that it may make use of the sourcemap
+    // expression mappings for local variables.
     const atException = why.type == "exception";
-
-    if (!atException || !(0, _selectors.isEvaluatingExpression)(getState())) {
-      await dispatch((0, _expressions.evaluateExpressions)());
+    if (!atException || !isEvaluatingExpression(getState())) {
+      await dispatch(evaluateExpressions());
     }
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/resumed.js
+++ b/devtools/client/debugger/new/src/actions/pause/resumed.js
@@ -1,41 +1,31 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.resumed = resumed;
-
-var _selectors = require("../../selectors/index");
-
-var _expressions = require("../expressions");
-
-var _pause = require("../../utils/pause/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import { isStepping, getPauseReason } from "../../selectors";
+import { evaluateExpressions } from "../expressions";
+import { inDebuggerEval } from "../../utils/pause";
+
+import type { ThunkArgs } from "../types";
+
 /**
  * Debugger has just resumed
  *
  * @memberof actions/pause
  * @static
  */
-function resumed() {
-  return async ({
-    dispatch,
-    client,
-    getState
-  }) => {
-    const why = (0, _selectors.getPauseReason)(getState());
-    const wasPausedInEval = (0, _pause.inDebuggerEval)(why);
-    const wasStepping = (0, _selectors.isStepping)(getState());
-    dispatch({
-      type: "RESUME"
-    });
+export function resumed() {
+  return async ({ dispatch, client, getState }: ThunkArgs) => {
+    const why = getPauseReason(getState());
+    const wasPausedInEval = inDebuggerEval(why);
+    const wasStepping = isStepping(getState());
+
+    dispatch({ type: "RESUME" });
 
     if (!wasStepping && !wasPausedInEval) {
-      await dispatch((0, _expressions.evaluateExpressions)());
+      await dispatch(evaluateExpressions());
     }
   };
-}
\ No newline at end of file
+}
deleted file mode 100644
--- a/devtools/client/debugger/new/src/actions/pause/selectComponent.js
+++ /dev/null
@@ -1,20 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.selectComponent = selectComponent;
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function selectComponent(componentIndex) {
-  return async ({
-    dispatch
-  }) => {
-    dispatch({
-      type: "SELECT_COMPONENT",
-      componentIndex
-    });
-  };
-}
\ No newline at end of file
--- a/devtools/client/debugger/new/src/actions/pause/selectFrame.js
+++ b/devtools/client/debugger/new/src/actions/pause/selectFrame.js
@@ -1,37 +1,30 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.selectFrame = selectFrame;
-
-var _sources = require("../sources/index");
-
-var _expressions = require("../expressions");
-
-var _fetchScopes = require("./fetchScopes");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import { selectLocation } from "../sources";
+import { evaluateExpressions } from "../expressions";
+import { fetchScopes } from "./fetchScopes";
+
+import type { Frame } from "../../types";
+import type { ThunkArgs } from "../types";
+
 /**
  * @memberof actions/pause
  * @static
  */
-function selectFrame(frame) {
-  return async ({
-    dispatch,
-    client,
-    getState,
-    sourceMaps
-  }) => {
+export function selectFrame(frame: Frame) {
+  return async ({ dispatch, client, getState, sourceMaps }: ThunkArgs) => {
     dispatch({
       type: "SELECT_FRAME",
       frame
     });
-    dispatch((0, _sources.selectLocation)(frame.location));
-    dispatch((0, _expressions.evaluateExpressions)());
-    dispatch((0, _fetchScopes.fetchScopes)());
+
+    dispatch(selectLocation(frame.location));
+
+    dispatch(evaluateExpressions());
+    dispatch(fetchScopes());
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/setPopupObjectProperties.js
+++ b/devtools/client/debugger/new/src/actions/pause/setPopupObjectProperties.js
@@ -1,36 +1,28 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.setPopupObjectProperties = setPopupObjectProperties;
-
-var _selectors = require("../../selectors/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import { getPopupObjectProperties } from "../../selectors";
+import type { ThunkArgs } from "../types";
+
 /**
  * @memberof actions/pause
  * @static
  */
-function setPopupObjectProperties(object, properties) {
-  return ({
-    dispatch,
-    client,
-    getState
-  }) => {
+export function setPopupObjectProperties(object: any, properties: Object) {
+  return ({ dispatch, client, getState }: ThunkArgs) => {
     const objectId = object.actor || object.objectId;
 
-    if ((0, _selectors.getPopupObjectProperties)(getState(), object.actor)) {
+    if (getPopupObjectProperties(getState(), object.actor)) {
       return;
     }
 
     dispatch({
       type: "SET_POPUP_OBJECT_PROPERTIES",
       objectId,
       properties
     });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/pause/skipPausing.js
+++ b/devtools/client/debugger/new/src/actions/pause/skipPausing.js
@@ -1,32 +1,20 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.toggleSkipPausing = toggleSkipPausing;
-
-var _selectors = require("../../selectors/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
+import type { ThunkArgs } from "../types";
+import { getSkipPausing } from "../../selectors";
+
 /**
  * @memberof actions/pause
  * @static
  */
-function toggleSkipPausing() {
-  return async ({
-    dispatch,
-    client,
-    getState,
-    sourceMaps
-  }) => {
-    const skipPausing = !(0, _selectors.getSkipPausing)(getState());
+export function toggleSkipPausing() {
+  return async ({ dispatch, client, getState, sourceMaps }: ThunkArgs) => {
+    const skipPausing = !getSkipPausing(getState());
     await client.setSkipPausing(skipPausing);
-    dispatch({
-      type: "TOGGLE_SKIP_PAUSING",
-      skipPausing
-    });
+    dispatch({ type: "TOGGLE_SKIP_PAUSING", skipPausing });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/preview.js
+++ b/devtools/client/debugger/new/src/actions/preview.js
@@ -1,148 +1,140 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.updatePreview = updatePreview;
-exports.setPreview = setPreview;
-exports.clearPreview = clearPreview;
-
-var _preview = require("../utils/preview");
-
-var _ast = require("../utils/ast");
-
-var _promise = require("./utils/middleware/promise");
-
-var _getExpression = require("../utils/editor/get-expression");
-
-var _source = require("../utils/source");
-
-var _selectors = require("../selectors/index");
-
-var _expressions = require("./expressions");
-
-var _pause = require("./pause/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+
+// @flow
+import { isConsole } from "../utils/preview";
+import { findBestMatchExpression } from "../utils/ast";
+import { PROMISE } from "./utils/middleware/promise";
+import { getExpressionFromCoords } from "../utils/editor/get-expression";
+import { isOriginal } from "../utils/source";
+
+import {
+  getPreview,
+  isLineInScope,
+  isSelectedFrameVisible,
+  getSelectedSource,
+  getSelectedFrame,
+  getSymbols
+} from "../selectors";
+
+import { getMappedExpression } from "./expressions";
+import { getExtra } from "./pause";
+
+import type { Action, ThunkArgs } from "./types";
+import type { ColumnPosition } from "../types";
+import type { AstLocation } from "../workers/parser";
+
 function findExpressionMatch(state, codeMirror, tokenPos) {
-  const source = (0, _selectors.getSelectedSource)(state);
-
+  const source = getSelectedSource(state);
   if (!source) {
     return;
   }
 
-  const symbols = (0, _selectors.getSymbols)(state, source);
+  const symbols = getSymbols(state, source);
+
   let match;
-
   if (!symbols || symbols.loading) {
-    match = (0, _getExpression.getExpressionFromCoords)(codeMirror, tokenPos);
+    match = getExpressionFromCoords(codeMirror, tokenPos);
   } else {
-    match = (0, _ast.findBestMatchExpression)(symbols, tokenPos);
+    match = findBestMatchExpression(symbols, tokenPos);
   }
-
   return match;
 }
 
-function updatePreview(target, tokenPos, codeMirror) {
-  return ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
+export function updatePreview(
+  target: HTMLElement,
+  tokenPos: Object,
+  codeMirror: any
+) {
+  return ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
     const cursorPos = target.getBoundingClientRect();
 
-    if (!(0, _selectors.isSelectedFrameVisible)(getState()) || !(0, _selectors.isLineInScope)(getState(), tokenPos.line)) {
+    if (
+      !isSelectedFrameVisible(getState()) ||
+      !isLineInScope(getState(), tokenPos.line)
+    ) {
       return;
     }
 
     const match = findExpressionMatch(getState(), codeMirror, tokenPos);
-
     if (!match) {
       return;
     }
 
-    const {
-      expression,
-      location
-    } = match;
+    const { expression, location } = match;
 
-    if ((0, _preview.isConsole)(expression)) {
+    if (isConsole(expression)) {
       return;
     }
 
     dispatch(setPreview(expression, location, tokenPos, cursorPos));
   };
 }
 
-function setPreview(expression, location, tokenPos, cursorPos) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
+export function setPreview(
+  expression: string,
+  location: AstLocation,
+  tokenPos: ColumnPosition,
+  cursorPos: ClientRect
+) {
+  return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
     await dispatch({
       type: "SET_PREVIEW",
-      [_promise.PROMISE]: async function () {
-        const source = (0, _selectors.getSelectedSource)(getState());
-
+      [PROMISE]: (async function() {
+        const source = getSelectedSource(getState());
         if (!source) {
           return;
         }
 
-        const selectedFrame = (0, _selectors.getSelectedFrame)(getState());
+        const selectedFrame = getSelectedFrame(getState());
 
-        if (location && (0, _source.isOriginal)(source)) {
-          const mapResult = await dispatch((0, _expressions.getMappedExpression)(expression));
-
+        if (location && isOriginal(source)) {
+          const mapResult = await dispatch(getMappedExpression(expression));
           if (mapResult) {
             expression = mapResult.expression;
           }
         }
 
         if (!selectedFrame) {
           return;
         }
 
-        const {
-          result
-        } = await client.evaluateInFrame(expression, selectedFrame.id);
+        const { result } = await client.evaluateInFrame(
+          expression,
+          selectedFrame.id
+        );
 
         if (result === undefined) {
           return;
         }
 
-        const extra = await dispatch((0, _pause.getExtra)(expression, result));
+        const extra = await dispatch(getExtra(expression, result));
+
         return {
           expression,
           result,
           location,
           tokenPos,
           cursorPos,
           extra
         };
-      }()
+      })()
     });
   };
 }
 
-function clearPreview() {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const currentSelection = (0, _selectors.getPreview)(getState());
-
+export function clearPreview() {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const currentSelection = getPreview(getState());
     if (!currentSelection) {
       return;
     }
 
-    return dispatch({
-      type: "CLEAR_SELECTION"
-    });
+    return dispatch(
+      ({
+        type: "CLEAR_SELECTION"
+      }: Action)
+    );
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/project-text-search.js
+++ b/devtools/client/debugger/new/src/actions/project-text-search.js
@@ -1,121 +1,84 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.addSearchQuery = addSearchQuery;
-exports.clearSearchQuery = clearSearchQuery;
-exports.addSearchResult = addSearchResult;
-exports.clearSearchResults = clearSearchResults;
-exports.clearSearch = clearSearch;
-exports.updateSearchStatus = updateSearchStatus;
-exports.closeProjectSearch = closeProjectSearch;
-exports.searchSources = searchSources;
-exports.searchSource = searchSource;
-
-var _search = require("../workers/search/index");
-
-var _selectors = require("../selectors/index");
-
-var _source = require("../utils/source");
-
-var _loadSourceText = require("./sources/loadSourceText");
-
-var _projectTextSearch = require("../reducers/project-text-search");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
 /**
  * Redux actions for the search state
  * @module actions/search
  */
-function addSearchQuery(query) {
-  return {
-    type: "ADD_QUERY",
-    query
-  };
+
+import { findSourceMatches } from "../workers/search";
+import { getSource, hasPrettySource, getSourceList } from "../selectors";
+import { isThirdParty } from "../utils/source";
+import { loadSourceText } from "./sources/loadSourceText";
+import { statusType } from "../reducers/project-text-search";
+
+import type { Action, ThunkArgs } from "./types";
+
+export function addSearchQuery(query: string): Action {
+  return { type: "ADD_QUERY", query };
 }
 
-function clearSearchQuery() {
-  return {
-    type: "CLEAR_QUERY"
-  };
+export function clearSearchQuery(): Action {
+  return { type: "CLEAR_QUERY" };
 }
 
-function addSearchResult(sourceId, filepath, matches) {
+export function addSearchResult(
+  sourceId: string,
+  filepath: string,
+  matches: Object[]
+): Action {
   return {
     type: "ADD_SEARCH_RESULT",
-    result: {
-      sourceId,
-      filepath,
-      matches
-    }
-  };
-}
-
-function clearSearchResults() {
-  return {
-    type: "CLEAR_SEARCH_RESULTS"
-  };
-}
-
-function clearSearch() {
-  return {
-    type: "CLEAR_SEARCH"
+    result: { sourceId, filepath, matches }
   };
 }
 
-function updateSearchStatus(status) {
-  return {
-    type: "UPDATE_STATUS",
-    status
-  };
+export function clearSearchResults(): Action {
+  return { type: "CLEAR_SEARCH_RESULTS" };
+}
+
+export function clearSearch(): Action {
+  return { type: "CLEAR_SEARCH" };
+}
+
+export function updateSearchStatus(status: string): Action {
+  return { type: "UPDATE_STATUS", status };
 }
 
-function closeProjectSearch() {
-  return {
-    type: "CLOSE_PROJECT_SEARCH"
+export function closeProjectSearch(): Action {
+  return { type: "CLOSE_PROJECT_SEARCH" };
+}
+
+export function searchSources(query: string) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
+    await dispatch(clearSearchResults());
+    await dispatch(addSearchQuery(query));
+    dispatch(updateSearchStatus(statusType.fetching));
+    const validSources = getSourceList(getState()).filter(
+      source => !hasPrettySource(getState(), source.id) && !isThirdParty(source)
+    );
+    for (const source of validSources) {
+      await dispatch(loadSourceText(source));
+      await dispatch(searchSource(source.id, query));
+    }
+    dispatch(updateSearchStatus(statusType.done));
   };
 }
 
-function searchSources(query) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    await dispatch(clearSearchResults());
-    await dispatch(addSearchQuery(query));
-    dispatch(updateSearchStatus(_projectTextSearch.statusType.fetching));
-    const validSources = (0, _selectors.getSourceList)(getState()).filter(source => !(0, _selectors.hasPrettySource)(getState(), source.id) && !(0, _source.isThirdParty)(source));
-
-    for (const source of validSources) {
-      await dispatch((0, _loadSourceText.loadSourceText)(source));
-      await dispatch(searchSource(source.id, query));
-    }
-
-    dispatch(updateSearchStatus(_projectTextSearch.statusType.done));
-  };
-}
-
-function searchSource(sourceId, query) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    const source = (0, _selectors.getSource)(getState(), sourceId);
-
+export function searchSource(sourceId: string, query: string) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
+    const source = getSource(getState(), sourceId);
     if (!source) {
       return;
     }
 
-    const matches = await (0, _search.findSourceMatches)(source, query);
-
+    const matches = await findSourceMatches(source, query);
     if (!matches.length) {
       return;
     }
-
     dispatch(addSearchResult(source.id, source.url, matches));
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/quick-open.js
+++ b/devtools/client/debugger/new/src/actions/quick-open.js
@@ -1,37 +1,25 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.setQuickOpenQuery = setQuickOpenQuery;
-exports.openQuickOpen = openQuickOpen;
-exports.closeQuickOpen = closeQuickOpen;
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function setQuickOpenQuery(query) {
+
+// @flow
+
+import type { QuickOpenAction } from "./types";
+
+export function setQuickOpenQuery(query: string): QuickOpenAction {
   return {
     type: "SET_QUICK_OPEN_QUERY",
     query
   };
 }
 
-function openQuickOpen(query) {
+export function openQuickOpen(query?: string): QuickOpenAction {
   if (query != null) {
-    return {
-      type: "OPEN_QUICK_OPEN",
-      query
-    };
+    return { type: "OPEN_QUICK_OPEN", query };
   }
-
-  return {
-    type: "OPEN_QUICK_OPEN"
-  };
+  return { type: "OPEN_QUICK_OPEN" };
 }
 
-function closeQuickOpen() {
-  return {
-    type: "CLOSE_QUICK_OPEN"
-  };
-}
\ No newline at end of file
+export function closeQuickOpen(): QuickOpenAction {
+  return { type: "CLOSE_QUICK_OPEN" };
+}
deleted file mode 100644
--- a/devtools/client/debugger/new/src/actions/replay.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.timeTravelTo = timeTravelTo;
-exports.clearHistory = clearHistory;
-
-var _selectors = require("../selectors/index");
-
-var _sources = require("./sources/index");
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-
-/**
- * Redux actions for replay
- * @module actions/replay
- */
-function timeTravelTo(position) {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    const data = (0, _selectors.getHistoryFrame)(getState(), position);
-    dispatch({
-      type: "TRAVEL_TO",
-      data,
-      position
-    });
-    dispatch((0, _sources.selectLocation)(data.paused.frames[0].location));
-  };
-}
-
-function clearHistory() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    dispatch({
-      type: "CLEAR_HISTORY"
-    });
-  };
-}
\ No newline at end of file
--- a/devtools/client/debugger/new/src/actions/source-tree.js
+++ b/devtools/client/debugger/new/src/actions/source-tree.js
@@ -1,21 +1,16 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.setExpandedState = setExpandedState;
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function setExpandedState(expanded) {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    dispatch({
-      type: "SET_EXPANDED_STATE",
-      expanded
-    });
+
+import type { Action, ThunkArgs } from "./types";
+
+export function setExpandedState(expanded) {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    dispatch(
+      ({
+        type: "SET_EXPANDED_STATE",
+        expanded
+      }: Action)
+    );
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/sources/blackbox.js
+++ b/devtools/client/debugger/new/src/actions/sources/blackbox.js
@@ -1,42 +1,32 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.toggleBlackBox = toggleBlackBox;
-
-var _telemetry = require("../../utils/telemetry");
-
-var _promise = require("../utils/middleware/promise");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
 /**
  * Redux actions for the sources state
  * @module actions/sources
  */
-function toggleBlackBox(source) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const {
-      isBlackBoxed,
-      id
-    } = source;
+
+import { recordEvent } from "../../utils/telemetry";
+
+import { PROMISE } from "../utils/middleware/promise";
+import type { Source } from "../../types";
+import type { ThunkArgs } from "../types";
+
+export function toggleBlackBox(source: Source) {
+  return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
+    const { isBlackBoxed, id } = source;
 
     if (!isBlackBoxed) {
-      (0, _telemetry.recordEvent)("blackbox");
+      recordEvent("blackbox");
     }
 
     return dispatch({
       type: "BLACKBOX",
       source,
-      [_promise.PROMISE]: client.blackBox(id, isBlackBoxed)
+      [PROMISE]: client.blackBox(id, isBlackBoxed)
     });
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/sources/index.js
+++ b/devtools/client/debugger/new/src/actions/sources/index.js
@@ -1,65 +1,10 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-
-var _blackbox = require("./blackbox");
-
-Object.keys(_blackbox).forEach(function (key) {
-  if (key === "default" || key === "__esModule") return;
-  Object.defineProperty(exports, key, {
-    enumerable: true,
-    get: function () {
-      return _blackbox[key];
-    }
-  });
-});
-
-var _loadSourceText = require("./loadSourceText");
-
-Object.keys(_loadSourceText).forEach(function (key) {
-  if (key === "default" || key === "__esModule") return;
-  Object.defineProperty(exports, key, {
-    enumerable: true,
-    get: function () {
-      return _loadSourceText[key];
-    }
-  });
-});
-
-var _newSources = require("./newSources");
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
-Object.keys(_newSources).forEach(function (key) {
-  if (key === "default" || key === "__esModule") return;
-  Object.defineProperty(exports, key, {
-    enumerable: true,
-    get: function () {
-      return _newSources[key];
-    }
-  });
-});
-
-var _prettyPrint = require("./prettyPrint");
-
-Object.keys(_prettyPrint).forEach(function (key) {
-  if (key === "default" || key === "__esModule") return;
-  Object.defineProperty(exports, key, {
-    enumerable: true,
-    get: function () {
-      return _prettyPrint[key];
-    }
-  });
-});
-
-var _select = require("./select");
-
-Object.keys(_select).forEach(function (key) {
-  if (key === "default" || key === "__esModule") return;
-  Object.defineProperty(exports, key, {
-    enumerable: true,
-    get: function () {
-      return _select[key];
-    }
-  });
-});
\ No newline at end of file
+// @flow
+export * from "./blackbox";
+export * from "./loadSourceText";
+export * from "./newSources";
+export * from "./prettyPrint";
+export * from "./select";
--- a/devtools/client/debugger/new/src/actions/sources/loadSourceText.js
+++ b/devtools/client/debugger/new/src/actions/sources/loadSourceText.js
@@ -1,124 +1,96 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.loadSourceText = loadSourceText;
-
-var _promise = require("../utils/middleware/promise");
-
-var _selectors = require("../../selectors/index");
-
-var _parser = require("../../workers/parser/index");
-
-var parser = _interopRequireWildcard(_parser);
-
-var _source = require("../../utils/source");
-
-var _telemetry = require("devtools/client/shared/telemetry");
-
-var _telemetry2 = _interopRequireDefault(_telemetry);
-
-var _defer = require("../../utils/defer");
-
-var _defer2 = _interopRequireDefault(_defer);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-const requests = new Map(); // Measures the time it takes for a source to load
+
+// @flow
 
-const loadSourceHistogram = "DEVTOOLS_DEBUGGER_LOAD_SOURCE_MS";
-const telemetry = new _telemetry2.default();
+import { PROMISE } from "../utils/middleware/promise";
+import { getGeneratedSource, getSource } from "../../selectors";
+import * as parser from "../../workers/parser";
+import { isLoaded, isOriginal } from "../../utils/source";
+import { Telemetry } from "devtools-modules";
+
+import defer from "../../utils/defer";
+import type { ThunkArgs } from "../types";
 
-async function loadSource(source, {
-  sourceMaps,
-  client
-}) {
-  const {
-    id
-  } = source;
+import type { Source } from "../../types";
+
+const requests = new Map();
 
-  if ((0, _source.isOriginal)(source)) {
+// Measures the time it takes for a source to load
+const loadSourceHistogram = "DEVTOOLS_DEBUGGER_LOAD_SOURCE_MS";
+const telemetry = new Telemetry();
+
+async function loadSource(source: Source, { sourceMaps, client }) {
+  const { id } = source;
+  if (isOriginal(source)) {
     return sourceMaps.getOriginalSourceText(source);
   }
 
   const response = await client.sourceContents(id);
   telemetry.finish(loadSourceHistogram, source);
+
   return {
     id,
     text: response.source,
     contentType: response.contentType || "text/javascript"
   };
 }
+
 /**
  * @memberof actions/sources
  * @static
  */
-
-
-function loadSourceText(source) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
+export function loadSourceText(source: ?Source) {
+  return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
     if (!source) {
       return;
     }
 
-    const id = source.id; // Fetch the source text only once.
-
+    const id = source.id;
+    // Fetch the source text only once.
     if (requests.has(id)) {
       return requests.get(id);
     }
 
-    if ((0, _source.isLoaded)(source)) {
+    if (isLoaded(source)) {
       return Promise.resolve();
     }
 
-    const deferred = (0, _defer2.default)();
+    const deferred = defer();
     requests.set(id, deferred.promise);
+
     telemetry.start(loadSourceHistogram, source);
-
     try {
       await dispatch({
         type: "LOAD_SOURCE_TEXT",
         sourceId: source.id,
-        [_promise.PROMISE]: loadSource(source, {
-          sourceMaps,
-          client
-        })
+        [PROMISE]: loadSource(source, { sourceMaps, client })
       });
     } catch (e) {
       deferred.resolve();
       requests.delete(id);
       return;
     }
 
-    const newSource = (0, _selectors.getSource)(getState(), source.id);
-
+    const newSource = getSource(getState(), source.id);
     if (!newSource) {
       return;
     }
 
-    if ((0, _source.isOriginal)(newSource) && !newSource.isWasm) {
-      const generatedSource = (0, _selectors.getGeneratedSource)(getState(), source);
+    if (isOriginal(newSource) && !newSource.isWasm) {
+      const generatedSource = getGeneratedSource(getState(), source);
       await dispatch(loadSourceText(generatedSource));
     }
 
     if (!newSource.isWasm) {
       await parser.setSource(newSource);
-    } // signal that the action is finished
+    }
 
-
+    // signal that the action is finished
     deferred.resolve();
     requests.delete(id);
+
     return source;
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/sources/moz.build
+++ b/devtools/client/debugger/new/src/actions/sources/moz.build
@@ -2,16 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DevToolsModules(
+DebuggerModules(
     'blackbox.js',
     'index.js',
     'loadSourceText.js',
     'newSources.js',
     'prettyPrint.js',
     'select.js',
 )
--- a/devtools/client/debugger/new/src/actions/sources/newSources.js
+++ b/devtools/client/debugger/new/src/actions/sources/newSources.js
@@ -1,220 +1,198 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.newSource = newSource;
-exports.newSources = newSources;
-
-var _devtoolsSourceMap = require("devtools/client/shared/source-map/index.js");
-
-var _lodash = require("devtools/client/shared/vendor/lodash");
-
-var _blackbox = require("./blackbox");
-
-var _breakpoints = require("../breakpoints/index");
-
-var _loadSourceText = require("./loadSourceText");
-
-var _prettyPrint = require("./prettyPrint");
-
-var _sources = require("../sources/index");
-
-var _source = require("../../utils/source");
-
-var _selectors = require("../../selectors/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
 /**
  * Redux actions for the sources state
  * @module actions/sources
  */
-function createOriginalSource(originalUrl, generatedSource, sourceMaps) {
+
+import { generatedToOriginalId } from "devtools-source-map";
+import { flatten } from "lodash";
+
+import { toggleBlackBox } from "./blackbox";
+import { syncBreakpoint } from "../breakpoints";
+import { loadSourceText } from "./loadSourceText";
+import { togglePrettyPrint } from "./prettyPrint";
+import { selectLocation } from "../sources";
+import { getRawSourceURL, isPrettyURL, isOriginal } from "../../utils/source";
+import {
+  getBlackBoxList,
+  getSource,
+  getPendingSelectedLocation,
+  getPendingBreakpointsForSource
+} from "../../selectors";
+
+import type { Source, SourceId } from "../../types";
+import type { Action, ThunkArgs } from "../types";
+
+function createOriginalSource(
+  originalUrl,
+  generatedSource,
+  sourceMaps
+): Source {
   return {
     url: originalUrl,
     relativeUrl: originalUrl,
-    id: (0, _devtoolsSourceMap.generatedToOriginalId)(generatedSource.id, originalUrl),
+    id: generatedToOriginalId(generatedSource.id, originalUrl),
     isPrettyPrinted: false,
     isWasm: false,
     isBlackBoxed: false,
     loadedState: "unloaded"
   };
 }
 
 function loadSourceMaps(sources) {
-  return async function ({
-    dispatch,
-    sourceMaps
-  }) {
+  return async function({ dispatch, sourceMaps }: ThunkArgs) {
     if (!sourceMaps) {
       return;
     }
 
-    let originalSources = await Promise.all(sources.map(({
-      id
-    }) => dispatch(loadSourceMap(id))));
-    originalSources = (0, _lodash.flatten)(originalSources).filter(Boolean);
+    let originalSources = await Promise.all(
+      sources.map(({ id }) => dispatch(loadSourceMap(id)))
+    );
 
+    originalSources = flatten(originalSources).filter(Boolean);
     if (originalSources.length > 0) {
       await dispatch(newSources(originalSources));
     }
   };
 }
+
 /**
  * @memberof actions/sources
  * @static
  */
-
+function loadSourceMap(sourceId: SourceId) {
+  return async function({ dispatch, getState, sourceMaps }: ThunkArgs) {
+    const source = getSource(getState(), sourceId);
 
-function loadSourceMap(sourceId) {
-  return async function ({
-    dispatch,
-    getState,
-    sourceMaps
-  }) {
-    const source = (0, _selectors.getSource)(getState(), sourceId);
-
-    if (!source || (0, _source.isOriginal)(source) || !source.sourceMapURL) {
+    if (!source || isOriginal(source) || !source.sourceMapURL) {
       return;
     }
 
     let urls = null;
-
     try {
       urls = await sourceMaps.getOriginalURLs(source);
     } catch (e) {
       console.error(e);
     }
 
     if (!urls) {
       // If this source doesn't have a sourcemap, enable it for pretty printing
-      dispatch({
-        type: "UPDATE_SOURCE",
-        // NOTE: Flow https://github.com/facebook/flow/issues/6342 issue
-        source: { ...source,
-          sourceMapURL: ""
-        }
-      });
+      dispatch(
+        ({
+          type: "UPDATE_SOURCE",
+          // NOTE: Flow https://github.com/facebook/flow/issues/6342 issue
+          source: (({ ...source, sourceMapURL: "" }: any): Source)
+        }: Action)
+      );
       return;
     }
 
     return urls.map(url => createOriginalSource(url, source, sourceMaps));
   };
-} // If a request has been made to show this source, go ahead and
-// select it.
-
+}
 
-function checkSelectedSource(sourceId) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    const source = (0, _selectors.getSource)(getState(), sourceId);
-    const pendingLocation = (0, _selectors.getPendingSelectedLocation)(getState());
+// If a request has been made to show this source, go ahead and
+// select it.
+function checkSelectedSource(sourceId: string) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
+    const source = getSource(getState(), sourceId);
+    const pendingLocation = getPendingSelectedLocation(getState());
 
     if (!pendingLocation || !pendingLocation.url || !source || !source.url) {
       return;
     }
 
     const pendingUrl = pendingLocation.url;
-    const rawPendingUrl = (0, _source.getRawSourceURL)(pendingUrl);
+    const rawPendingUrl = getRawSourceURL(pendingUrl);
 
     if (rawPendingUrl === source.url) {
-      if ((0, _source.isPrettyURL)(pendingUrl)) {
-        const prettySource = await dispatch((0, _prettyPrint.togglePrettyPrint)(source.id));
+      if (isPrettyURL(pendingUrl)) {
+        const prettySource = await dispatch(togglePrettyPrint(source.id));
         return dispatch(checkPendingBreakpoints(prettySource.id));
       }
 
-      await dispatch((0, _sources.selectLocation)({ ...pendingLocation,
-        sourceId: source.id
-      }));
+      await dispatch(
+        selectLocation({ ...pendingLocation, sourceId: source.id })
+      );
     }
   };
 }
 
-function checkPendingBreakpoints(sourceId) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
+function checkPendingBreakpoints(sourceId: string) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
     // source may have been modified by selectLocation
-    const source = (0, _selectors.getSource)(getState(), sourceId);
-
+    const source = getSource(getState(), sourceId);
     if (!source) {
       return;
     }
 
-    const pendingBreakpoints = (0, _selectors.getPendingBreakpointsForSource)(getState(), source);
+    const pendingBreakpoints = getPendingBreakpointsForSource(
+      getState(),
+      source
+    );
 
     if (pendingBreakpoints.length === 0) {
       return;
-    } // load the source text if there is a pending breakpoint for it
-
+    }
 
-    await dispatch((0, _loadSourceText.loadSourceText)(source));
-    await Promise.all(pendingBreakpoints.map(bp => dispatch((0, _breakpoints.syncBreakpoint)(sourceId, bp))));
+    // load the source text if there is a pending breakpoint for it
+    await dispatch(loadSourceText(source));
+
+    await Promise.all(
+      pendingBreakpoints.map(bp => dispatch(syncBreakpoint(sourceId, bp)))
+    );
   };
 }
 
-function restoreBlackBoxedSources(sources) {
-  return async ({
-    dispatch
-  }) => {
-    const tabs = (0, _selectors.getBlackBoxList)();
-
+function restoreBlackBoxedSources(sources: Source[]) {
+  return async ({ dispatch }: ThunkArgs) => {
+    const tabs = getBlackBoxList();
     if (tabs.length == 0) {
       return;
     }
-
     for (const source of sources) {
       if (tabs.includes(source.url) && !source.isBlackBoxed) {
-        dispatch((0, _blackbox.toggleBlackBox)(source));
+        dispatch(toggleBlackBox(source));
       }
     }
   };
 }
+
 /**
  * Handler for the debugger client's unsolicited newSource notification.
  * @memberof actions/sources
  * @static
  */
-
-
-function newSource(source) {
-  return async ({
-    dispatch
-  }) => {
+export function newSource(source: Source) {
+  return async ({ dispatch }: ThunkArgs) => {
     await dispatch(newSources([source]));
   };
 }
 
-function newSources(sources) {
-  return async ({
-    dispatch,
-    getState
-  }) => {
-    sources = sources.filter(source => !(0, _selectors.getSource)(getState(), source.id));
+export function newSources(sources: Source[]) {
+  return async ({ dispatch, getState }: ThunkArgs) => {
+    sources = sources.filter(source => !getSource(getState(), source.id));
 
     if (sources.length == 0) {
       return;
     }
 
-    dispatch({
-      type: "ADD_SOURCES",
-      sources: sources
-    });
+    dispatch(({ type: "ADD_SOURCES", sources: sources }: Action));
+
     await dispatch(loadSourceMaps(sources));
 
     for (const source of sources) {
       dispatch(checkSelectedSource(source.id));
       dispatch(checkPendingBreakpoints(source.id));
-    } // We would like to restore the blackboxed state
+    }
+
+    // We would like to restore the blackboxed state
     // after loading all states to make sure the correctness.
-
-
     await dispatch(restoreBlackBoxedSources(sources));
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/sources/prettyPrint.js
+++ b/devtools/client/debugger/new/src/actions/sources/prettyPrint.js
@@ -1,146 +1,131 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.createPrettySource = createPrettySource;
-exports.togglePrettyPrint = togglePrettyPrint;
-
-var _assert = require("../../utils/assert");
-
-var _assert2 = _interopRequireDefault(_assert);
-
-var _telemetry = require("../../utils/telemetry");
-
-var _breakpoints = require("../breakpoints/index");
-
-var _ast = require("../ast");
-
-var _prettyPrint = require("../../workers/pretty-print/index");
-
-var _parser = require("../../workers/parser/index");
-
-var _source = require("../../utils/source");
-
-var _loadSourceText = require("./loadSourceText");
-
-var _pause = require("../pause/index");
-
-var _sources = require("../sources/index");
-
-var _selectors = require("../../selectors/index");
-
-var _select = require("./select");
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function createPrettySource(sourceId) {
-  return async ({
-    dispatch,
-    getState,
-    sourceMaps
-  }) => {
-    const source = (0, _selectors.getSourceFromId)(getState(), sourceId);
-    const url = (0, _source.getPrettySourceURL)(source.url);
+
+// @flow
+
+import assert from "../../utils/assert";
+import { recordEvent } from "../../utils/telemetry";
+import { remapBreakpoints } from "../breakpoints";
+
+import { setPausePoints, setSymbols } from "../ast";
+import { prettyPrint } from "../../workers/pretty-print";
+import { setSource } from "../../workers/parser";
+import { getPrettySourceURL, isLoaded } from "../../utils/source";
+import { loadSourceText } from "./loadSourceText";
+import { mapFrames } from "../pause";
+import { selectSpecificLocation } from "../sources";
+
+import {
+  getSource,
+  getSourceFromId,
+  getSourceByURL,
+  getSelectedLocation
+} from "../../selectors";
+
+import type { Action, ThunkArgs } from "../types";
+import { selectSource } from "./select";
+import type { JsSource } from "../../types";
+
+export function createPrettySource(sourceId: string) {
+  return async ({ dispatch, getState, sourceMaps }: ThunkArgs) => {
+    const source = getSourceFromId(getState(), sourceId);
+    const url = getPrettySourceURL(source.url);
     const id = await sourceMaps.generatedToOriginalId(sourceId, url);
-    const prettySource = {
+
+    const prettySource: JsSource = {
       url,
       relativeUrl: url,
       id,
       isBlackBoxed: false,
       isPrettyPrinted: true,
       isWasm: false,
       contentType: "text/javascript",
       loadedState: "loading"
     };
-    dispatch({
-      type: "ADD_SOURCE",
-      source: prettySource
-    });
-    dispatch((0, _select.selectSource)(prettySource.id));
-    const {
-      code,
-      mappings
-    } = await (0, _prettyPrint.prettyPrint)({
-      source,
-      url
-    });
+
+    dispatch(({ type: "ADD_SOURCE", source: prettySource }: Action));
+    dispatch(selectSource(prettySource.id));
+
+    const { code, mappings } = await prettyPrint({ source, url });
     await sourceMaps.applySourceMap(source.id, url, code, mappings);
-    const loadedPrettySource = { ...prettySource,
+
+    const loadedPrettySource: JsSource = {
+      ...prettySource,
       text: code,
       loadedState: "loaded"
     };
-    (0, _parser.setSource)(loadedPrettySource);
-    dispatch({
-      type: "UPDATE_SOURCE",
-      source: loadedPrettySource
-    });
+
+    setSource(loadedPrettySource);
+
+    dispatch(({ type: "UPDATE_SOURCE", source: loadedPrettySource }: Action));
+
     return prettySource;
   };
 }
+
 /**
  * Toggle the pretty printing of a source's text. All subsequent calls to
  * |getText| will return the pretty-toggled text. Nothing will happen for
  * non-javascript files.
  *
  * @memberof actions/sources
  * @static
  * @param string id The source form from the RDP.
  * @returns Promise
  *          A promise that resolves to [aSource, prettyText] or rejects to
  *          [aSource, error].
  */
-
-
-function togglePrettyPrint(sourceId) {
-  return async ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) => {
-    const source = (0, _selectors.getSource)(getState(), sourceId);
-
+export function togglePrettyPrint(sourceId: string) {
+  return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
+    const source = getSource(getState(), sourceId);
     if (!source) {
       return {};
     }
 
     if (!source.isPrettyPrinted) {
-      (0, _telemetry.recordEvent)("pretty_print");
+      recordEvent("pretty_print");
     }
 
-    if (!(0, _source.isLoaded)(source)) {
-      await dispatch((0, _loadSourceText.loadSourceText)(source));
+    if (!isLoaded(source)) {
+      await dispatch(loadSourceText(source));
     }
 
-    (0, _assert2.default)(sourceMaps.isGeneratedId(sourceId), "Pretty-printing only allowed on generated sources");
-    const selectedLocation = (0, _selectors.getSelectedLocation)(getState());
-    const url = (0, _source.getPrettySourceURL)(source.url);
-    const prettySource = (0, _selectors.getSourceByURL)(getState(), url);
+    assert(
+      sourceMaps.isGeneratedId(sourceId),
+      "Pretty-printing only allowed on generated sources"
+    );
+
+    const selectedLocation = getSelectedLocation(getState());
+    const url = getPrettySourceURL(source.url);
+    const prettySource = getSourceByURL(getState(), url);
+
     const options = {};
-
     if (selectedLocation) {
       options.location = await sourceMaps.getOriginalLocation(selectedLocation);
     }
 
     if (prettySource) {
       const _sourceId = prettySource.id;
-      return dispatch((0, _sources.selectSpecificLocation)({ ...options.location,
-        sourceId: _sourceId
-      }));
+      return dispatch(
+        selectSpecificLocation({ ...options.location, sourceId: _sourceId })
+      );
     }
 
     const newPrettySource = await dispatch(createPrettySource(sourceId));
-    await dispatch((0, _breakpoints.remapBreakpoints)(sourceId));
-    await dispatch((0, _pause.mapFrames)());
-    await dispatch((0, _ast.setPausePoints)(newPrettySource.id));
-    await dispatch((0, _ast.setSymbols)(newPrettySource.id));
-    dispatch((0, _sources.selectSpecificLocation)({ ...options.location,
-      sourceId: newPrettySource.id
-    }));
+
+    await dispatch(remapBreakpoints(sourceId));
+    await dispatch(mapFrames());
+    await dispatch(setPausePoints(newPrettySource.id));
+    await dispatch(setSymbols(newPrettySource.id));
+
+    dispatch(
+      selectSpecificLocation({
+        ...options.location,
+        sourceId: newPrettySource.id
+      })
+    );
+
     return newPrettySource;
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/sources/select.js
+++ b/devtools/client/debugger/new/src/actions/sources/select.js
@@ -1,235 +1,205 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.clearSelectedLocation = exports.setPendingSelectedLocation = exports.setSelectedLocation = undefined;
-exports.selectSourceURL = selectSourceURL;
-exports.selectSource = selectSource;
-exports.selectLocation = selectLocation;
-exports.selectSpecificLocation = selectSpecificLocation;
-exports.jumpToMappedLocation = jumpToMappedLocation;
-exports.jumpToMappedSelectedLocation = jumpToMappedSelectedLocation;
-
-var _devtoolsSourceMap = require("devtools/client/shared/source-map/index.js");
-
-var _sources = require("../../reducers/sources");
-
-var _tabs = require("../../reducers/tabs");
-
-var _ast = require("../ast");
-
-var _ui = require("../ui");
-
-var _prettyPrint = require("./prettyPrint");
-
-var _tabs2 = require("../tabs");
-
-var _loadSourceText = require("./loadSourceText");
-
-var _prefs = require("../../utils/prefs");
-
-var _source = require("../../utils/source");
-
-var _location = require("../../utils/location");
-
-var _sourceMaps = require("../../utils/source-maps");
-
-var _selectors = require("../../selectors/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
 /**
  * Redux actions for the sources state
  * @module actions/sources
  */
-const setSelectedLocation = exports.setSelectedLocation = (source, location) => ({
+
+import { isOriginalId } from "devtools-source-map";
+
+import { getSourceFromId } from "../../reducers/sources";
+import { getSourcesForTabs } from "../../reducers/tabs";
+import { setOutOfScopeLocations, setSymbols } from "../ast";
+import { closeActiveSearch, updateActiveFileSearch } from "../ui";
+
+import { togglePrettyPrint } from "./prettyPrint";
+import { addTab, closeTab } from "../tabs";
+import { loadSourceText } from "./loadSourceText";
+
+import { prefs } from "../../utils/prefs";
+import { shouldPrettyPrint, isMinified } from "../../utils/source";
+import { createLocation } from "../../utils/location";
+import { getMappedLocation } from "../../utils/source-maps";
+
+import {
+  getSource,
+  getSourceByURL,
+  getPrettySource,
+  getActiveSearch,
+  getSelectedLocation,
+  getSelectedSource
+} from "../../selectors";
+
+import type { Location, Position, Source } from "../../types";
+import type { ThunkArgs } from "../types";
+
+export const setSelectedLocation = (source: Source, location: Location) => ({
   type: "SET_SELECTED_LOCATION",
   source,
   location
 });
 
-const setPendingSelectedLocation = exports.setPendingSelectedLocation = (url, options) => ({
+export const setPendingSelectedLocation = (url: string, options: Object) => ({
   type: "SET_PENDING_SELECTED_LOCATION",
   url: url,
   line: options.location ? options.location.line : null
 });
 
-const clearSelectedLocation = exports.clearSelectedLocation = () => ({
+export const clearSelectedLocation = () => ({
   type: "CLEAR_SELECTED_LOCATION"
 });
+
 /**
  * Deterministically select a source that has a given URL. This will
  * work regardless of the connection status or if the source exists
  * yet.
  *
  * This exists mostly for external things to interact with the
  * debugger.
  *
  * @memberof actions/sources
  * @static
  */
-
-
-function selectSourceURL(url, options = {
-  line: 1
-}) {
-  return async ({
-    dispatch,
-    getState,
-    sourceMaps
-  }) => {
-    const source = (0, _selectors.getSourceByURL)(getState(), url);
-
+export function selectSourceURL(url: string, options: Position = { line: 1 }) {
+  return async ({ dispatch, getState, sourceMaps }: ThunkArgs) => {
+    const source = getSourceByURL(getState(), url);
     if (!source) {
       return dispatch(setPendingSelectedLocation(url, options));
     }
 
     const sourceId = source.id;
-    const location = (0, _location.createLocation)({ ...options,
-      sourceId
-    });
+    const location = createLocation({ ...options, sourceId });
     return dispatch(selectLocation(location));
   };
 }
+
 /**
  * @memberof actions/sources
  * @static
  */
-
-
-function selectSource(sourceId) {
-  return async ({
-    dispatch
-  }) => {
-    const location = (0, _location.createLocation)({
-      sourceId
-    });
+export function selectSource(sourceId: string) {
+  return async ({ dispatch }: ThunkArgs) => {
+    const location = createLocation({ sourceId });
     return await dispatch(selectSpecificLocation(location));
   };
 }
+
 /**
  * @memberof actions/sources
  * @static
  */
-
-
-function selectLocation(location, {
-  keepContext = true
-} = {}) {
-  return async ({
-    dispatch,
-    getState,
-    sourceMaps,
-    client
-  }) => {
-    const currentSource = (0, _selectors.getSelectedSource)(getState());
+export function selectLocation(
+  location: Location,
+  { keepContext = true }: Object = {}
+) {
+  return async ({ dispatch, getState, sourceMaps, client }: ThunkArgs) => {
+    const currentSource = getSelectedSource(getState());
 
     if (!client) {
       // No connection, do nothing. This happens when the debugger is
       // shut down too fast and it tries to display a default source.
       return;
     }
 
-    let source = (0, _selectors.getSource)(getState(), location.sourceId);
-
+    let source = getSource(getState(), location.sourceId);
     if (!source) {
       // If there is no source we deselect the current selected source
       return dispatch(clearSelectedLocation());
     }
 
-    const activeSearch = (0, _selectors.getActiveSearch)(getState());
-
+    const activeSearch = getActiveSearch(getState());
     if (activeSearch && activeSearch !== "file") {
-      dispatch((0, _ui.closeActiveSearch)());
-    } // Preserve the current source map context (original / generated)
-    // when navigting to a new location.
-
-
-    const selectedSource = (0, _selectors.getSelectedSource)(getState());
-
-    if (keepContext && selectedSource && (0, _devtoolsSourceMap.isOriginalId)(selectedSource.id) != (0, _devtoolsSourceMap.isOriginalId)(location.sourceId)) {
-      location = await (0, _sourceMaps.getMappedLocation)(getState(), sourceMaps, location);
-      source = (0, _sources.getSourceFromId)(getState(), location.sourceId);
+      dispatch(closeActiveSearch());
     }
 
-    const tabSources = (0, _tabs.getSourcesForTabs)(getState());
+    // Preserve the current source map context (original / generated)
+    // when navigting to a new location.
+    const selectedSource = getSelectedSource(getState());
+    if (
+      keepContext &&
+      selectedSource &&
+      isOriginalId(selectedSource.id) != isOriginalId(location.sourceId)
+    ) {
+      location = await getMappedLocation(getState(), sourceMaps, location);
+      source = getSourceFromId(getState(), location.sourceId);
+    }
 
+    const tabSources = getSourcesForTabs(getState());
     if (!tabSources.includes(source)) {
-      dispatch((0, _tabs2.addTab)(source));
+      dispatch(addTab(source));
     }
 
     dispatch(setSelectedLocation(source, location));
-    await dispatch((0, _loadSourceText.loadSourceText)(source));
-    const loadedSource = (0, _selectors.getSource)(getState(), source.id);
+
+    await dispatch(loadSourceText(source));
+    const loadedSource = getSource(getState(), source.id);
 
     if (!loadedSource) {
       // If there was a navigation while we were loading the loadedSource
       return;
     }
 
-    if (keepContext && _prefs.prefs.autoPrettyPrint && !(0, _selectors.getPrettySource)(getState(), loadedSource.id) && (0, _source.shouldPrettyPrint)(loadedSource) && (0, _source.isMinified)(loadedSource)) {
-      await dispatch((0, _prettyPrint.togglePrettyPrint)(loadedSource.id));
-      dispatch((0, _tabs2.closeTab)(loadedSource));
+    if (
+      keepContext &&
+      prefs.autoPrettyPrint &&
+      !getPrettySource(getState(), loadedSource.id) &&
+      shouldPrettyPrint(loadedSource) &&
+      isMinified(loadedSource)
+    ) {
+      await dispatch(togglePrettyPrint(loadedSource.id));
+      dispatch(closeTab(loadedSource));
     }
 
-    dispatch((0, _ast.setSymbols)(loadedSource.id));
-    dispatch((0, _ast.setOutOfScopeLocations)()); // If a new source is selected update the file search results
+    dispatch(setSymbols(loadedSource.id));
+    dispatch(setOutOfScopeLocations());
 
-    const newSource = (0, _selectors.getSelectedSource)(getState());
-
+    // If a new source is selected update the file search results
+    const newSource = getSelectedSource(getState());
     if (currentSource && currentSource !== newSource) {
-      dispatch((0, _ui.updateActiveFileSearch)());
+      dispatch(updateActiveFileSearch());
     }
   };
 }
+
 /**
  * @memberof actions/sources
  * @static
  */
-
+export function selectSpecificLocation(location: Location) {
+  return selectLocation(location, { keepContext: false });
+}
 
-function selectSpecificLocation(location) {
-  return selectLocation(location, {
-    keepContext: false
-  });
-}
 /**
  * @memberof actions/sources
  * @static
  */
-
-
-function jumpToMappedLocation(location) {
-  return async function ({
-    dispatch,
-    getState,
-    client,
-    sourceMaps
-  }) {
+export function jumpToMappedLocation(location: Location) {
+  return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
     if (!client) {
       return;
     }
 
-    const pairedLocation = await (0, _sourceMaps.getMappedLocation)(getState(), sourceMaps, location);
-    return dispatch(selectSpecificLocation({ ...pairedLocation
-    }));
+    const pairedLocation = await getMappedLocation(
+      getState(),
+      sourceMaps,
+      location
+    );
+
+    return dispatch(selectSpecificLocation({ ...pairedLocation }));
   };
 }
 
-function jumpToMappedSelectedLocation() {
-  return async function ({
-    dispatch,
-    getState
-  }) {
-    const location = (0, _selectors.getSelectedLocation)(getState());
-
+export function jumpToMappedSelectedLocation() {
+  return async function({ dispatch, getState }: ThunkArgs) {
+    const location = getSelectedLocation(getState());
     if (!location) {
       return;
     }
 
     await dispatch(jumpToMappedLocation(location));
   };
-}
\ No newline at end of file
+}
deleted file mode 100644
--- a/devtools/client/debugger/new/src/actions/sources/tabs.js
+++ /dev/null
@@ -1,91 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.addTab = addTab;
-exports.moveTab = moveTab;
-exports.closeTab = closeTab;
-exports.closeTabs = closeTabs;
-
-var _editor = require("../../utils/editor/index");
-
-var _sources = require("../sources/index");
-
-var _selectors = require("../../selectors/index");
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-
-/**
- * Redux actions for the sources state
- * @module actions/sources
- */
-function addTab(url, tabIndex) {
-  return {
-    type: "ADD_TAB",
-    url,
-    tabIndex
-  };
-}
-
-function moveTab(url, tabIndex) {
-  return {
-    type: "MOVE_TAB",
-    url,
-    tabIndex
-  };
-}
-/**
- * @memberof actions/sources
- * @static
- */
-
-
-function closeTab(url) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    (0, _editor.removeDocument)(url);
-    const tabs = (0, _selectors.removeSourceFromTabList)((0, _selectors.getSourceTabs)(getState()), url);
-    const sourceId = (0, _selectors.getNewSelectedSourceId)(getState(), tabs);
-    dispatch({
-      type: "CLOSE_TAB",
-      url,
-      tabs
-    });
-    dispatch((0, _sources.selectSource)(sourceId));
-  };
-}
-/**
- * @memberof actions/sources
- * @static
- */
-
-
-function closeTabs(urls) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    urls.forEach(url => {
-      const source = (0, _selectors.getSourceByURL)(getState(), url);
-
-      if (source) {
-        (0, _editor.removeDocument)(source.id);
-      }
-    });
-    const tabs = (0, _selectors.removeSourcesFromTabList)((0, _selectors.getSourceTabs)(getState()), urls);
-    dispatch({
-      type: "CLOSE_TABS",
-      urls,
-      tabs
-    });
-    const sourceId = (0, _selectors.getNewSelectedSourceId)(getState(), tabs);
-    dispatch((0, _sources.selectSource)(sourceId));
-  };
-}
\ No newline at end of file
--- a/devtools/client/debugger/new/src/actions/tabs.js
+++ b/devtools/client/debugger/new/src/actions/tabs.js
@@ -1,114 +1,93 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.updateTab = updateTab;
-exports.addTab = addTab;
-exports.moveTab = moveTab;
-exports.closeTab = closeTab;
-exports.closeTabs = closeTabs;
-
-var _devtoolsSourceMap = require("devtools/client/shared/source-map/index.js");
-
-var _editor = require("../utils/editor/index");
-
-var _sources = require("./sources/index");
-
-var _selectors = require("../selectors/index");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
 /**
  * Redux actions for the editor tabs
  * @module actions/tabs
  */
-function updateTab(source, framework) {
-  const {
-    url,
-    id: sourceId
-  } = source;
-  const isOriginal = (0, _devtoolsSourceMap.isOriginalId)(source.id);
+
+import { isOriginalId } from "devtools-source-map";
+
+import { removeDocument } from "../utils/editor";
+import { selectSource } from "./sources";
+
+import {
+  getSourcesByURLs,
+  getSourceTabs,
+  getNewSelectedSourceId,
+  removeSourceFromTabList,
+  removeSourcesFromTabList
+} from "../selectors";
+
+import type { Action, ThunkArgs } from "./types";
+import type { Source } from "../types";
+
+export function updateTab(source: Source, framework: string): Action {
+  const { url, id: sourceId } = source;
+  const isOriginal = isOriginalId(source.id);
+
   return {
     type: "UPDATE_TAB",
     url,
     framework,
     isOriginal,
     sourceId
   };
 }
 
-function addTab(source) {
-  const {
-    url,
-    id: sourceId
-  } = source;
-  const isOriginal = (0, _devtoolsSourceMap.isOriginalId)(source.id);
+export function addTab(source: Source): Action {
+  const { url, id: sourceId } = source;
+  const isOriginal = isOriginalId(source.id);
+
   return {
     type: "ADD_TAB",
     url,
     isOriginal,
     sourceId
   };
 }
 
-function moveTab(url, tabIndex) {
+export function moveTab(url: string, tabIndex: number): Action {
   return {
     type: "MOVE_TAB",
     url,
     tabIndex
   };
 }
+
 /**
  * @memberof actions/tabs
  * @static
  */
-
+export function closeTab(source: Source) {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const { id, url } = source;
 
-function closeTab(source) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const {
-      id,
-      url
-    } = source;
-    (0, _editor.removeDocument)(id);
-    const tabs = (0, _selectors.removeSourceFromTabList)((0, _selectors.getSourceTabs)(getState()), source);
-    const sourceId = (0, _selectors.getNewSelectedSourceId)(getState(), tabs);
-    dispatch({
-      type: "CLOSE_TAB",
-      url,
-      tabs
-    });
-    dispatch((0, _sources.selectSource)(sourceId));
+    removeDocument(id);
+
+    const tabs = removeSourceFromTabList(getSourceTabs(getState()), source);
+    const sourceId = getNewSelectedSourceId(getState(), tabs);
+    dispatch(({ type: "CLOSE_TAB", url, tabs }: Action));
+    dispatch(selectSource(sourceId));
   };
 }
+
 /**
  * @memberof actions/tabs
  * @static
  */
-
+export function closeTabs(urls: string[]) {
+  return ({ dispatch, getState, client }: ThunkArgs) => {
+    const sources = getSourcesByURLs(getState(), urls);
+    sources.map(source => removeDocument(source.id));
 
-function closeTabs(urls) {
-  return ({
-    dispatch,
-    getState,
-    client
-  }) => {
-    const sources = (0, _selectors.getSourcesByURLs)(getState(), urls);
-    sources.map(source => (0, _editor.removeDocument)(source.id));
-    const tabs = (0, _selectors.removeSourcesFromTabList)((0, _selectors.getSourceTabs)(getState()), sources);
-    dispatch({
-      type: "CLOSE_TABS",
-      sources,
-      tabs
-    });
-    const sourceId = (0, _selectors.getNewSelectedSourceId)(getState(), tabs);
-    dispatch((0, _sources.selectSource)(sourceId));
+    const tabs = removeSourcesFromTabList(getSourceTabs(getState()), sources);
+    dispatch(({ type: "CLOSE_TABS", sources, tabs }: Action));
+
+    const sourceId = getNewSelectedSourceId(getState(), tabs);
+    dispatch(selectSource(sourceId));
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/toolbox.js
+++ b/devtools/client/debugger/new/src/actions/toolbox.js
@@ -1,61 +1,49 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.openLink = openLink;
-exports.openWorkerToolbox = openWorkerToolbox;
-exports.evaluateInConsole = evaluateInConsole;
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-const {
-  isDevelopment
-} = require("devtools/client/debugger/new/dist/vendors").vendored["devtools-environment"];
+
+// @flow
 
-const {
-  getSelectedFrameId
-} = require("../selectors/index");
+const { isDevelopment } = require("devtools-environment");
+const { getSelectedFrameId } = require("../selectors");
+
+import type { ThunkArgs } from "./types";
+import type { Worker } from "../types";
 
 /**
  * @memberof actions/toolbox
  * @static
  */
-function openLink(url) {
-  return async function ({
-    openLink: openLinkCommand
-  }) {
+export function openLink(url: string) {
+  return async function({ openLink: openLinkCommand }: ThunkArgs) {
     if (isDevelopment()) {
       const win = window.open(url, "_blank");
       win.focus();
     } else {
       openLinkCommand(url);
     }
   };
 }
 
-function openWorkerToolbox(worker) {
-  return async function ({
+export function openWorkerToolbox(worker: Worker) {
+  return async function({
     getState,
     openWorkerToolbox: openWorkerToolboxCommand
-  }) {
+  }: ThunkArgs) {
     if (isDevelopment()) {
       alert(worker.url);
     } else {
       openWorkerToolboxCommand(worker);
     }
   };
 }
 
-function evaluateInConsole(inputString) {
-  return async ({
-    client,
-    getState
-  }) => {
+export function evaluateInConsole(inputString: string) {
+  return async ({ client, getState }: ThunkArgs) => {
     const frameId = getSelectedFrameId(getState());
-    client.evaluate(`console.log("${inputString}"); console.log(${inputString})`, {
-      frameId
-    });
+    client.evaluate(
+      `console.log("${inputString}"); console.log(${inputString})`,
+      { frameId }
+    );
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/ui.js
+++ b/devtools/client/debugger/new/src/actions/ui.js
@@ -1,249 +1,206 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.setContextMenu = setContextMenu;
-exports.setPrimaryPaneTab = setPrimaryPaneTab;
-exports.closeActiveSearch = closeActiveSearch;
-exports.setActiveSearch = setActiveSearch;
-exports.updateActiveFileSearch = updateActiveFileSearch;
-exports.toggleFrameworkGrouping = toggleFrameworkGrouping;
-exports.showSource = showSource;
-exports.togglePaneCollapse = togglePaneCollapse;
-exports.highlightLineRange = highlightLineRange;
-exports.flashLineRange = flashLineRange;
-exports.clearHighlightLineRange = clearHighlightLineRange;
-exports.openConditionalPanel = openConditionalPanel;
-exports.closeConditionalPanel = closeConditionalPanel;
-exports.clearProjectDirectoryRoot = clearProjectDirectoryRoot;
-exports.setProjectDirectoryRoot = setProjectDirectoryRoot;
-exports.setOrientation = setOrientation;
-
-var _selectors = require("../selectors/index");
-
-var _select = require("../actions/sources/select");
-
-var _editor = require("../utils/editor/index");
-
-var _fileSearch = require("./file-search");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-function setContextMenu(type, event) {
-  return ({
-    dispatch
-  }) => {
-    dispatch({
-      type: "SET_CONTEXT_MENU",
-      contextMenu: {
-        type,
-        event
-      }
-    });
+
+// @flow
+
+import {
+  getActiveSearch,
+  getPaneCollapse,
+  getQuickOpenEnabled,
+  getSource,
+  getFileSearchQuery,
+  getProjectDirectoryRoot
+} from "../selectors";
+import { selectSource } from "../actions/sources/select";
+import type { ThunkArgs, panelPositionType } from "./types";
+import { getEditor } from "../utils/editor";
+import { searchContents } from "./file-search";
+
+import type {
+  ActiveSearchType,
+  OrientationType,
+  SelectedPrimaryPaneTabType
+} from "../reducers/ui";
+
+export function setContextMenu(type: string, event: any) {
+  return ({ dispatch }: ThunkArgs) => {
+    dispatch({ type: "SET_CONTEXT_MENU", contextMenu: { type, event } });
   };
 }
 
-function setPrimaryPaneTab(tabName) {
-  return {
-    type: "SET_PRIMARY_PANE_TAB",
-    tabName
-  };
+export function setPrimaryPaneTab(tabName: SelectedPrimaryPaneTabType) {
+  return { type: "SET_PRIMARY_PANE_TAB", tabName };
 }
 
-function closeActiveSearch() {
+export function closeActiveSearch() {
   return {
     type: "TOGGLE_ACTIVE_SEARCH",
     value: null
   };
 }
 
-function setActiveSearch(activeSearch) {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    const activeSearchState = (0, _selectors.getActiveSearch)(getState());
-
+export function setActiveSearch(activeSearch?: ActiveSearchType) {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    const activeSearchState = getActiveSearch(getState());
     if (activeSearchState === activeSearch) {
       return;
     }
 
-    if ((0, _selectors.getQuickOpenEnabled)(getState())) {
-      dispatch({
-        type: "CLOSE_QUICK_OPEN"
-      });
+    if (getQuickOpenEnabled(getState())) {
+      dispatch({ type: "CLOSE_QUICK_OPEN" });
     }
 
     dispatch({
       type: "TOGGLE_ACTIVE_SEARCH",
       value: activeSearch
     });
   };
 }
 
-function updateActiveFileSearch() {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    const isFileSearchOpen = (0, _selectors.getActiveSearch)(getState()) === "file";
-    const fileSearchQuery = (0, _selectors.getFileSearchQuery)(getState());
-
+export function updateActiveFileSearch() {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    const isFileSearchOpen = getActiveSearch(getState()) === "file";
+    const fileSearchQuery = getFileSearchQuery(getState());
     if (isFileSearchOpen && fileSearchQuery) {
-      const editor = (0, _editor.getEditor)();
-      dispatch((0, _fileSearch.searchContents)(fileSearchQuery, editor));
+      const editor = getEditor();
+      dispatch(searchContents(fileSearchQuery, editor));
     }
   };
 }
 
-function toggleFrameworkGrouping(toggleValue) {
-  return ({
-    dispatch,
-    getState
-  }) => {
+export function toggleFrameworkGrouping(toggleValue: boolean) {
+  return ({ dispatch, getState }: ThunkArgs) => {
     dispatch({
       type: "TOGGLE_FRAMEWORK_GROUPING",
       value: toggleValue
     });
   };
 }
 
-function showSource(sourceId) {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    const source = (0, _selectors.getSource)(getState(), sourceId);
-
+export function showSource(sourceId: string) {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    const source = getSource(getState(), sourceId);
     if (!source) {
       return;
     }
 
-    if ((0, _selectors.getPaneCollapse)(getState(), "start")) {
+    if (getPaneCollapse(getState(), "start")) {
       dispatch({
         type: "TOGGLE_PANE",
         position: "start",
         paneCollapsed: false
       });
     }
 
     dispatch(setPrimaryPaneTab("sources"));
-    dispatch({
-      type: "SHOW_SOURCE",
-      source: null
-    });
-    dispatch((0, _select.selectSource)(source.id));
-    dispatch({
-      type: "SHOW_SOURCE",
-      source
-    });
+
+    dispatch({ type: "SHOW_SOURCE", source: null });
+    dispatch(selectSource(source.id));
+    dispatch({ type: "SHOW_SOURCE", source });
   };
 }
 
-function togglePaneCollapse(position, paneCollapsed) {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    const prevPaneCollapse = (0, _selectors.getPaneCollapse)(getState(), position);
-
+export function togglePaneCollapse(
+  position: panelPositionType,
+  paneCollapsed: boolean
+) {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    const prevPaneCollapse = getPaneCollapse(getState(), position);
     if (prevPaneCollapse === paneCollapsed) {
       return;
     }
 
     dispatch({
       type: "TOGGLE_PANE",
       position,
       paneCollapsed
     });
   };
 }
+
 /**
  * @memberof actions/sources
  * @static
  */
-
-
-function highlightLineRange(location) {
+export function highlightLineRange(location: {
+  start: number,
+  end: number,
+  sourceId: number
+}) {
   return {
     type: "HIGHLIGHT_LINES",
     location
   };
 }
 
-function flashLineRange(location) {
-  return ({
-    dispatch
-  }) => {
+export function flashLineRange(location: {
+  start: number,
+  end: number,
+  sourceId: number
+}) {
+  return ({ dispatch }: ThunkArgs) => {
     dispatch(highlightLineRange(location));
     setTimeout(() => dispatch(clearHighlightLineRange()), 200);
   };
 }
+
 /**
  * @memberof actions/sources
  * @static
  */
-
-
-function clearHighlightLineRange() {
+export function clearHighlightLineRange() {
   return {
     type: "CLEAR_HIGHLIGHT_LINES"
   };
 }
 
-function openConditionalPanel(line) {
+export function openConditionalPanel(line: ?number) {
   if (!line) {
     return;
   }
 
   return {
     type: "OPEN_CONDITIONAL_PANEL",
     line
   };
 }
 
-function closeConditionalPanel() {
+export function closeConditionalPanel() {
   return {
     type: "CLOSE_CONDITIONAL_PANEL"
   };
 }
 
-function clearProjectDirectoryRoot() {
+export function clearProjectDirectoryRoot() {
   return {
     type: "SET_PROJECT_DIRECTORY_ROOT",
     url: ""
   };
 }
 
-function setProjectDirectoryRoot(newRoot) {
-  return ({
-    dispatch,
-    getState
-  }) => {
-    const curRoot = (0, _selectors.getProjectDirectoryRoot)(getState());
-
+export function setProjectDirectoryRoot(newRoot: string) {
+  return ({ dispatch, getState }: ThunkArgs) => {
+    const curRoot = getProjectDirectoryRoot(getState());
     if (newRoot && curRoot) {
       const newRootArr = newRoot.replace(/\/+/g, "/").split("/");
-      const curRootArr = curRoot.replace(/^\//, "").replace(/\/+/g, "/").split("/");
-
+      const curRootArr = curRoot
+        .replace(/^\//, "")
+        .replace(/\/+/g, "/")
+        .split("/");
       if (newRootArr[0] !== curRootArr[0]) {
         newRootArr.splice(0, 2);
         newRoot = `${curRoot}/${newRootArr.join("/")}`;
       }
     }
 
     dispatch({
       type: "SET_PROJECT_DIRECTORY_ROOT",
       url: newRoot
     });
   };
 }
 
-function setOrientation(orientation) {
-  return {
-    type: "SET_ORIENTATION",
-    orientation
-  };
-}
\ No newline at end of file
+export function setOrientation(orientation: OrientationType) {
+  return { type: "SET_ORIENTATION", orientation };
+}
--- a/devtools/client/debugger/new/src/actions/utils/create-store.js
+++ b/devtools/client/debugger/new/src/actions/utils/create-store.js
@@ -1,73 +1,84 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-
-var _redux = require("devtools/client/shared/vendor/redux");
-
-var _waitService = require("./middleware/wait-service");
-
-var _log = require("./middleware/log");
-
-var _history = require("./middleware/history");
-
-var _promise = require("./middleware/promise");
-
-var _thunk = require("./middleware/thunk");
-
-var _timing = require("./middleware/timing");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
+
 /* global window */
 
 /**
  * Redux store utils
  * @module utils/create-store
  */
 
+import { createStore, applyMiddleware } from "redux";
+import { waitUntilService } from "./middleware/wait-service";
+import { log } from "./middleware/log";
+import { history } from "./middleware/history";
+import { promise } from "./middleware/promise";
+import { thunk } from "./middleware/thunk";
+import { timing } from "./middleware/timing";
+
+/**
+ * @memberof utils/create-store
+ * @static
+ */
+type ReduxStoreOptions = {
+  makeThunkArgs?: Function,
+  history?: Array<Object>,
+  middleware?: Function[],
+  log?: boolean,
+  timing?: boolean
+};
+
 /**
  * This creates a dispatcher with all the standard middleware in place
  * that all code requires. It can also be optionally configured in
  * various ways, such as logging and recording.
  *
  * @param {object} opts:
  *        - log: log all dispatched actions to console
  *        - history: an array to store every action in. Should only be
  *                   used in tests.
  *        - middleware: array of middleware to be included in the redux store
  * @memberof utils/create-store
  * @static
  */
-const configureStore = (opts = {}) => {
-  const middleware = [(0, _thunk.thunk)(opts.makeThunkArgs), _promise.promise, // Order is important: services must go last as they always
-  // operate on "already transformed" actions. Actions going through
-  // them shouldn't have any special fields like promises, they
-  // should just be normal JSON objects.
-  _waitService.waitUntilService];
+const configureStore = (opts: ReduxStoreOptions = {}) => {
+  const middleware = [
+    thunk(opts.makeThunkArgs),
+    promise,
+
+    // Order is important: services must go last as they always
+    // operate on "already transformed" actions. Actions going through
+    // them shouldn't have any special fields like promises, they
+    // should just be normal JSON objects.
+    waitUntilService
+  ];
 
   if (opts.history) {
-    middleware.push((0, _history.history)(opts.history));
+    middleware.push(history(opts.history));
   }
 
   if (opts.middleware) {
     opts.middleware.forEach(fn => middleware.push(fn));
   }
 
   if (opts.log) {
-    middleware.push(_log.log);
+    middleware.push(log);
   }
 
   if (opts.timing) {
-    middleware.push(_timing.timing);
-  } // Hook in the redux devtools browser extension if it exists
+    middleware.push(timing);
+  }
 
+  // Hook in the redux devtools browser extension if it exists
+  const devtoolsExt =
+    typeof window === "object" && window.devToolsExtension
+      ? window.devToolsExtension()
+      : f => f;
 
-  const devtoolsExt = typeof window === "object" && window.devToolsExtension ? window.devToolsExtension() : f => f;
-  return (0, _redux.applyMiddleware)(...middleware)(devtoolsExt(_redux.createStore));
+  return applyMiddleware(...middleware)(devtoolsExt(createStore));
 };
 
-exports.default = configureStore;
\ No newline at end of file
+export default configureStore;
--- a/devtools/client/debugger/new/src/actions/utils/middleware/history.js
+++ b/devtools/client/debugger/new/src/actions/utils/middleware/history.js
@@ -1,32 +1,28 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.history = undefined;
-
-var _devtoolsEnvironment = require("devtools/client/debugger/new/dist/vendors").vendored["devtools-environment"];
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
+// @flow
 /* global window */
 
+import { isDevelopment } from "devtools-environment";
+
+import type { ThunkArgs } from "../../types";
+
 /**
  * A middleware that stores every action coming through the store in the passed
  * in logging object. Should only be used for tests, as it collects all
  * action information, which will cause memory bloat.
  */
-const history = exports.history = (log = []) => ({
+export const history = (log: Object[] = []) => ({
   dispatch,
   getState
-}) => {
-  return next => action => {
-    if ((0, _devtoolsEnvironment.isDevelopment)()) {
+}: ThunkArgs) => {
+  return (next: Function) => (action: Object) => {
+    if (isDevelopment()) {
       log.push(action);
     }
 
     return next(action);
   };
-};
\ No newline at end of file
+};
--- a/devtools/client/debugger/new/src/actions/utils/middleware/log.js
+++ b/devtools/client/debugger/new/src/actions/utils/middleware/log.js
@@ -1,117 +1,103 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.log = log;
-
-var _devtoolsEnvironment = require("devtools/client/debugger/new/dist/vendors").vendored["devtools-environment"];
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+/* global window */
 
-/* global window */
-const blacklist = ["SET_POPUP_OBJECT_PROPERTIES", "SET_PAUSE_POINTS", "SET_SYMBOLS", "OUT_OF_SCOPE_LOCATIONS", "MAP_SCOPES", "MAP_FRAMES", "ADD_SCOPES", "IN_SCOPE_LINES", "REMOVE_BREAKPOINT", "NODE_PROPERTIES_LOADED"];
+import { isTesting } from "devtools-environment";
+
+const blacklist = [
+  "SET_POPUP_OBJECT_PROPERTIES",
+  "SET_PAUSE_POINTS",
+  "SET_SYMBOLS",
+  "OUT_OF_SCOPE_LOCATIONS",
+  "MAP_SCOPES",
+  "MAP_FRAMES",
+  "ADD_SCOPES",
+  "IN_SCOPE_LINES",
+  "REMOVE_BREAKPOINT",
+  "NODE_PROPERTIES_LOADED"
+];
 
 function cloneAction(action) {
   action = action || {};
-  action = { ...action
-  }; // ADD_TAB, ...
+  action = { ...action };
 
+  // ADD_TAB, ...
   if (action.source && action.source.text) {
-    const source = { ...action.source,
-      text: ""
-    };
+    const source = { ...action.source, text: "" };
     action.source = source;
   }
 
   if (action.sources) {
     const sources = action.sources.slice(0, 20).map(source => {
       const url = !source.url || source.url.includes("data:") ? "" : source.url;
-      return { ...source,
-        url
-      };
+      return { ...source, url };
     });
     action.sources = sources;
-  } // LOAD_SOURCE_TEXT
+  }
 
-
+  // LOAD_SOURCE_TEXT
   if (action.text) {
     action.text = "";
   }
 
   if (action.value && action.value.text) {
-    const value = { ...action.value,
-      text: ""
-    };
+    const value = { ...action.value, text: "" };
     action.value = value;
   }
 
   return action;
 }
 
 function formatFrame(frame) {
-  const {
-    id,
-    location,
-    displayName
-  } = frame;
-  return {
-    id,
-    location,
-    displayName
-  };
+  const { id, location, displayName } = frame;
+  return { id, location, displayName };
 }
 
 function formatPause(pause) {
-  return { ...pause,
-    pauseInfo: {
-      why: pause.why
-    },
+  return {
+    ...pause,
+    pauseInfo: { why: pause.why },
     scopes: [],
     frames: pause.frames.map(formatFrame),
     loadedObjects: []
   };
 }
 
 function serializeAction(action) {
   try {
     action = cloneAction(action);
-
     if (blacklist.includes(action.type)) {
       action = {};
     }
 
     if (action.type === "PAUSED") {
       action = formatPause(action);
-    } // dump(`> ${action.type}...\n ${JSON.stringify(action)}\n`);
+    }
 
-
+    // dump(`> ${action.type}...\n ${JSON.stringify(action)}\n`);
     return JSON.stringify(action);
   } catch (e) {
     console.error(e);
   }
 }
+
 /**
  * A middleware that logs all actions coming through the system
  * to the console.
  */
-
-
-function log({
-  dispatch,
-  getState
-}) {
+export function log({ dispatch, getState }) {
   return next => action => {
     const asyncMsg = !action.status ? "" : `[${action.status}]`;
 
-    if ((0, _devtoolsEnvironment.isTesting)()) {
-      dump(`[ACTION] ${action.type} ${asyncMsg} - ${serializeAction(action)}\n`);
+    if (isTesting()) {
+      dump(
+        `[ACTION] ${action.type} ${asyncMsg} - ${serializeAction(action)}\n`
+      );
     } else {
       console.log(action, asyncMsg);
     }
 
     next(action);
   };
-}
\ No newline at end of file
+}
--- a/devtools/client/debugger/new/src/actions/utils/middleware/moz.build
+++ b/devtools/client/debugger/new/src/actions/utils/middleware/moz.build
@@ -2,16 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DevToolsModules(
+DebuggerModules(
     'history.js',
     'log.js',
     'promise.js',
     'thunk.js',
     'timing.js',
     'wait-service.js',
 )
--- a/devtools/client/debugger/new/src/actions/utils/middleware/promise.js
+++ b/devtools/client/debugger/new/src/actions/utils/middleware/promise.js
@@ -1,69 +1,109 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.promise = exports.PROMISE = undefined;
-
-var _lodash = require("devtools/client/shared/vendor/lodash");
-
-var _DevToolsUtils = require("../../../utils/DevToolsUtils");
-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+
+// @flow
+
+import { fromPairs, toPairs } from "lodash";
+import { executeSoon } from "../../../utils/DevToolsUtils";
+
+import type { ThunkArgs } from "../../types";
+
+type BasePromiseAction = {|
+  +"@@dispatch/promise": Promise<mixed>
+|};
+
+export type StartPromiseAction = {|
+  ...BasePromiseAction,
+  +status: "start"
+|};
+
+export type DonePromiseAction = {|
+  ...BasePromiseAction,
+  +status: "done",
+  +value: any
+|};
+
+export type ErrorPromiseAction = {|
+  ...BasePromiseAction,
+  +status: "error",
+  +error: any
+|};
+
+export type PromiseAction<Action, Value = any> =
+  // | {| ...Action, "@@dispatch/promise": Promise<Object> |}
+  | {|
+      ...BasePromiseAction,
+      ...Action,
+      +status: "start",
+      value: void
+    |}
+  | {|
+      ...BasePromiseAction,
+      ...Action,
+      +status: "done",
+      +value: Value
+    |}
+  | {|
+      ...BasePromiseAction,
+      ...Action,
+      +status: "error",
+      +error?: any,
+      value: void
+    |};
+
 let seqIdVal = 1;
 
 function seqIdGen() {
   return seqIdVal++;
 }
 
-function filterAction(action) {
-  return (0, _lodash.fromPairs)((0, _lodash.toPairs)(action).filter(pair => pair[0] !== PROMISE));
+function filterAction(action: Object): Object {
+  return fromPairs(toPairs(action).filter(pair => pair[0] !== PROMISE));
 }
 
 function promiseMiddleware({
   dispatch,
   getState
-}) {
-  return next => action => {
+}: ThunkArgs): Function | Promise<mixed> {
+  return (next: Function) => (action: Object) => {
     if (!(PROMISE in action)) {
       return next(action);
     }
 
     const promiseInst = action[PROMISE];
-    const seqId = seqIdGen().toString(); // Create a new action that doesn't have the promise field and has
-    // the `seqId` field that represents the sequence id
+    const seqId = seqIdGen().toString();
 
-    action = { ...filterAction(action),
-      seqId
-    };
-    dispatch({ ...action,
-      status: "start"
-    }); // Return the promise so action creators can still compose if they
+    // Create a new action that doesn't have the promise field and has