Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Benricheson101/fluent-types
CLI tool for generating TypeScript types for Project Fluent language files
https://github.com/Benricheson101/fluent-types
Last synced: 9 days ago
JSON representation
CLI tool for generating TypeScript types for Project Fluent language files
- Host: GitHub
- URL: https://github.com/Benricheson101/fluent-types
- Owner: Benricheson101
- License: gpl-3.0
- Created: 2022-04-28T20:20:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T21:50:58.000Z (over 1 year ago)
- Last Synced: 2024-08-13T07:15:44.366Z (4 months ago)
- Language: Rust
- Size: 143 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - Benricheson101/fluent-types - CLI tool for generating TypeScript types for Project Fluent language files (Rust)
README
💬 Fluent Types
Generate TypeScript type declarations for [Fluent](https://projectfluent.org) language files
## Example Usage
`fluent-types ./lang/en.ftl -o src/output.d.ts````ts
import {MessageNames, Placeholders} from './output';const get(msg: Name, args: Placeholders): string {
const pattern = bundle.getMessage(msg);
return bundle.formatPattern(pattern.value, args);
};
```## CLI Usage
```sh
Fluent Types
Generate TypeScript type declarations for Fluent language filesUSAGE:
fluent-types [OPTIONS] ...ARGS:
... input fluent filesOPTIONS:
-h, --help Print help information
-o the output file [default: -]
```