mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 17:10:40 +00:00

Some part of the codebase already use trailing commas, this commit is adding a lint rule to ensure it stays this way. This commit also adds the rule for a few files that were missing only one or two trailing commas. PR-URL: https://github.com/nodejs/node/pull/46655 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
43 lines
783 B
JavaScript
43 lines
783 B
JavaScript
'use strict';
|
|
|
|
const {
|
|
makeTransferable,
|
|
kClone,
|
|
kDeserialize,
|
|
} = require('internal/worker/js_transferable');
|
|
|
|
process.emitWarning(
|
|
'These APIs are for internal testing only. Do not use them.',
|
|
'internal/test/transfer');
|
|
|
|
// Used as part of parallel/test-messaging-maketransferable.
|
|
// This has to exist within the lib/internal/ path in order
|
|
// for deserialization to work.
|
|
|
|
class E {
|
|
constructor(b) {
|
|
this.b = b;
|
|
}
|
|
}
|
|
|
|
class F extends E {
|
|
constructor(b) {
|
|
super(b);
|
|
/* eslint-disable-next-line no-constructor-return */
|
|
return makeTransferable(this);
|
|
}
|
|
|
|
[kClone]() {
|
|
return {
|
|
data: { b: this.b },
|
|
deserializeInfo: 'internal/test/transfer:F',
|
|
};
|
|
}
|
|
|
|
[kDeserialize]({ b }) {
|
|
this.b = b;
|
|
}
|
|
}
|
|
|
|
module.exports = { E, F };
|