-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ts-expect-error chipaway #1366
Comments
I've addressed the |
I reviewed my repos and ended up leaving most of my |
@jessegreenberg That's great. But looking at utterance-queue, the majority of those |
I agree! Those comments were fun at the time but not so informative. They were updated in previous commits (I should have mentioned in my comment). Feel free to pull master to verify. |
The |
There are still 10 usages of
|
In #1366 (comment), @AgustinVallejo said:
The one in CommonModel.ts (Multilink) is very avoidable. Here’s the diff: - // @ts-expect-error (multilink doesn't like non-tuple arrays for TypeScript, but works perfectly fine)
- Multilink.multilink( this.availableBodies.map( body => body.isActiveProperty ), () => {
+ Multilink.multilinkAny( this.availableBodies.map( body => body.isActiveProperty ), () => { When you have a Multilink or DerivedProperty that has an unknown number of dependencies, use |
We have started using // @ts-expect-error for testing |
How about |
That's fine too, as long the |
Perhaps one day a bad-typescript-text rule will enforce this. |
With this patch: Subject: [PATCH] NumberProperty.reset handles issues with setting range or Property first, https://github.com/phetsims/axon/issues/427
---
Index: eslint/rules/bad-typescript-text.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/eslint/rules/bad-typescript-text.js b/eslint/rules/bad-typescript-text.js
--- a/eslint/rules/bad-typescript-text.js (revision f1bf431c9398154880ddd568dfd351931bf5633d)
+++ b/eslint/rules/bad-typescript-text.js (date 1671229930872)
@@ -49,6 +49,10 @@
{
id: '@returns with type and/or without extra doc',
regex: /(@returns \{)|(@returns *$)/
+ },
+ {
+ id: '@ts-expect-error needs documentation',
+ regex: /@ts-expect-error\s*$/
}
];
We only have 88 problems: ✖ 88 problems (88 errors, 0 warnings) Results from chipAway:
|
Are there ts-expect-errors in axon that weren't discovered in the above comment? |
Probably! |
SR: I would like some help with tricky Axon ts-expect-errors Thanks JO! |
I finished the Circuit Construction Kit ones as part of phetsims/circuit-construction-kit-common#918 |
Remove unnecessary
@ts-expect-error
s, or add a comment explaining why it is necessary.Results from chipAway:
2814 errors in 11 files see 14 ts-expect-error occurrences circuit-construction-kit-common#918The text was updated successfully, but these errors were encountered: