-
Notifications
You must be signed in to change notification settings - Fork 81
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
ReadonlyArrays aren't Passable because they don't conform to CopyArrayInterface. CopyArrays are hardened, thus the mutating methods will always fail, and marking them as readonly only changes the typing to omit the mutating methods.
Steps to reproduce
- Create
repro.tswith the following contents:
import type { Passable } from '@endo/pass-style';
export default ['ibc'] as Readonly<[string]> satisfies Passable;- Load in IDE or compile with
tsc, and see error:
Type 'readonly [string]' does not satisfy the expected type 'Passable'.
Type 'readonly [string]' is not assignable to type 'CopyArrayInterface<PassableCap, Error>'.ts(1360)
Expected behavior
No error.
Platform environment
- What OS are you using? macOS
- What version of Node.js? v22.21.0
- Is there anything special/unusual about your platform? not especially
- What version of Endo are you using? @endo/import-bundle@1.5.2-303-g31f81e8ac`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working