mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
add historykana types (#25222)
* add historykana types * Fixed test error * Fixed unified-signatures error * Fix strictNullChecks to true. * Fix export default to export equal * Deleted module.
This commit is contained in:
committed by
Wesley Wigham
parent
40fd64f487
commit
9c61553ebb
@@ -0,0 +1,23 @@
|
||||
import historykana from "historykana";
|
||||
|
||||
// Stock input history
|
||||
const inputHistory = [
|
||||
"y",
|
||||
"や",
|
||||
"やm",
|
||||
"やま",
|
||||
"やまd",
|
||||
"やまだ",
|
||||
"山田",
|
||||
"山田",
|
||||
"山田t",
|
||||
"山田た",
|
||||
"山田たr",
|
||||
"山田たろ",
|
||||
"山田たろう",
|
||||
"山田太郎",
|
||||
"山田太郎"
|
||||
];
|
||||
|
||||
const result = historykana(inputHistory);
|
||||
// => やまだたろう
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for HistoryKana 1.0
|
||||
// Project: https://github.com/terrierscript/historykana
|
||||
// Definitions by: shiratsuki <https://github.com/h-shiratsuki>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/**
|
||||
* Get Kana string from input history array.
|
||||
* @param histories Input History Array
|
||||
* @param options kanaRegexp : Hiragana detection regular expression rule.
|
||||
*/
|
||||
declare function historykana(histories: string[], options?: object): string;
|
||||
|
||||
export = historykana;
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6", "dom"],
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "historykana-tests.ts"]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user