Repository navigation
fix(deps): update dependency flow-bin to ^0.343.0 - #183
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
March 3, 2023 03:16
bfbbcb0 to
761c83b
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
March 17, 2023 15:37
2eca07d to
c8302d4
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
March 30, 2023 01:05
c8302d4 to
9a72352
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
April 14, 2023 23:32
9a72352 to
f336fb4
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
April 26, 2023 22:59
cab210d to
1fd6b87
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
May 2, 2023 00:32
1fd6b87 to
59f114f
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
May 10, 2023 22:57
59f114f to
b6ed0d7
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
May 26, 2023 07:02
b6ed0d7 to
e4fe2a4
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
June 2, 2023 18:35
e4fe2a4 to
85c4b20
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
June 8, 2023 23:11
85c4b20 to
6a2e7b7
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
June 15, 2023 23:34
6a2e7b7 to
90f70b5
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
3 times, most recently
from
July 1, 2023 10:37
f8d55d0 to
18516bc
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
July 6, 2023 12:10
1449370 to
38188c1
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
August 24, 2023 00:48
0805956 to
3417dbe
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
September 4, 2023 17:37
3417dbe to
474ba95
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
September 13, 2023 12:35
092e91c to
18b08ca
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
4 times, most recently
from
September 19, 2023 17:22
60fe736 to
4094cf9
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
September 22, 2023 22:21
85fd147 to
cc7f482
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
October 4, 2023 01:15
cc7f482 to
f3f1a14
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
October 5, 2023 20:00
f3f1a14 to
799ff49
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
October 18, 2023 01:51
799ff49 to
5d59fd4
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
October 23, 2023 18:28
924f67c to
ce61055
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
October 27, 2023 15:50
ce61055 to
ebcd83d
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
2 times, most recently
from
November 14, 2023 22:10
d6781c1 to
c6372a9
Compare
renovate
Bot
force-pushed
the
renovate/flow-bin-0.x
branch
from
November 16, 2023 04:24
c6372a9 to
50a5e85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
^0.199.1→^0.343.0Release Notes
meta/flow (flow-bin)
v0.343.0Compare Source
Likely to cause new Flow errors:
voidfollows TypeScript semantics by default and is distinct fromundefined.experimental.ts_voidonly acceptstrue. Runflow codemod migrate-to-ts-voidto help migrate existing code.Valuesmembers; this can surface errors that were missed.Readonly,Partial, React configs and object rest no longer drop the members of a union or intersection that contains another one, which can surface missed errors.T | null | voidparameter is narrowed as for?T:Tno longer takes in thenullandvoidof its bound or supertype.newof a class whose TypeScript declaration declares a constructor now gives the instance instead ofanyimport("m").Xread from another file is no longeranywhenXis a type or has type arguments, and is the instance type whenXis a class, also a class merged with a namespace.undefined, likeg()forg(...args: [x: void]). Too few or too many arguments for such a rest param are reported as for params (requires another argument,extra-arg) instead ofinvalid-tuple-arity.New Features:
Notable bug fixes:
experimental.ts_void, a function that returns no value in one branch of a conditional no longer drops the annotation hint of the other branch.inandtypeof, now narrow an opaque type's upper bound and keep the opaque type, as they do for a type parameter.[libs]file over a builtin, are tried first.[libs]can override a declaration of a bundled.d.tsbuiltin, as it can for the other builtins.toSpliced<S>, after TypeScript's.nullorundefinedargument for aT | null | voidparameter givesTanemptybound, as for?T.null | voidfrom aT | null | voidvalue whoseTis not inferred yet.(renders T) | nullinfers its type arguments fromT, as for?renders Tor an optional prop.experimental.normalize_intersections, an intersection of unions withnullandvoidmembers is normalized as one of maybe types is.declare namespacecan extend another member through the namespace's name without the namespace becominganyrequireswitches between modules that a library declares.Omitand other object type utilities no longer give an interface's index signature value to props declared elsewhere on itsextendschain, e.g. an inheritedonFocuswhen the interface has a[key: `data-${string}`]signature.?for a type with many overloads of a method.Klass<T>keyofover intersection keys such asstring & {}no longer fail signature verificationkeyofand mapped types over a class declared in a.d.tsfile now include its methods and inherited members.typeof M.Xandtypeof import("m").Xread a value thatMexports withexport type, as in TypeScript.newon aClassofReadonly<I>,Partial<I>or another sliced interface with aconstructormethod no longer reports thatconstructoris missing.thisin the type parameter bound of adeclare classmethod no longer errors withillegal-this.get [Symbol.toStringTag]()react-hook-formimport type, as in TypeScriptexport default <name>inside a librarydeclare module, as written in TypeScript.d.tsfiles, now declares the module's default export.keyof Tcan index an object keyed bykeyof T, such asRecord<keyof T, V>, whenThas no object boundtypeofand keys in types read the value of an export that is both a type and a value throughimport type, as in TypeScriptIterable<unknown> & ReadonlyArray<unknown>, no longer errorsuseState(() => f()), gives a type parameter that nothing reaches its default or bound, as in TypeScript.Misc:
IDE:
M.Xwithimport * as MorReact.Node, goes to the member's declaration instead of staying on the reference or going to a global with the same namedeclare namespaceunder its qualified name, likeReact.MixedElementorIntl.NumberFormatOptionsLibrary Definitions:
Iterator,IterableandIterableIteratornow defaultTReturnandTNexttoany, as in TypeScript.IteratorObjectnow defaultsTReturnandTNexttounknown, as in TypeScript.members()) returnundefinedwhen done, as in TypeScript withstrict.react/jsx-runtimeandreact/jsx-dev-runtimemodules and React'sFunctionComponentElementandDetailedReactHTMLElementtypes from@types/reactv0.342.0Compare Source
Likely to cause new Flow errors:
any-typed valuesuntyped-type-importerrors are now always on (the lint was on by default already). Delete references to the lint in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.internal-typeerrors are now always on (the lint was on by default already). Delete references to the lint in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.invalid-this-argerrors are now always on (the lint was on by default already). Delete references to the lint in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.libdef-overrideerrors are now always on (the lint was on by default already). Delete references to the lint in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.nested-componenterrors are now always on (the lint was on by default already, butall=warn,all=offor an explicit setting could weaken it). Delete references to the lint in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.nested-hookerrors are now always on (the lint was on by default already, butall=warn,all=offor an explicit setting could weaken it). Delete references to the lint in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.unsafe-object-assignerrors are now always on (the lint was on by default already, butall=warn,all=offor an explicit setting could weaken it). Delete references to the lint in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.react-intrinsic-overlaperrors are now always on and can no longer be turned off with lint settings. Suppress them with$FlowFixMe[react-intrinsic-overlap]. Delete references to the lint in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.T[K]of an optional property now includesvoid; some errors involving optional properties are reported at different locations or with different codes.New Features:
undefinedis always accepted as a type annotation.experimental.undefined_typeonly acceptstrue.Notable bug fixes:
declare namespaceblock now resolve classes, enums and values declared in the namespace's other blocks, as they already did when the declaration was importedvoidfrom members of a union hint that do not take the parameter.yield,yield*andreturnin annotated generators are now checked with the annotation as a hint, as in TypeScript, andAsyncGeneratoris covariant in its yield and return types likeGenerator.nullorundefinedno longer drops members whose property isnullorvoid. Underexperimental.ts_void, testing a property againstundefinedor a literal narrows away members whose property isvoid.experimental.ts_void, fixed a spuriousmissing-local-annoton a callback whose call has another callback that returns no value.newof a value with a construct signature are reported at thenewexpression instead of the signature's declaration.Promise.resolve()returnsPromise<void>, and a return hint no longer makes an overloaded call fail when an overload accepts its arguments.Misc:
flow-upgradepackage on flow.org.v0.341.0Compare Source
Likely to cause new Flow errors:
keyofof a union now evaluates to the keys that every member has, matching TypeScriptimport typebinds every meaning of the export, as in TypeScript:typeofanddeclare classheritage can read the imported value, and importing a value that is not a type is no longer an error (using it as a type is){| |}are always errors.flow-upgradepackage provides codemod to migrate the codebase.?.can skip no longer count as definitely run after the chain.Object.definePropertycalls with a string-literal key are checked against the library signature, as in TypeScript: the descriptor must be aPropertyDescriptor, a type argument is the type of the object, and the object no longer has to declare the propertyObject.definePropertiescalls with an object literal are checked against the library signature, as in TypeScript: the descriptors must be aPropertyDescriptorMap, and the object no longer has to declare the propertiesNotable bug fixes:
keyofof an intersection now includes the keys of every member that is an objectkeyofof an interface declared in a.d.tsfile now includes its methods.emptyfrom four members or five operands on.OmitofOmit.T extends U ? X : Y,Tis known to satisfyUkeyof Tis a subtype ofkeyof Tfor a type parameterTwithout a bounddeclare namespaceblock that merges into a declared function or class now resolve to the exports of the earlier blocks instead ofany.Exclude<keyof T, K>, acceptskeyof Tof a type parameterTthat has no object boundNonNullableand optional indexed access now see through an opaque type's upper bound and keep the opaque type, as they do for a type parameter.matchbindings now keep a type parameter or opaque type, with its bound narrowed by earlier patterns, instead of the members of its bound.node_modules, as pnpm does for workspace packages.Misc:
no_implicit_override, template literal types, constructor types, unique symbols, mapped key remapping and signed modifiers,satisfiesexpressions, and inline import type annotations.Parser:
IDE:
typeoftype (e.g.foointypeof obj.foo) now jumps to the property's definitionLibrary Definitions:
React.ReactElement,React.ElementRef,React.PropsWithoutRef,React.ReactManagedAttributesandDistributiveOmitnow declare the bounds of their type parametersgetandsetmembers ofPropertyDescriptorare declared as optional methods, as in TypeScriptObject.getOwnPropertyDescriptorsreturns a descriptor typed per property, as in TypeScriptObject.create(proto, properties)returnsany, as in TypeScriptv0.340.0Compare Source
Likely to cause new Flow errors:
React.ReactManagedAttributeskeyofover an object with an indexer are now reported at the use of the key instead of at the indexerObjectstatic method calls that Flow doesn't type specially now get contextual types from the method's signature, like other method calls.use()calls in functions that Flow can't place in a component or hook now get thereact-rule-hook-conditionalerror code instead ofreact-rule-hook.React.JSX.IntrinsicElementsinstead of$JSXIntrinsics, which Flow no longer reads.experimental.jsx_intrinsic_elementsonly acceptstrue.React.ReactManagedAttributes.experimental.react_managed_attributesonly acceptstrue.New Features:
Notable bug fixes:
!= nulland truthiness refinements removenullandundefinedfrom unions with optional or nested maybe members also when the union is optimizedNumber.isFiniteandDate.parse, can be read without their receiver, like class statics.prototypefrom a function or a callable object that doesn't declare it givesany, as declared by the builtinFunction, instead of aprop-missingerrorflow-nodeno longer drops script arguments that equal a Node option passed before the script path.flow-upgradeadds thenameFunctionTypeParamsandnameIndexerKeyscodemods, andremoveExplicitlyExactObjectTypeSyntaxalso removesambiguous-object-typelint comments.Parser:
value!: T, and variables,let x!: TPropertyDescriptorandPropertyDescriptorMapare now interfaces, as in TypeScriptObjectis now declared asinterface Object+interface ObjectConstructor, as in TypeScriptFunctionis now declared asinterface Function+interface FunctionConstructor, withCallableFunctionandNewableFunction, as in TypeScriptv0.339.0Compare Source
Breaking Changes:
typeParameterstotypeArgumentson ESTreeGenericTypeAnnotation,InterfaceExtends, andClassImplements, including WASMflow-parseroutput. Declaration parameters and Babel output retain their existing names.PropertyDescriptorandObject.getOwnPropertyDescriptorare no longer generic. Remove type arguments fromPropertyDescriptor<T>annotations andObject.getOwnPropertyDescriptor<T>(...)calls.Likely to cause new Flow errors:
react-rule-hook-class, and calls in deeper nested anonymous callbacks inside components or hooks usereact-rule-hook-conditional, instead ofreact-rule-hook. Update suppressions to the new codes. Hook calls directly in class property initializers are also rejected when the enclosing function would otherwise permit them.undefined.o.x++,o.x--,++o.x, and--o.x) now invalidate narrowings of the property through aliases, as assignments already do.break,continue,return, andthrowpaths throughfinallyare no longer dropped. Flow now reports variables left unassigned and narrowings that do not hold on these paths.x?: T, withexperimental.tslib_syntax) now have typeT | void. Reads may returnundefined, and assigningundefinedis allowed.in outin TypeScript files are now invariant rather than covariant.use*declared in TypeScript files are now treated as hooks. This fixes calls from Flow hook syntax, but calls outside a component or hook can now report Rules of Hooks errors.parseInt,parseFloat, andevalnow require astring;isNaNandisFiniterequire anumber; and builtin Error constructors require astringmessage, matching TypeScript.Object.getOwnPropertyDescriptor,Object.defineProperty,Object.prototype.hasOwnProperty, andObject.prototype.propertyIsEnumerablenow requirePropertyKey(string | number | symbol) keys.PropertyDescriptorMapis also keyed byPropertyKey.DataView.byteLengthandbyteOffset, numeric typed arraybyteLength,byteOffset, andlength, andRegExp.source,global,ignoreCase, andmultilineare now read-only.RegExp.prototype.compilenow requires a pattern.Array.prototype.spliceuses separate removal and insertion overloads, so inserting items requires adeleteCount.ArrayandReadonlyArrayreduceandreduceRightnow have an overload whose initial value and accumulator use the element type. Calls intending a different accumulator type may need an explicit type argument, e.g.reduce<number>(...).Promise.prototype.thenandcatchnow use TypeScript-style signatures.thenhas separate fulfillment and rejection type parameters; calls whose inferred result is unsuitable may need explicit type arguments.RegExpMatchArray.indexandinputare now optional, and its first element is declared as0: string. Check optional fields onmatchresults, and useRegExpExecArrayforexecandmatchAllresults.Error.stackis now optional, matching TypeScript.subarraymethods, includingUint8Array.prototype.subarray, return their corresponding typed array rather thanthis. Subclasses that return their own type should declare their own override.New Features:
translateFlowTypeToTSTypetoflow-api-translatorfor type-node translation.voidis expected, matching TypeScript. Flow-declared function types retain their existing return checks.Notable bug fixes:
flow checkhanging when their output is piped or captured, even after the command exits (#9519).experimental.tslib_syntax.empty, as they already do for string, number, and boolean literals.declare const x = -1.infer, conditional types nested inside distributive conditional types, and type applications that expand to types mentioning the inferred parameters..//fooand..//fooresolve like./fooand../foo.matchin unreachable code.thisparameter in a class expression or a class declared in a callback.f();.enums=true.constructor, including TypeScript's['constructor']fields, now typesx.constructorwithout shadowing the constructor used bynewandsuper().module.exportshas multiple call signatures or is an overloaded function merged with a namespace.flow-upgradetransformations preserve type arguments with both legacy and current parser AST fields.Misc:
flow-parserand Prettier's built-in Flow parser without an external parser plugin.Parser:
Programsource locations and ranges span the entire input, including whitespace and comments.flow-parserpreserves optionality on constructor parameter properties.flow-estreetypes for unannotated object type properties, readonly type operators, combinedin outvariance, optionalProgram.tokens, sparse-array elements, and JSX namespaced attributes. Sparse-array parent repair and traversal preserve holes.typeoftype arguments from ESTree output, including WASM-decoded nodes and detached builders.export default.flow-parsertype stripping preserves function parameter defaults and side-effect imports.flow-transformpreserves leading#!lines.flow-eslintscope analysis handles TypeScript parameter properties, class member decorators, anddeclare global.IDE:
const, properties, or parameters, and on construction of polymorphic classes shows the instantiated type arguments.dump-types, and error messages printanywithout its kind, e.g.anyinstead ofany (explicit).Library Definitions:
encodeURIComponentalso accepts numbers and booleans.Symbol.prototype.valueOfreturnssymbolinstead of?symbol.arguments.calleeandFunction.prototype.callerare typed asFunction, and functionprototypeproperties are typed asany.TemplateStringsArrayis an interface extendingReadonlyArray<string>.ImportCallOptions,ImportAssertions, andImportAttributesinterfaces.Date.prototype.toStringdeclares aDatereceiver rather than inheriting anObjectreceiver.String,Number, andDateuse overloads andIntloption types.EvalError,RangeError,ReferenceError,SyntaxError,TypeError, orURIErrorreturns its own type rather thanError.JSON.parsereviver andJSON.stringifyreplacer callbacks accept anythisand receive astringkey.JSON.stringifyreturnsstring; its replacer is a function or a read-only array of strings and numbers.RegExpstatics such asRegExp.$1andRegExp.lastMatch.ArrayBuffer.isViewis a type guard that refines its argument toArrayBufferView.ArrayBufferViewis a structural interface rather than a union of typed arrays andDataView. Libraries can extendArrayBufferTypesto add buffer types toArrayBufferLike.PromiseConstructorLikeandConcatArray.ThisType<T>marker interface. Flow does not give it TypeScript's contextualthisbehavior.thisArg?: any, and their staticfrommethods accept mapping functions from any element type.ReactDOM$UserVisibleStringto change the type accepted by user-visible React DOM string attributes such asaria-label,title,alt, andplaceholder.Boolean()accepts no argument.Object.definePropertyandObject.definePropertiesreturn their first argument's type.Object.getPrototypeOf,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getOwnPropertySymbols,Object.isSealed,Object.isFrozen, andObject.isExtensibleaccept any argument.Object.prototype.valueOfreturnsObjectinstead ofunknown.String.prototype.matchAllyieldsRegExpExecArrayfor string patterns as well as regular expressions.v0.338.0Compare Source
Breaking Changes:
experimental.assertion_functionsis removed. Assertion functions have been on by default and the option only acceptedtruesince 0.337.experimental.disable_invariant_special_casingis removed. It has been on by default and only acceptedtruesince 0.337.experimental.function_and_object_type_is_no_longer_anyis removed. It has been on by default and only acceptedtruefor a while.experimental.builtin_ts_libdef_dynamic_discoveryis removed. It has been on by default and only acceptedtrue.experimental.declare_global_supportis removed. It has been on by default and only acceptedtrue.Likely to cause new Flow errors:
Readonly,Partial,Required,$Exact,Omitand mapped types over an interface now include its methods and the members it inherits.Array<any>,{data: any},Map<string, any>and similar types to the guarded type, e.g.Array<string>, which can surface errors in code that relied onany.keyofof an object with a template literal indexer no longer widens the indexer key tostringin conditional types likeExclude.New Features:
readonlyandwriteonlymodifiers.if (result.done)now refine unions of classes and interfaces by fields with literal types, as===checks already did.isString?.(x). When the callee or receiver is nullable, only the true branch narrows.ExactObjectType, the supertype of every exact object type and a subtype of{...}.Notable bug fixes:
Uint8Array<ArrayBuffer>.E & E) to the enum's representation type no longer errors.new Array<T>(...).declare globalsupport with regular Flow..d.ts) object type, matching TypeScript.underconstrained-implicit-instantiationerrors for generic calls passed as arguments to other generic calls.ain[readonly a: unknown, ...T]stays read-only.Firstin[infer First, ...infer Rest]is now inferred instead ofunknown.string | numberrefines to"" | 0.x: A | Brefined byx is Ais nowArather thanA | (A & B).x: T | numberrefined by!isT(x)withisT: (x: unknown) => x is Tis nownumber.anynow staysanyinstead of becomingempty, andbooleanis refined to the literal the guard does not cover.flow check-contentsandflow autocomplete.React.MouseEvent<T>, now compare type parameters without a variance annotation covariantly, as type applications already did.x instanceof Cno longer refines a value of an intersection type toempty.Misc:
Parser:
flow-parsertaking minutes to parse JS files over ~1 MB."in out"for the ESTree variance kind ofin outtype parameters.NonNullExpressionnodes..mjs/.mtsfiles in flow-parser.constkeyword in const enum declaration locations.IDE:
?() => voidinstead of?(() => void).Library Definitions:
Symbol.toStringTag,Symbol.match,Symbol.toPrimitive, ...) with TypeScript.MapandWeakMapset, andSetandWeakSetadd, now returnthis.RegExpflags/sticky/unicodeandNumber.EPSILON/MAX_SAFE_INTEGER/MIN_SAFE_INTEGERare now read-only;String.prototype.normalizeaccepts the normalization form literals and the legacy HTML methods (bold,link, ...) are declared.Array.prototype.copyWithinreturnsthis, so subclasses ofArraykeep their type.Array.prototype.sortreturnsthis, so subclasses ofArraykeep their type.Mathconstants (Math.PI,Math.E, ...) are read-only.Number.MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITYandPOSITIVE_INFINITYare read-only.String#splitrequires a separator,String#replacehas separate overloads for a string and a function replacement, andString#lengthis read-only, as in TypeScript.flatMapunion order and inference.includesdefinitions while keeping Flow's element refinement.Generator.prototype.returnnow requires a value of the generator's return type.React.CSSProperties, typed bycsstype.Set.prototype.union.Map,Set,WeakMapandWeakSetdefinitions.sizeis now read-only.doneis now optional in the non-final branch ofIteratorResult, as in TypeScript.ArrayIterator,MapIterator,SetIteratorandStringIteratorare now interfaces, andStringIteratortakes a type argument.@types/react, such asReact.MouseEvent,React.HTMLAttributesandReact.JSX.IntrinsicElements.React.ComponentPropsof a string that is not a JSX intrinsic isemptyin roots that define their own$JSXIntrinsics.reducewithout an initial value now requires the reducer to return the iterator's element type.Array,ReadonlyArrayand typed arraytoLocaleStringnow accept locales and formatting options.v0.337.0Compare Source
Likely to cause new Flow errors:
Function.prototype.bindis now typed with TypeScript'sCallableFunction.bindoverloads, so errors in bound arguments are reported atbind, and a bound function's remaining parameters are a tuple type.FunctionandObjectno longer meananyand no longer triggerunclear-typeerrors. They are now interpreted as the prototypes of functions and objects. Code that assumed they meantanymay get new errors.Function$Prototype$Bindis removed.bindnow uses the declaredFunction.prototype.bindoverloads. Bound methods may now report tuple arity errors when used as callbacks that ignore extra arguments or omit nullable parameters, because their inferred parameters are represented as tuple rest parameters.New Features:
invariant, give it anassertssignature.flow-node.thisandsuper, including receiver assertions.Readonlynow supportsArrayandReadonlyArraytypes.Notable bug fixes:
Recursion limit exceedederrors when checking conditions,matchand other expressions whose type is a trivially recursive generic type alias.(cond ? A : B).Tvia a local) now look up the type in each namespace instead of reporting it as missing.Misc:
Parser:
implicitDeclareis now omitted unlesstrue.TypeParameter.boundas a bare type node ornullin ESTree output. Babel output retains theTypeAnnotationwrapper, and the TypeScript-to-Flow API translator generatesextendsbounds.EnumBodynode with string-or-nullexplicitType. Babel output retains its existing enum body types.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.