Skip to content

Commit 790beeb

Browse files
committed
perf(napi/parser): do not remove extraneous options on JS side (#16447)
Similar to #16442. There's no need to remove the `experimental*` properties from `options` object on JS side. They'll be ignored by NAPI-RS on Rust side anyway, so creating a new object on JS side is pointless overhead.
1 parent 1e979ff commit 790beeb

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

napi/parser/src-js/raw-transfer/eager.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ const require = createRequire(import.meta.url);
1212
* @returns {Object} - Object with property getters for `program`, `module`, `comments`, and `errors`
1313
*/
1414
export function parseSyncRaw(filename, sourceText, options) {
15-
let _;
16-
({ experimentalRawTransfer: _, ...options } = options);
1715
return parseSyncRawImpl(filename, sourceText, options, deserialize);
1816
}
1917

@@ -36,8 +34,6 @@ export function parseSyncRaw(filename, sourceText, options) {
3634
* @returns {Object} - Object with property getters for `program`, `module`, `comments`, and `errors`
3735
*/
3836
export function parse(filename, sourceText, options) {
39-
let _;
40-
({ experimentalRawTransfer: _, ...options } = options);
4137
return parseAsyncRawImpl(filename, sourceText, options, deserialize);
4238
}
4339

napi/parser/src-js/raw-transfer/lazy.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ export { Visitor } from "./visitor.js";
3030
* and `dispose` and `visit` methods
3131
*/
3232
export function parseSyncLazy(filename, sourceText, options) {
33-
let _;
34-
({ experimentalLazy: _, ...options } = options);
3533
return parseSyncRawImpl(filename, sourceText, options, construct);
3634
}
3735

@@ -63,8 +61,6 @@ export function parseSyncLazy(filename, sourceText, options) {
6361
* and `dispose` and `visit` methods
6462
*/
6563
export function parse(filename, sourceText, options) {
66-
let _;
67-
({ experimentalLazy: _, ...options } = options);
6864
return parseAsyncRawImpl(filename, sourceText, options, construct);
6965
}
7066

0 commit comments

Comments
 (0)