displayed-types.md
displayed-types.mdBrowse 4 files
129 tokens
593 bytes
Token encoding: o200k_base
Snapshot 90695b0
← Back to SKILL.md
Displayed Types
Deliberately produce an assignment error and match a distinctive substring with
Tstyche's checked @ts-expect-error message:
it("simplifies the displayed type", () => {
const value = null as unknown as PublicType
// @ts-expect-error Type '{ readonly value: string; }'
const displayed: never = value
void displayed
})
Keep the expected substring as small as possible while distinguishing the public type from the leaked implementation type. Before accepting the test, temporarily restore the broken type and confirm the diagnostic-message match fails.