code: function getTypePropMap(def) {
    var map = {};
    def &&
      def.extends &&
      def.extends.forEach(e => {
        var superModule = defs.Immutable;
        e.name.split('.').forEach(part => {
          superModule =
            superModule && superModule.module && superModule.module[part];
        });
        var superInterface = superModule && superModule.interface;
        if (superInterface) {
          var interfaceMap = Seq(superInterface.typeParams)
            .toKeyedSeq()
            .flip()
            .map(i => e.args[i])
            .toObject();
          Seq(interfaceMap).forEach((v, k) => {
            map[e.name + '<' + k] = v;
          });
          var superMap = getTypePropMap(superInterface);
          Seq(superMap).forEach((v, k) => {
            map[k] = v.k === TypeKind.Param ? interfaceMap[v.param] : v;
          });
        }
      });
    return map;
  }
docs: Get a map from super type parameter to concrete type definition. This is
  used when rendering inherited type definitions to ensure contextually
  relevant information.
  
  Example:
  
  type A<T> implements B<number, T>
  type B<K, V> implements C<K, V, V>
  type C<X, Y, Z>
  
  parse C:
  {}
  
  parse B:
  { C<X: K
  C<Y: V
  C<Z: V }
  
  parse A:
  { B<K: number
  B<V: T
  C<X: number
  C<Y: T
  C<Z: T }