@yfnote/create-message-formatter
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

テンプレート文字列を生成するファクトリー関数を持つ

オブジェクト形式の templates から、下記generate-typesを用いて型情報を生成する。

generate-types

使用例

const formatMessage = createMessageFormatter<MessageFormatType>()
const result = formatMessage(templates.a, "John", "Tokyo")

エラー例

引数エラー例

サンプル

nextjs14_blog

memo

build npm run build

npm 公開 npm publish --access=public

@yfnote/create-message-formatter

/@yfnote/create-message-formatter/

    Package Sidebar

    Install

    npm i @yfnote/create-message-formatter

    Weekly Downloads

    0

    Version

    1.0.7

    License

    ISC

    Unpacked Size

    63 kB

    Total Files

    27

    Last publish

    Collaborators

    • yutakafujii