complete/type-declaration-immutability
💼 This rule is enabled in the ✅ recommended config.
📝 Enforces that interfaces are immutable.
💭 This rule requires type information.
This rule has the same purpose as
functional/type-declaration-immutability,
but has no options and requires every interface to be fully immutable. Type
aliases are not checked, and interface names do not affect enforcement.
Rule Details
Section titled “Rule Details”// Badinterface Foo { bar: string;}
// Goodinterface Foo { readonly bar: string;}Deeply immutable ReadonlyMap, ReadonlySet, and read-only array types are
considered immutable.
Options
Section titled “Options”This rule is not configurable.
