Bug Report Checklist
Expected
For code like the following: playground link
declare const fn: <const A>(param: A) => A;
const test = fn({ foo: { bar: 1 } });
// ^? const test: { readonly foo: { readonly bar: 1; }; }
The object literal passed to fn should essentially be treated the same as if it was appended with as const and thus symbolHasReadonlyDeclaration should return true for the symbol of each of its deep properties.
Actual
symbolHasReadonlyDeclaration returns false for those symbols.
Additional Info
release notes: const Type Parameters
Initial issue: eslint-functional/eslint-plugin-functional#827
Bug Report Checklist
mainbranch of the repository.Expected
For code like the following: playground link
The object literal passed to
fnshould essentially be treated the same as if it was appended withas constand thussymbolHasReadonlyDeclarationshould returntruefor the symbol of each of its deep properties.Actual
symbolHasReadonlyDeclarationreturnsfalsefor those symbols.Additional Info
release notes: const Type Parameters
Initial issue: eslint-functional/eslint-plugin-functional#827