porffor 0.34.4 → 0.34.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/codegen.js +9 -7
- package/package.json +1 -1
- package/runner/index.js +1 -1
package/compiler/codegen.js
CHANGED
@@ -5812,14 +5812,16 @@ const generateClass = (scope, decl) => {
|
|
5812
5812
|
optional: false
|
5813
5813
|
};
|
5814
5814
|
|
5815
|
-
const constr =
|
5816
|
-
|
5815
|
+
const constr = {
|
5816
|
+
...(body.find(x => x.kind === 'constructor')?.value ?? {
|
5817
|
+
type: 'FunctionExpression',
|
5818
|
+
params: [],
|
5819
|
+
body: {
|
5820
|
+
type: 'BlockStatement',
|
5821
|
+
body: []
|
5822
|
+
}
|
5823
|
+
}),
|
5817
5824
|
id: root,
|
5818
|
-
params: [],
|
5819
|
-
body: {
|
5820
|
-
type: 'BlockStatement',
|
5821
|
-
body: []
|
5822
|
-
}
|
5823
5825
|
};
|
5824
5826
|
|
5825
5827
|
const [ func, out ] = generateFunc(scope, {
|
package/package.json
CHANGED