Is there a method, whether through a macro library, an eslint rule, a tsconfig setting, a special global.d.ts
file, or some other means, to automatically set function arguments as readonly by default?
// I wish for the compiler to transform this:
function foo(a: A[], b: Record<string, string>) {
}
// Into this
function foo(a: ReadonlyArray<A>, b: Readonly<Record<string, string>>) {
}