summaryrefslogtreecommitdiffstats
path: root/js/src/builtin/Classes.js
blob: d0f20b5fd78b57a3227a6304492c9373d712b611 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Give a builtin constructor that we can use as the default. When we give
// it to our newly made class, we will be sure to set it up with the correct name
// and .prototype, so that everything works properly.

var DefaultDerivedClassConstructor =
    class extends null {
        constructor(...args) {
            super(...allowContentSpread(args));
        }
    };
MakeDefaultConstructor(DefaultDerivedClassConstructor);

var DefaultBaseClassConstructor =
    class {
        constructor() { }
    };
MakeDefaultConstructor(DefaultBaseClassConstructor);