0a5ab058a6
- Angular 12 application with PrimeNG components - 5 existing Cypress e2e test suites - SCSS styling with BEM naming convention - i18n support (10 languages) - Leaflet map integration - Complete component hierarchy and routing structure This baseline will be used for Angular → React migration.
26 lines
733 B
JavaScript
26 lines
733 B
JavaScript
'use strict';
|
|
|
|
var reflectSetProto = require('./Reflect.setPrototypeOf');
|
|
var originalSetProto = require('./Object.setPrototypeOf');
|
|
|
|
var setDunderProto = require('dunder-proto/set');
|
|
|
|
var $TypeError = require('es-errors/type');
|
|
|
|
/** @type {import('.')} */
|
|
module.exports = reflectSetProto
|
|
? function setProto(O, proto) {
|
|
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
if (reflectSetProto(O, proto)) {
|
|
return O;
|
|
}
|
|
throw new $TypeError('Reflect.setPrototypeOf: failed to set [[Prototype]]');
|
|
}
|
|
: originalSetProto || (
|
|
setDunderProto ? function setProto(O, proto) {
|
|
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
setDunderProto(O, proto);
|
|
return O;
|
|
} : null
|
|
);
|