mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Update types for indent-string to v3.2
This commit is contained in:
parent
fda699244c
commit
884193e6c7
@ -1,5 +1,7 @@
|
||||
import indentString = require('indent-string');
|
||||
|
||||
// $ExpectType string
|
||||
indentString('Unicorns\nRainbows');
|
||||
indentString('Unicorns\nRainbows', 4);
|
||||
// => ' Unicorns'
|
||||
// => ' Rainbows'
|
||||
@ -7,3 +9,5 @@ indentString('Unicorns\nRainbows', 4);
|
||||
indentString('Unicorns\nRainbows', 4, '♥');
|
||||
// => '♥♥♥♥Unicorns'
|
||||
// => '♥♥♥♥Rainbows'
|
||||
indentString('Unicorns\nRainbows', 4, { indent: '♥' });
|
||||
indentString('Unicorns\nRainbows', 4, { includeEmptyLines: true });
|
||||
|
||||
19
types/indent-string/index.d.ts
vendored
19
types/indent-string/index.d.ts
vendored
@ -1,7 +1,20 @@
|
||||
// Type definitions for indent-string 3.0
|
||||
// Type definitions for indent-string 3.2
|
||||
// Project: https://github.com/sindresorhus/indent-string#readme
|
||||
// Definitions by: Mohamed Hegazy <https://github.com/mhegazy>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = indent_string;
|
||||
declare function indent_string(str: string, count: number, indent?: string): string;
|
||||
export = indentString;
|
||||
|
||||
declare function indentString(
|
||||
str: string,
|
||||
count?: number,
|
||||
indent?: string | indentString.Options
|
||||
): string;
|
||||
|
||||
declare namespace indentString {
|
||||
interface Options {
|
||||
indent?: string;
|
||||
includeEmptyLines?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user