Spreadsheet-UX op een echte relationele engine

main

Deze repository wordt als momentopname gepubliceerd: een clone bevat de volledige inhoud, maar geen commitgeschiedenis.

1.1 kB Ruw bestand
import { account } from './account';
import { app } from './app';
import { auth } from './auth';
import { billing } from './billing';
import { chrome } from './chrome';
import { common } from './common';
import { dialogs } from './dialogs';
import { grid } from './grid';
import { marketing } from './marketing';

/**
 * Everything the client can say, one domain file per area of the app so the
 * grid's vocabulary never tangles with billing's. Keys carry their domain as a
 * prefix — 'grid.addRow', 'billing.trialEndsIn' — which is also what keeps
 * this spread collision-free.
 */
export const messages = {
  ...common,
  ...app,
  ...account,
  ...auth,
  ...chrome,
  ...grid,
  ...dialogs,
  ...billing,
  ...marketing,
} as const;

export type MessageKey = keyof typeof messages;

/**
 * The arguments a key takes, read off its English text. The compiler holds
 * every call site to it: `t('app.droppedThing')` without the name is an error,
 * with the name it is a string.
 */
export type MessageArgs<K extends MessageKey> = (typeof messages)[K]['en'] extends (
  ...args: infer A
) => string
  ? A
  : [];