Custom State Tree State Type

How do you create a custom type of state for the State Tree plugin? I need to create a new custom type of state with customized functionality that is selectable in the State Tree UI. I also would like to know how to create custom transition type?

I saw that someone else had created a custom type of state and transition type here but they didn’t share how they did it. So, it seems possible but with the lack of recourses on state tree, I’ve hit a wall and can’t seem to figure out how. Any help on this would be much appreciated.