Skip to content

Commit f6d21ed

Browse files
SamChou19815meta-codesync[bot]
authored andcommitted
Eliminate legacy syntax in libdef files (#58937)
Summary: Pull Request resolved: #58937 X-link: react/metro#2039 Fix them ahead of banning them in libdef files as well. Changelog: [Internal] Reviewed By: gkz Differential Revision: D123955543 fbshipit-source-id: cefe9a006464b50c94f5247dcd5907f96ebdeb04
1 parent 7bee8ab commit f6d21ed

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎flow-typed/npm/babel-traverse_v7.x.x.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,8 +2186,8 @@ declare module '@babel/traverse' {
21862186
declare export var visitors: Visitors;
21872187

21882188
declare export type Cache = {
2189-
path: $ReadOnlyWeakMap<BabelNode, unknown>,
2190-
scope: $ReadOnlyWeakMap<BabelNode, unknown>,
2189+
path: ReadonlyWeakMap<BabelNode, unknown>,
2190+
scope: ReadonlyWeakMap<BabelNode, unknown>,
21912191
clear(): void,
21922192
clearPath(): void,
21932193
clearScope(): void,

‎flow-typed/npm/babel-types_v7.x.x.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3825,13 +3825,13 @@ declare module "@babel/types" {
38253825
declare export function cloneNode<T>(n: T, deep?: boolean, withoutLoc?: boolean): T;
38263826
declare export function cloneWithoutLoc<T>(n: T): T;
38273827
declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'
3828-
declare export function addComment<T: Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T
3829-
declare export function addComments<T: Node>(node: T, type: CommentTypeShorthand, comments: Array<Comment>): T
3828+
declare export function addComment<T extends Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T
3829+
declare export function addComments<T extends Node>(node: T, type: CommentTypeShorthand, comments: Array<Comment>): T
38303830
declare export function inheritInnerComments(node: Node, parent: Node): void
38313831
declare export function inheritLeadingComments(node: Node, parent: Node): void
3832-
declare export function inheritsComments<T: Node>(node: T, parent: Node): void
3832+
declare export function inheritsComments<T extends Node>(node: T, parent: Node): void
38333833
declare export function inheritTrailingComments(node: Node, parent: Node): void
3834-
declare export function removeComments<T: Node>(node: T): T
3834+
declare export function removeComments<T extends Node>(node: T): T
38353835
declare export function ensureBlock(node: BabelNode, key: string): BabelNodeBlockStatement
38363836
declare export function toBindingIdentifierName(name?: ?string): string
38373837
declare export function toBlock(node: BabelNodeStatement | BabelNodeExpression, parent?: BabelNodeFunction | null): BabelNodeBlockStatement
@@ -3843,7 +3843,7 @@ declare module "@babel/types" {
38433843
declare export function valueToNode(value: any): BabelNodeExpression
38443844
declare export function removeTypeDuplicates(types: Array<BabelNodeFlowType>): Array<BabelNodeFlowType>
38453845
declare export function appendToMemberExpression(member: BabelNodeMemberExpression, append: BabelNode, computed?: boolean): BabelNodeMemberExpression
3846-
declare export function inherits<T: Node>(child: T, parent: BabelNode | null | void): T
3846+
declare export function inherits<T extends Node>(child: T, parent: BabelNode | null | void): T
38473847
declare export function prependToMemberExpression(member: BabelNodeMemberExpression, prepend: BabelNodeExpression): BabelNodeMemberExpression
38483848
declare export function removeProperties<T>(n: T, opts: ?{}): void;
38493849
declare export function removePropertiesDeep<T>(n: T, opts: ?{}): T;
@@ -3879,7 +3879,7 @@ declare module "@babel/types" {
38793879
declare export function isValidIdentifier(name: string): boolean
38803880
declare export function isVar(node: BabelNode): node is VariableDeclaration
38813881
declare export function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean
3882-
declare export function validate(n: BabelNode, key: string, value: mixed): void;
3882+
declare export function validate(n: BabelNode, key: string, value: unknown): void;
38833883
declare export type Node = BabelNode;
38843884
declare export type CommentBlock = BabelNodeCommentBlock;
38853885
declare export type CommentLine = BabelNodeCommentLine;

0 commit comments

Comments
 (0)