mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Added typing for string-placeholder * Fixed linting * Added readonly to arrays * Change typescript version * Fixed types definition * Code review comments * Removed clean as array type * Fix export * Fix export
20 lines
472 B
TypeScript
20 lines
472 B
TypeScript
import template from 'string-placeholder';
|
|
|
|
// $ExpectType string
|
|
template('${0} test', ['here']);
|
|
|
|
// $ExpectType string
|
|
template('${foo} test ${bar}', {foo: 'Bob', bar: '65'});
|
|
|
|
// $ExpectType string
|
|
template('${0} test', ['here'], { after: '[:' });
|
|
|
|
// $ExpectType string
|
|
template('${0} test', ['here'], { before: ']' });
|
|
|
|
// $ExpectType string
|
|
template('${0} test', ['here'], { escape: '\\' });
|
|
|
|
// $ExpectType string
|
|
template('${0} test', ['here'], { clean: true });
|