Skip to content

TS strict (2/4): strictNullChecks null-safety guards#3687

Merged
tegan-temporal merged 1 commit into
mainfrom
strict/2-mechanical
Jul 17, 2026
Merged

TS strict (2/4): strictNullChecks null-safety guards#3687
tegan-temporal merged 1 commit into
mainfrom
strict/2-mechanical

Conversation

@tegan-temporal

Copy link
Copy Markdown
Contributor

Second of a 4-PR split of #3640. Stacked on strict/1-base.

Mechanical null-safety introduced by strictNullChecks: nullish-coalescing defaults (?? '', ?? 0, ?? []), optional chaining, {#if} render guards, and a few generics-driven refactors. Intended to be behavior-preserving — no server-request or form-default semantics change (those are in 3/4). 189 files, verified strict-clean against the base PR.


Stack (merge bottom-up):

  1. strict/1-base — type annotations + CI infra (zero runtime)
  2. strict/2-mechanical — strictNullChecks null-safety guards
  3. strict/3-behavior — runtime-affecting model/form/service changes
  4. ts-strict-mode (TS strict (4/4): enable strict mode in base tsconfig #3640) — flip strict: true

Original combined branch preserved in #3640, now reduced to the final flag flip. Split verified: stacking all four reproduces the original tree byte-for-byte.

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jul 17, 2026 5:37pm

Request Review

@andrewzamojc

andrewzamojc commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Because this PR doesn't target main, I don't think TS and such ran. How about merging the base (1/4) to main since it's safe and ready, then this one could target main and the TS checks will run again.

@temporal-cicd

temporal-cicd Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

📊 Strict Mode: 2 errors in 1 file (1.2% of 167 total)

src/lib/components/schedule/utilities/get-request-body.ts (2)
  • L132:6: Type '{ indexedFields: { indexedFields?: { [k: string]: IPayload; } | null | undefined; }; } | null' is not assignable to type 'ISearchAttributes | null | undefined'.
  • L310:4: Type '{ indexedFields: { indexedFields?: { [k: string]: IPayload; } | null | undefined; }; } | null' is not assignable to type 'ISearchAttributes | null | undefined'.

Generated by 🚫 dangerJS against 8e9e26e

}

$form.specs = [...$form.specs, { kind: 'cron', cronString: '' }];
$form.specs = [...$form.specs, getFormSpecInitialData('cron')];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change was necessary because { kind: 'cron', cronString: '' } is incomplete, getFormSpecInitialData gives us the full shape.

Mechanical null-safety: nullish-coalescing defaults, optional chaining,
{#if} render guards, and generics-driven refactors. Behavior-preserving.
Rebased onto main after the base PR (#3686) merged.

@andrewzamojc andrewzamojc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tegan-temporal
tegan-temporal merged commit 51f04f8 into main Jul 17, 2026
18 checks passed
@tegan-temporal
tegan-temporal deleted the strict/2-mechanical branch July 17, 2026 20:25
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.

2 participants