strongloop / strong-globalize

strong-globalize is built on Unicode CLDR and jquery/globalize and implements automatic extraction of strings from JS source code and HTML templates, lint the string resource, machine-translate them in seconds. In runtime, it loads locale and string resource into memory and provides a hook to persistent logging.
Other
25 stars 16 forks source link

Add TypeScript bindings #114

Closed bajtos closed 6 years ago

bajtos commented 7 years ago

Add type definitions for all classes and methods exported by strong-globalize, to make it easy to use strong-globalize in TypeScript projects.

import * as g from 'strong-globalize';

const name = 'TypeScript';
// g.f has correct type definition of arguments
// g.f return type is annotated as string
const str = g.f('hello world from %s', name);
console.log(str);

Related: #113

bajtos commented 6 years ago

Fixed by #132