mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
Correct typings for runes (#34841)
* Update runes-tests.ts * Update runes types Correct to account for width param
This commit is contained in:
committed by
Armando Aguirre
parent
ba3d094519
commit
c198645a5b
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
declare function runes(text: string): string[];
|
||||
declare namespace runes {
|
||||
function substr(text: string, index: number): string;
|
||||
function substr(text: string, start: number, width?: number): string;
|
||||
}
|
||||
|
||||
export = runes;
|
||||
|
||||
@@ -2,3 +2,4 @@ import runes = require('runes');
|
||||
|
||||
runes('hello world 😁');
|
||||
runes.substr('hello world 😁', 1);
|
||||
runes.substr('hello world 😁', 1, 5);
|
||||
|
||||
Reference in New Issue
Block a user