File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -4709,7 +4709,7 @@ namespace ts {
4709
4709
/**
4710
4710
* Gets the property name of a BindingOrAssignmentElement
4711
4711
*/
4712
- export function getPropertyNameOfBindingOrAssignmentElement ( bindingElement : BindingOrAssignmentElement ) {
4712
+ export function getPropertyNameOfBindingOrAssignmentElement ( bindingElement : BindingOrAssignmentElement ) : PropertyName | undefined {
4713
4713
switch ( bindingElement . kind ) {
4714
4714
case SyntaxKind . BindingElement :
4715
4715
// `a` in `let { a: b } = ...`
@@ -4754,6 +4754,12 @@ namespace ts {
4754
4754
Debug . fail ( "Invalid property name for binding element." ) ;
4755
4755
}
4756
4756
4757
+ function isStringOrNumericLiteral ( node : Node ) : node is StringLiteral | NumericLiteral {
4758
+ const kind = node . kind ;
4759
+ return kind === SyntaxKind . StringLiteral
4760
+ || kind === SyntaxKind . NumericLiteral ;
4761
+ }
4762
+
4757
4763
/**
4758
4764
* Gets the elements of a BindingOrAssignmentPattern
4759
4765
*/
Original file line number Diff line number Diff line change @@ -2560,14 +2560,8 @@ namespace ts {
2560
2560
return false ;
2561
2561
}
2562
2562
2563
- export function isStringOrNumericLiteral ( node : Node ) : node is StringLiteral | NumericLiteral {
2564
- const kind = node . kind ;
2565
- return kind === SyntaxKind . StringLiteral
2566
- || kind === SyntaxKind . NumericLiteral ;
2567
- }
2568
-
2569
2563
export function isStringOrNumericLiteralLike ( node : Node ) : node is StringLiteralLike | NumericLiteral {
2570
- return isStringOrNumericLiteral ( node ) || isNoSubstitutionTemplateLiteral ( node ) ;
2564
+ return isStringLiteralLike ( node ) || isNumericLiteral ( node ) ;
2571
2565
}
2572
2566
2573
2567
/**
You can’t perform that action at this time.
0 commit comments