Closed PatrickLaflamme closed 1 month ago
Awesome. Same as other PR looks good to merge (just needs one pedantic linter fix). Will merge when back!
Another great PR! Have just done a few tweaks to the tests
declare let condition: boolean
to get an unknown boolean rather than a known one so that it didn't expect and merged togetherAlso changed the message to add quotations around the property key as Excess property property was was provided, but is not a property of type T
looked funny 😅
Thanks for adding this! It is cool to see my expected property feature allows this to catch issues that TypeScript doesn't catch. Also good that it is a warning as it doesn't break any code. I don't know why the TypeScript team treats it as an error?
Going to showcase this addition in an upcoming blog post. Let me know if you want to include anything in that.
Also if you have any suggestions to improve the codebase, things that are confusing or not documented well let me know as I am going to do some refactoring soon!
Will be diving into it again this weekend. Going to take a stab at the Proxy support ticket.
Hey, added some additional tests for this: https://github.com/kaleidawave/ezno/blob/main/checker/specification/specification.md#excess-property. Because of the expected type / forward inference thing this also works for returns.
(also changed the excess property lookup to use the existing property lookup, so should be a little faster).
Implements excess params checks as described in #42. Updates to the various tests are included. Two new tests are also added to
specification.md
.