The annotation checks your object,
then forgets it.
const palette = { ink: '#e2e8f0', accent: [56, 189, 248] }
…: Palette
what tsc emits
declare const annotated: Palette;
✕ ink.toUpperCase() — TS2339
✕ accent no longer a 3-number tuple
✕ annotated.inkk — compiles fine
… satisfies Palette
what tsc emits
declare const satisfied: {
ink: string;
accent: [number, number, number];
};
✓ every one of the three
the check is identical
put a number where a Colour belongs and both forms report TS2322 — satisfies is not the lenient option, it is the one that does not throw away your work