Skip to content

Commit

Permalink
Fix Flow types for class static blocks
Browse files Browse the repository at this point in the history
Summary:
A type needed to be updated in `ClassStaticBlockScope`.

Also ordered the types in `type Statement` alphabetically since the rest are.

Reviewed By: avp

Differential Revision: D66737666

fbshipit-source-id: e254bc38aee360d827e84d6a6ce77c2bd7bf80fa
  • Loading branch information
gkz authored and facebook-github-bot committed Dec 5, 2024
1 parent 2ff3274 commit ce1c4dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

'use strict';

import type {Expression} from 'hermes-estree';
import type {StaticBlock} from 'hermes-estree';
import type {ClassScope} from './ClassScope';
import type {ScopeManager} from '../ScopeManager';

Expand All @@ -19,7 +19,7 @@ import {ScopeType} from './ScopeType';

class ClassStaticBlockScope extends ScopeBase<
typeof ScopeType.ClassStaticBlock,
Expression,
StaticBlock,
ClassScope,
> {
declare +type: typeof ScopeType.ClassStaticBlock;
Expand Down
2 changes: 1 addition & 1 deletion tools/hermes-parser/js/hermes-estree/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ export type AFunction =

export type Statement =
| BlockStatement
| StaticBlock
| BreakStatement
| ClassDeclaration
| ComponentDeclaration
Expand Down Expand Up @@ -263,6 +262,7 @@ export type Statement =
| LabeledStatement
| OpaqueType
| ReturnStatement
| StaticBlock
| SwitchStatement
| ThrowStatement
| TryStatement
Expand Down

0 comments on commit ce1c4dd

Please sign in to comment.