Open typescript-bot opened 7 months ago
bitwarden/clients has this setup
// Base class
protected filterProvider(type: TwoFactorProviderType) {
  return type !== TwoFactorProviderType.OrganizationDuo;
}
// Derived class
protected filterProvider(type: TwoFactorProviderType) {
  return type === TwoFactorProviderType.OrganizationDuo;
}
So type predicate inference broke the class subtyping. They just need to add ): boolean
to the base class method. FYi @willmartian @shane-melton @mgibson1
sucrase got broken by #57847, it looks like this
state.tokens[initialTokenIndex].jsxRole = JSXRole.NoChildren;
// this initialization gets CFA'd now
let numExplicitChildren = 0;
const isSelfClosing = jsxParseOpeningElement(initialTokenIndex);
if (!isSelfClosing) {
nextJSXExprToken();
while (true) {
switch (state.type) {
case tt.jsxTagStart:
nextJSXTagToken();
if (match(tt.slash)) {
nextJSXTagToken();
jsxParseClosingElement();
// Key after prop spread takes precedence over number of children,
// since it means we switch to createElement, which doesn't care
// about number of children.
if (state.tokens[initialTokenIndex].jsxRole !== JSXRole.KeyAfterPropSpread) {
// ^^^
// apppears impossible now
Chocobozzz/Peertube has a similar thing:
for (const name of objectKeysTyped(formToBuild)) {
formErrors[name] = ''
const field = formToBuild[name]
if (this.isRecursiveField(field)) {
this.updateFormGroup(
// FIXME: typings
(form as any)[name],
formErrors[name] as FormReactiveErrors,
Though it looks like a legit error in this case unless isRecursiveField
actually has side effects (???)
framer/motion does a compound coercion which we now detect:
target[borderLabel] = Math.max(
mixNumber(
asNumber(followRadius),
asNumber(leadRadius),
progress
),
0
)
if (percent.test(leadRadius) || percent.test(followRadius)) {
target[borderLabel] += "%"
}
The following errors were reported by 5.5.0-dev.20240414, but not by 5.4.5 Pipeline that generated this bug Logs for the pipeline run File that generated the pipeline
This run considered 800 popular TS repos from GH (after skipping the top 0).
Successfully analyzed 499 of 800 visited repos
| Outcome | Count | |---------|-------| | Detected interesting changes | 26 | | Detected no interesting changes | 473 | | Git clone failed | 6 | | Package install failed | 85 | | Project-graph error in old TS | 9 | | Too many errors in old TS | 192 | | Unknown failure | 9 |Investigation Status
suppressImplicitAnyIndexErrors
removedts-expect-error
on a bug 😎any
to now be narrowed toFunction
keyofStringsOnly
removedsuppressImplicitAnyIndexErrors
removedsuppressImplicitAnyIndexErrors
removedts-expect-error
, seems goodimportsNotUsedAsValues
removedimportsNotUsedAsValues
removed