3 ms·
"You’re saying that any object given this contract must be an object containing 2 properties (no more, no less)" The parenthetical 'no more, no less' should be
by dsiegel2275 9y ago
"You’re saying that any object given this contract must be an object containing 2 properties (no more, no less)"
The parenthetical 'no more, no less' should be removed here as it is misleading. TypeScript interfaces do allow the objects that 'implement' them to of course have other properties defined. See the LabelledValue example in the TypeScript docs:
https://www.typescriptlang.org/docs/handbook/interfaces.html https://www.typescriptlang.org/docs/handbook/interfaces.html
- Parsyval 9y agoThanks for this input, I'll see about that.
- ThePadawan 9y agoNote that it's only misleading due to the ambiguous grammar: The sentence can be read as "You’re saying that any object given this contract must be an object containing 2 properties (the object may contain no more, no less)" or "You’re saying that any object given this contract must be an object containing 2 properties (you are saying no more, no less)".