How to accept config for custom layout?

It seems like the Layouts provided by Go.JS like GridLayout can accept an object for customizing the working of the component.

How can such customization object be accepted for Custom Layouts?

For some reason, creating a Custom Layout, extending go.Layout seems to be missing these customization values from its arguments.

If you are calling GraphObject.make, that initialization support comes for free.

You can also provide an initialization object argument to your subclass’s constructor, such as this signature for the TreeLayout constructor.

new TreeLayout(init?: Partial<TreeLayout>): TreeLayout

At the end of the constructor call Object.assign:

  if (init) Object.assign(this, init);