1

I have a JS object with deeply nested values:

let IObj = {
    a: {
        b: string
    };
    d: string;
};

let obj: IObj  = {
  a: {
    b: 'c'
  },
  d: 'e'
}

I want to make it immutable:

let immutableObj = Immutable.fromJS(obj);

Which interface is implemented by immutableObj?

1
  • You may also check out github.com/engineforce/ImmutableAssign, which is a lightweight immutable helper that supports TypeScript type checking, and allows you to continue working with POJO (Plain Old JavaScript Object). Commented Nov 18, 2016 at 7:48

1 Answer 1

1

Which interface is implemented by immutableObj?

Sadly it returns an any. So it is completely unchecked.

Source

https://github.com/facebook/immutable-js/blob/68d1b90b3343da918badb70bfd998724d2a6be99/dist/immutable.d.ts#L86-L89

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.