Skip to content

テンプレート文字列を生成する仕組みをTypeScriptで生成した

License

Notifications You must be signed in to change notification settings

blackraccoon000/create-message-formatter

Repository files navigation

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

オブジェクト形式の 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

About

テンプレート文字列を生成する仕組みをTypeScriptで生成した

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published