Closed brettz9 closed 1 year ago
I would expect the "only permits reading" error to be caught by the test framework and not reported when running tsd, but instead I get notified that no error was found and that I was assigning to an index signature only permitting reading:
tsd
export type KeysStrictReadonly = { readonly [type: string]: readonly string[]; };
import { expectError } from 'tsd'; import { KeysStrictReadonly } from "../lib/index.js"; expectError(() => { const erring: KeysStrictReadonly = { TestInterface1: ["left", "right"] }; erring.TestInterface1 = ["badAttemptOverwrite"]; });
I would expect the "only permits reading" error to be caught by the test framework and not reported when running
tsd
, but instead I get notified that no error was found and that I was assigning to an index signature only permitting reading: