message: Support index signatures
diff: @@ -9,6 +9,7 @@ import type {
  Type,
  Documentation,
  PropertySignature,
  + IndexSignature,
  Tag,
  } from '@shopify/docs-tools/build/ts/src/types';
  @@ -90,7 +91,7 @@ export function dedupe<T>(array: T[]) {
  export function propsTable(
  name: string,
  docs: Documentation | undefined,
  - properties: PropertySignature[],
  + properties: (PropertySignature | IndexSignature)[],
  exports: Node[],
  dir: string,
  additionalPropsTables: string[],
  @@ -110,18 +111,42 @@ export function propsTable(
  markdown += '\n';
  }
  + const indexSignatures: IndexSignature[] = properties.filter(
  + (property): property is IndexSignature =>
  + property.kind === 'IndexSignature',
  + );
  + const propertySignatures: PropertySignature[] = properties.filter(
  + (property): property is PropertySignature =>
  + property.kind === 'PropertySignature',
  + );
  +
  + if (indexSignatures?.length) {
  + const property = indexSignatures[0];
  +
  + markdown += `<code>[${property.index.key}: ${propType(
  + property.index.type,
  + exports,
  + dir,
  + additionalPropsTables,
  + )}]: ${propType(
  + property.value,
  + exports,
  + dir,
  + additionalPropsTables,
  + )}</code>`;
  + } else if (propertySignatures?.length) {
  const table = [];
  // table header row
  const propertiesHaveParameters =
  - properties.filter(({parameters}) => parameters).length > 0;
  + propertySignatures.filter(({parameters}) => parameters).length > 0;
  if (propertiesHaveParameters) {
  table.push(['Type', 'Description']);
  - } else if (properties.length > 0) {
  + } else if (propertySignatures.length > 0) {
  table.push(['Name', 'Type', 'Description']);
  }
  - properties.forEach(
  + propertySignatures.forEach(
  ({name: propName, optional, value, docs: propDocs, parameters}) => {
  if (propName === 'Checkout::KitchenSink') return;
  @@ -203,6 +228,7 @@ export function propsTable(
  markdown += markdownTable(table, {
  stringLength: () => 3,
  });
  + }
  return markdown;
  }
  