Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace prototype javascript code with Class declaration #291

Closed
1 task done
volterra79 opened this issue Jan 10, 2023 · 1 comment
Closed
1 task done

Replace prototype javascript code with Class declaration #291

volterra79 opened this issue Jan 10, 2023 · 1 comment
Labels
breaking Any code changes that are not or may not be backward compatible
Milestone

Comments

@volterra79
Copy link
Member

volterra79 commented Jan 10, 2023

Checklist

  • I've searched through the current issues to make sure this feature hasn't been requested already.

Motivation

To have a clean code it is better to use javascript Class declaration

Suggested solution

For example:

• Current code

const {base, inherit}= require('core/utils/utils');
const G3WObject = require('core/g3wobject');

function ProjectsRegistry() {
  ....
}
inherit(ProjectsRegistry, G3WObject);

const proto = ProjectsRegistry.prototype;
proto.clear = function(){
 .....
}

• New code

const G3WObject = require('core/g3wobject');

class ProjectsRegistry extends G3WObject {
   constructor(){
     super();
     ......
   }
   clear(){
      ....
    }

Alternatives considered

No response

@volterra79 volterra79 added feature New feature or request refactoring Anything which could result in a API change labels Jan 10, 2023
@volterra79 volterra79 added this to the v4.0 milestone Jan 10, 2023
@volterra79 volterra79 self-assigned this Jan 10, 2023
@volterra79 volterra79 added help wanted Extra attention is needed and removed feature New feature or request labels Jan 10, 2023
@Raruto Raruto removed the help wanted Extra attention is needed label Jan 10, 2023
@Raruto Raruto added breaking Any code changes that are not or may not be backward compatible and removed refactoring Anything which could result in a API change labels Jan 31, 2023
@Raruto Raruto added refactoring Anything which could result in a API change breaking Any code changes that are not or may not be backward compatible and removed breaking Any code changes that are not or may not be backward compatible refactoring Anything which could result in a API change labels Apr 22, 2024
@Raruto
Copy link
Collaborator

Raruto commented May 6, 2024

#574 took care of this.

Little by little other classes will also migrate.

@Raruto Raruto closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Any code changes that are not or may not be backward compatible
Projects
None yet
Development

No branches or pull requests

2 participants