@@ -1593,7 +1593,7 @@ export function buildFieldsInitNodes(
15931593 // this maybe a bug for ts
15941594 switch ( true ) {
15951595 case isStaticBlock : {
1596- const blockBody = ( prop . node as t . StaticBlock ) . body ;
1596+ const blockBody = prop . node . body ;
15971597 // We special-case the single expression case to avoid the iife, since
15981598 // it's common.
15991599 if ( blockBody . length === 1 && t . isExpressionStatement ( blockBody [ 0 ] ) ) {
@@ -1640,16 +1640,13 @@ export function buildFieldsInitNodes(
16401640 // It might still be possible to a computed static fields whose resulting
16411641 // key is "name" or "length", but the assumption is telling us that it's
16421642 // not going to happen.
1643- // @ts -expect-error checked in switch
16441643 if ( ! isNameOrLength ( prop . node ) ) {
1645- // @ts -expect-error checked in switch
16461644 staticNodes . push ( buildPublicFieldInitLoose ( t . cloneNode ( ref ) , prop ) ) ;
16471645 break ;
16481646 }
16491647 // falls through
16501648 case isStatic && isPublic && isField && ! setPublicClassFields :
16511649 staticNodes . push (
1652- // @ts -expect-error checked in switch
16531650 buildPublicFieldInitSpec ( t . cloneNode ( ref ) , prop , file ) ,
16541651 ) ;
16551652 break ;
@@ -1681,15 +1678,13 @@ export function buildFieldsInitNodes(
16811678 instanceNodes . unshift (
16821679 buildPrivateMethodInitLoose (
16831680 t . thisExpression ( ) ,
1684- // @ts -expect-error checked in switch
16851681 prop ,
16861682 privateNamesMap ,
16871683 ) ,
16881684 ) ;
16891685 pureStaticNodes . push (
16901686 buildPrivateMethodDeclaration (
16911687 file ,
1692- // @ts -expect-error checked in switch
16931688 prop ,
16941689 privateNamesMap ,
16951690 privateFieldsAsSymbolsOrProperties ,
@@ -1703,7 +1698,6 @@ export function buildFieldsInitNodes(
17031698 instanceNodes . unshift (
17041699 buildPrivateInstanceMethodInitSpec (
17051700 t . thisExpression ( ) ,
1706- // @ts -expect-error checked in switch
17071701 prop ,
17081702 privateNamesMap ,
17091703 file ,
@@ -1712,7 +1706,6 @@ export function buildFieldsInitNodes(
17121706 pureStaticNodes . push (
17131707 buildPrivateMethodDeclaration (
17141708 file ,
1715- // @ts -expect-error checked in switch
17161709 prop ,
17171710 privateNamesMap ,
17181711 privateFieldsAsSymbolsOrProperties ,
@@ -1732,7 +1725,6 @@ export function buildFieldsInitNodes(
17321725 pureStaticNodes . push (
17331726 buildPrivateMethodDeclaration (
17341727 file ,
1735- // @ts -expect-error checked in switch
17361728 prop ,
17371729 privateNamesMap ,
17381730 privateFieldsAsSymbolsOrProperties ,
@@ -1746,7 +1738,6 @@ export function buildFieldsInitNodes(
17461738 staticNodes . unshift (
17471739 buildPrivateStaticMethodInitLoose (
17481740 t . cloneNode ( ref ) ,
1749- // @ts -expect-error checked in switch
17501741 prop ,
17511742 file ,
17521743 privateNamesMap ,
@@ -1755,21 +1746,18 @@ export function buildFieldsInitNodes(
17551746 pureStaticNodes . push (
17561747 buildPrivateMethodDeclaration (
17571748 file ,
1758- // @ts -expect-error checked in switch
17591749 prop ,
17601750 privateNamesMap ,
17611751 privateFieldsAsSymbolsOrProperties ,
17621752 ) ,
17631753 ) ;
17641754 break ;
17651755 case isInstance && isPublic && isField && setPublicClassFields :
1766- // @ts -expect-error checked in switch
17671756 instanceNodes . push ( buildPublicFieldInitLoose ( t . thisExpression ( ) , prop ) ) ;
17681757 break ;
17691758 case isInstance && isPublic && isField && ! setPublicClassFields :
17701759 lastInstanceNodeReturnsThis = true ;
17711760 instanceNodes . push (
1772- // @ts -expect-error checked in switch
17731761 buildPublicFieldInitSpec ( t . thisExpression ( ) , prop , file ) ,
17741762 ) ;
17751763 break ;
0 commit comments