mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// Type definitions for wcwidth 1.0
|
||||
// Project: https://github.com/timoxley/wcwidth
|
||||
// Definitions by: Junyoung Choi <https://github.com/rokt33r>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function wcwidth(input: string): number;
|
||||
|
||||
export = wcwidth;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"wcwidth-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import wcwidth = require('wcwidth');
|
||||
|
||||
const length1 = wcwidth('한'); // => 2
|
||||
|
||||
const length2 = wcwidth('한글'); // => 4
|
||||
Reference in New Issue
Block a user