Skip to content

Master ref signal ged#1922

Merged
mcm-odoo merged 1 commit into
masterfrom
master-ref-signal-ged
Jun 8, 2026
Merged

Master ref signal ged#1922
mcm-odoo merged 1 commit into
masterfrom
master-ref-signal-ged

Conversation

@ged-odoo
Copy link
Copy Markdown
Contributor

@ged-odoo ged-odoo commented Jun 5, 2026

No description provided.

Comment thread packages/owl-core/src/types.ts Outdated
Refs are typically declared as `myRef = signal(null)` and bound with
t-ref, but the signal is then inferred as Signal<null>. signal.ref()
returns a null signal properly typed as Signal<HTMLElement | null>, or
narrower when given a constructor: signal.ref(HTMLInputElement).

The type option on signals is compile-time only, so the helper is just
a null signal with better overloads (mirroring types.ref), with no
runtime DOM reference.

types.ref() called without a constructor built its validator with
instanceType(undefined), so validating any non-null value threw
"Right-hand side of 'instanceof' is not callable" instead of
reporting a validation issue.
@ged-odoo ged-odoo force-pushed the master-ref-signal-ged branch from f0a845f to 27b5b58 Compare June 8, 2026 13:20
@mcm-odoo mcm-odoo merged commit 73d95d9 into master Jun 8, 2026
2 checks passed
@mcm-odoo mcm-odoo deleted the master-ref-signal-ged branch June 8, 2026 13:49
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