Skip to content

fix ts types #9

Open
Open

Description

@dielduarte
No description provided.

Activity

  1. added this to the 1.0 milestone on Mar 30, 2020
  2. assuncaocharles commented on May 12, 2020

    @assuncaocharles
    Contributor

    Let's start a discussion here and define what we want, so we have a plan to "fix" this issue and @dielduarte adds in the issue description a list as we agree in new things.
    I would start suggesting to use types over an interface, there are many articles comparing both, such as interface vs type alias. The point is that type makes more sense semantically for our use, we are mainly using it for type inference and not as an interface to be implemented. Another big point here is that type alias allows you to play better with advanced types of the typescript as the projects grow more complex.

  3. dielduarte commented on May 12, 2020

    @dielduarte
    OwnerAuthor

    I've had read the post and that makes sense in our case, the main point is to keep consistency in the codebase.

    to get rid of this "issue" here, I would suggest a few changes in our codebase:

    • move from interfaces to types
    • get rid of details: any adding a global type definition, this is about the details params returned by the WebRequest API events callbacks https://developer.chrome.com/extensions/webRequest
    • get rid of requestExist = (context: any, this context is about CoreContext

    what do you think @assuncaocharles ?

  4. assuncaocharles commented on May 13, 2020

    @assuncaocharles
    Contributor

    It works for me

    • Replace interface for types
    • Get rid of requestExist = (context: any, this context is about CoreContext
    • Get rid of details: any adding a global type definition, this is about the details params returned by the WebRequest API events callbacks
  5. dielduarte commented on May 13, 2020

    @dielduarte
    OwnerAuthor

    @assuncaocharles niceeee! let's do it 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions