File tree 2 files changed +11
-9
lines changed
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -899,6 +899,17 @@ namespace ts {
899
899
return true ;
900
900
}
901
901
902
+ /* @internal */
903
+ export function startsWith ( str : string , prefix : string ) : boolean {
904
+ return str . lastIndexOf ( prefix , 0 ) === 0 ;
905
+ }
906
+
907
+ /* @internal */
908
+ export function endsWith ( str : string , suffix : string ) : boolean {
909
+ const expectedPos = str . length - suffix . length ;
910
+ return expectedPos >= 0 && str . indexOf ( suffix , expectedPos ) === expectedPos ;
911
+ }
912
+
902
913
export function fileExtensionIs ( path : string , extension : string ) : boolean {
903
914
return path . length > extension . length && endsWith ( path , extension ) ;
904
915
}
Original file line number Diff line number Diff line change @@ -3113,13 +3113,4 @@ namespace ts {
3113
3113
export function isParameterPropertyDeclaration ( node : ParameterDeclaration ) : boolean {
3114
3114
return node . flags & NodeFlags . ParameterPropertyModifier && node . parent . kind === SyntaxKind . Constructor && isClassLike ( node . parent . parent ) ;
3115
3115
}
3116
-
3117
- export function startsWith ( str : string , prefix : string ) : boolean {
3118
- return str . lastIndexOf ( prefix , 0 ) === 0 ;
3119
- }
3120
-
3121
- export function endsWith ( str : string , suffix : string ) : boolean {
3122
- const expectedPos = str . length - suffix . length ;
3123
- return expectedPos >= 0 && str . indexOf ( suffix , expectedPos ) === expectedPos ;
3124
- }
3125
3116
}
You can’t perform that action at this time.
0 commit comments