site-panzai/node_modules/oxc-parser/src-js/raw-transfer/lazy-common.js

12 lines
323 B
JavaScript
Raw Normal View History

2026-11-13 13:57:04 +01:00
// Unique token which is not exposed publicly.
// Used to prevent user calling class constructors.
export const TOKEN = {};
/**
* Throw error when restricted class constructor is called by user code.
* @throws {Error}
*/
export function constructorError() {
throw new Error("Constructor is for internal use only");
}