Skip to content

fix(types): mark monitor.currentStatus nullable + clarify post-create timing#16

Merged
caballeto merged 1 commit into
mainfrom
fix/current-status-nullable-doc
May 5, 2026
Merged

fix(types): mark monitor.currentStatus nullable + clarify post-create timing#16
caballeto merged 1 commit into
mainfrom
fix/current-status-nullable-doc

Conversation

@caballeto
Copy link
Copy Markdown
Member

Summary

  • Mark Monitor.currentStatus as nullable so TS users see the post-create timing in their type system.
  • Update README quickstart so a fresh user doesn't see undefined printed for a brand-new monitor.

Round-2 DevEx friction P2 #14.

Test plan

  • npm run lint && npm run typecheck && npm test && npm run build green
  • README example reads cleanly without undefined in the printed output

Made with Cursor

`Monitor.currentStatus` is computed by the probe pipeline and isn't
populated on a freshly-created monitor, so a fresh dev who logs it
straight after `client.monitors.create()` sees `undefined`. Wrap the
generated `MonitorDto` so the field is surfaced as `string | null` with
a doc comment that explains the timing, and update the README quickstart
with a one-line note + `?? 'PENDING'` display pattern so the example
doesn't read as broken.

Round-2 DevEx friction P2 #14.

Co-authored-by: Cursor <cursoragent@cursor.com>
@caballeto caballeto merged commit 25f3a16 into main May 5, 2026
3 checks passed
@caballeto caballeto deleted the fix/current-status-nullable-doc branch May 5, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant