{"library":"babel-plugin-transform-class-constructor-call","type":"library","category":null,"description":"This deprecated Babel plugin (v6.24.1, last release 2017) transforms the withdrawn TC39 proposal for call constructor syntax in ES2015 classes. It allows a class to have a 'call constructor' that is invoked when the class is called without 'new', enabling patterns like Date() returning a string while new Date() returns an instance. The proposal was withdrawn and is superseded by decorators. This plugin is part of Babel v6 era and is not compatible with Babel v7+. Developers should not use it in new projects; instead, use modern patterns like static methods or decorators.","language":"javascript","status":"deprecated","version":"6.24.1","tags":["javascript","babel-plugin"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-transform-class-constructor-call","imports":["// .babelrc\n{ \"plugins\": [\"transform-class-constructor-call\"] }","const babel = require('babel-core');\nbabel.transform(code, { plugins: ['transform-class-constructor-call'] });","class Point {\n  constructor(x, y) { this.x = x; this.y = y; }\n  call constructor(x, y) { return new Point(x, y); }\n}"]},{"cmd":"yarn add babel-plugin-transform-class-constructor-call","imports":[]},{"cmd":"pnpm add babel-plugin-transform-class-constructor-call","imports":[]}],"homepage":null,"github":"https://github.com/babel/babel","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-transform-class-constructor-call","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-plugin-transform-class-constructor-call/compatibility"}}