Structured Text with Typescript

I’ve sort of kinda made it work by changing my .yml file to this:

generates:
  src/graphql/generated.ts:
    plugins:
      - typescript
      - add:
          content: "import { type Record as StructuredTextGraphQlResponseRecord, type StructuredText as StructuredTextGraphQlResponse } from 'datocms-structured-text-utils';"
      - typescript-operations
      - typed-document-node
    config:
      strictScalars: true
      scalars:
        BooleanType: boolean
        CustomData: Record<string, string>
        Date: string
        DateTime: string
        FloatType: number
        IntType: number
        ItemId: string
        JsonField: "StructuredTextGraphQlResponse<StructuredTextGraphQlResponseRecord,StructuredTextGraphQlResponseRecord>"
        MetaTagAttributes: Record<string, string>
        UploadId: string
      namingConvention:
        enumValues: "./src/lib/pascalCaseWithUnderscores.js"

and then adding the full “page.content.value” prop to the StructuredText data field.
But I imagine that would break cases where you need to use blocks or links instead of the value.