String object has additional ES2017 and ESNEXT methods

This commit is contained in:
Piotr Roszatycki
2017-11-17 13:51:19 +01:00
parent a1afc0e64a
commit ff4b1f0af7
2 changed files with 36 additions and 0 deletions
+24
View File
@@ -3751,3 +3751,27 @@ namespace module_tests {
const m1: Module = new Module("moduleId");
const m2: Module = new Module.Module("moduleId");
}
////////////////////////////////////////////////////
/// Node.js ES2017 Support
////////////////////////////////////////////////////
namespace es2017_tests {
const s: string = 'foo';
const s1: string = s.padStart();
const s11: string = s.padStart(10);
const s12: string = s.padStart(10, 'x');
const s2: string = s.padEnd();
const s21: string = s.padEnd(10);
const s22: string = s.padEnd(10, 'x');
}
////////////////////////////////////////////////////
/// Node.js ESNEXT Support
////////////////////////////////////////////////////
namespace esnext_tests {
const s: string = 'foo';
const s1: string = s.trimLeft();
const s2: string = s.trimRight();
}