Skip to content

TypeError: Class constructor debugInfo cannot be invoked without 'new' #3591

Closed
ITSecOps-404/aports
#1

Description

@eight04

debugInfo = getDebugInfo(context, this, tabSetStr);

Found this issue when trying to use less from the source. This works in dist because the class is compiled into a function.

Activity

  1. matthew-dean commented on Jan 21, 2021

    @matthew-dean
    Member

    I remember finding the same when trying to convert to TypeScript. I'm not sure what the resolution should be / was though.

  2. drdevlin commented on Mar 5, 2021

    @drdevlin
    Contributor

    Is there a reason that debugInfo is defined as a class? I think defining it as a function would resolve the issue. I have refactored it to a function locally and there's no regression (that is, all existing tests pass). If all this sounds right, I'm happy to make a PR. (This is literally my first comment on GitHub and would be my first PR.)

  3. added a commit that references this issue on Mar 25, 2021
    063ef68
  4. added a commit that references this issue on Mar 16, 2024
    ce973cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions