MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / triggerWords

Function triggerWords

ui/src/lib/steps-model.ts:230–246  ·  view source on GitHub ↗
(t: WireStepTrigger)

Source from the content-addressed store, hash-verified

228 * `@Process('email')`, `page load · /blog/[slug]`.
229 */
230export function triggerWords(t: WireStepTrigger): string {
231 const after = t.after && t.after.length > 0 ? ` · after ${t.after.join(', ')}` : '';
232 switch (t.kind) {
233 case 'prop':
234 return t.of ? `${t.name} · <${t.of}>` : t.name;
235 case 'option':
236 return t.of ? `${t.name} · ${t.of}(…)` : t.name;
237 case 'request':
238 return `${t.name} ${t.of ?? ''}`.trim() + after;
239 case 'decorator':
240 return `@${t.name}(${t.of ?? ''})` + after;
241 case 'load':
242 return `page load · ${t.of ?? t.name}` + after;
243 default:
244 return t.of ? `${t.name}(${t.of})` : t.name;
245 }
246}
247
248/** The first line of a step's box. Boundary crossings carry an arrow for which way the code goes. */
249export function stepLabel(step: WireStep): string {

Callers 3

stepSubFunction · 0.85
buildStepsModelFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected