Fix declarations for prototypeAttrs.

Review Request #14690 — Created Nov. 14, 2025 and updated

Information

Ink
master

Reviewers

The new JS build for Ink uses the allowDeclareFields option for
@babel/preset-typescript, which will preserve any fields which are not
marked with declare (initializing to undefined). This caused our
type definitions to shadow the prototypeAttrs copied over by spina.

allowDeclareFields is the correct forward-looking thing to use, and
will be the default in Babel 8. This change fixes the resulting issue by
changing our type-only definitions to properly use declare.

  • Ran unit tests.
  • Verified that things like the dialog title worked again.
Summary ID
Fix declarations for prototypeAttrs.
The new JS build for Ink uses the `allowDeclareFields` option for `@babel/preset-typescript`, which will preserve any fields which are not marked with `declare` (initializing to `undefined`). This caused our type definitions to shadow the `prototypeAttr`s copied over by spina. `allowDeclareFields` is the correct forward-looking thing to use, and will be the default in Babel 8. This change fixes the resulting issue by changing our type-only definitions to properly use `declare`. Testing Done: - Ran unit tests. - Verified that things like the dialog title worked again.
rlvppkqmszynookryplxntyuzrunkqpo
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
chipx86
  1. Ship It!
  2.