You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The point of "ignore-local" is that you still have a pure function, even if you have local state. But in readonly-array, even local interface definitions are ignored, even if they will be exposed by returning them.
Example:
functionfoo(){interfaceFoo{foo: Array<string>}constbar: Foo={foo: []};// bar.foo is mutable here, which makes sense.bar.foo.push("");returnbar;}constoops=foo();// ...but it is also mutable here, which is dangerous.oops.foo.push("");
The text was updated successfully, but these errors were encountered:
The point of
"ignore-local"
is that you still have a pure function, even if you have local state. But inreadonly-array
, even local interface definitions are ignored, even if they will be exposed by returning them.Example:
The text was updated successfully, but these errors were encountered: