Function prevent_extensions

pub fn prevent_extensions<T>(target: &Object<T>) -> Result<bool, JsValue>
where
    Object<T>: ErasableGenericBorrow<Object<JsValue>>,

The static Reflect.preventExtensions() method prevents new properties from ever being added to an object (i.e. prevents future extensions to the object). It is similar to Object.preventExtensions(), but with some differences.

MDN documentation