Today we fetch with code generated at runtime by a custom generation script that relies on a lot of string concatenation. However, Chromium DevTools already has a "Copy as fetch" option.
Alternatively, the function can be written out in regular vanilla JS (so it can be typechecked) and then be converted to a string to Function#toString().