Effect CommunityEC
Effect Community2y ago
11 replies
steida

Troubleshooting Comment Visibility in TypeScript Schema Configuration

How to TS comment schema? Is it even possible? When Config is a plain interface, VSCode shows docs. When I rewrite it into Schema, this commenting isn't working:
export const Config = S.struct({
  /**
   * Use the `indexes` property to define SQLite indexes.
   *
   * Table and column names are not typed because Kysely doesn't support it.
   *
   * https://medium.com/@JasonWyatt/squeezing-performance-from-sqlite-indexes-indexes-c4e175f3c346
   *
   * @example
   *   const indexes = [
   *     createIndex("indexTodoCreatedAt").on("todo").column("createdAt"),
   *
   *     createIndex("indexTodoCategoryCreatedAt")
   *       .on("todoCategory")
   *       .column("createdAt"),
   *   ];
   */
  indexes: S.array(Index),
Was this page helpful?