@flo-pereira’s solution is probably the better one, but generally you can deactivate the warning for as many lines as you want and then activate it again:
@@warning("-27")
let deepClone = (obj: 'a): 'a => %raw(`
JSON.parse(JSON.stringify(obj))
`);
@@warning("+27")
Thanks for all of the suggestions. I’m going to go with the _obj solution since it avoids having to use @@warning. The %raw(`function(obj){...}`) solution has the unfortunate side-effect that return values are typed as 'a instead of preserve the type of the argument.