Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Move some type definitions to Flow #1335

Closed
wants to merge 1 commit into from

Conversation

ppold
Copy link
Contributor

@ppold ppold commented Nov 28, 2016

Summary of Changes

  • Move Breakpoint, BreakpointResult, Location, Source, Frame, Scope from tcomb to Flow.

Test Plan

Make the types pass with Flow

Copy link
Contributor

@jasonLaster jasonLaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I paired with @ppold on this. Couple comments:

  1. we couldn't find a nice way to share the types between the client-adapter and debugger so they're currently duped
  2. we couldn't get the client-adapter to fail. This is probably the problem with 1 as well :). We checked the .flowconfig and it looks like it shouldn't be ignored...

* @static
*/
export type BreakpointResult = {
ids: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: we tried to make flow fail by adding this error, but when we run flow we got no errors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a blocker for this PR. :) We can't merge this until we know it's actually working. If it's not applying the types we have no idea if this PR actually works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 sorry that wasn't clear.

@@ -1,6 +1,96 @@
// @flow

/**
* Source File Location
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we tried doing something like this:

import type { Breakpoint, Source } from "devtools-client-adapters/types";
export type { Breakpoint, Source };

This worked to the extent that we didn't have to copy the types and the debugger would mention when a type was missing, but it didn't help us w/r/t to validating the types.

@jasonLaster
Copy link
Contributor

CC @jlongster @montogeek

@jasonLaster
Copy link
Contributor

ping @ppold will you be able to look at this?

@@ -15,7 +15,6 @@ import type { List } from "immutable";
import type { Frame } from "../types";

if (typeof window == "object") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole block should be removed not left empty.

@jasonLaster
Copy link
Contributor

Hmm, things have moved a bit:

@jasonLaster
Copy link
Contributor

closing this as most of the work will be done in devtools-core

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants