File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
tests/baselines/reference/api Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -93,12 +93,18 @@ namespace ts {
9393 return node ;
9494 }
9595
96- function createStringLiteral ( text : string ) : StringLiteral {
96+ export function createStringLiteral ( text : string ) : StringLiteral {
9797 const node = < StringLiteral > createSynthesizedNode ( SyntaxKind . StringLiteral ) ;
9898 node . text = text ;
9999 return node ;
100100 }
101101
102+ export function createRegularExpressionLiteral ( text : string ) : RegularExpressionLiteral {
103+ const node = < RegularExpressionLiteral > createSynthesizedNode ( SyntaxKind . RegularExpressionLiteral ) ;
104+ node . text = text ;
105+ return node ;
106+ }
107+
102108 function createLiteralFromNode ( sourceNode : PropertyNameLiteral ) : StringLiteral {
103109 const node = createStringLiteral ( getTextOfIdentifierOrLiteral ( sourceNode ) ) ;
104110 node . textSourceNode = sourceNode ;
Original file line number Diff line number Diff line change @@ -3484,6 +3484,8 @@ declare namespace ts {
34843484 function createLiteral ( value : boolean ) : BooleanLiteral ;
34853485 function createLiteral ( value : string | number | boolean ) : PrimaryExpression ;
34863486 function createNumericLiteral ( value : string ) : NumericLiteral ;
3487+ function createStringLiteral ( text : string ) : StringLiteral ;
3488+ function createRegularExpressionLiteral ( text : string ) : RegularExpressionLiteral ;
34873489 function createIdentifier ( text : string ) : Identifier ;
34883490 function updateIdentifier ( node : Identifier ) : Identifier ;
34893491 /** Create a unique temporary variable. */
Original file line number Diff line number Diff line change @@ -3484,6 +3484,8 @@ declare namespace ts {
34843484 function createLiteral ( value : boolean ) : BooleanLiteral ;
34853485 function createLiteral ( value : string | number | boolean ) : PrimaryExpression ;
34863486 function createNumericLiteral ( value : string ) : NumericLiteral ;
3487+ function createStringLiteral ( text : string ) : StringLiteral ;
3488+ function createRegularExpressionLiteral ( text : string ) : RegularExpressionLiteral ;
34873489 function createIdentifier ( text : string ) : Identifier ;
34883490 function updateIdentifier ( node : Identifier ) : Identifier ;
34893491 /** Create a unique temporary variable. */
You can’t perform that action at this time.
0 commit comments