npm.io
0.5.3 • Published 2 years ago

@types/moji

Licence
MIT
Version
0.5.3
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.3K

Installation

npm install --save @types/moji

Summary

This package contains type definitions for moji (https://github.com/niwaringo/moji).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moji.

index.d.ts

declare namespace moji {
    type Mojisyu = "ZE" | "HE" | "ZS" | "HS" | "HG" | "KK" | "ZK" | "HK";

    interface MojisyuRange {
        start: number;
        end: number;
    }

    interface MojisyuRegExp {
        regexp: RegExp;
        list: string[];
    }

    interface Moji {
        convert(beforeType: Mojisyu, afterType: Mojisyu): Moji;
        trim(): Moji;
        filter(type: Mojisyu): Moji;
        reject(type: Mojisyu): Moji;
        toString(): string;
    }

    function addMojisyu(type: string, mojisyu: MojisyuRange | MojisyuRegExp): void;
}

declare function moji(moji: string): moji.Moji;
export = moji;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Yasunori Ohoka.