Add type hints for the gettext functions and Underscore compatibility.

Review Request #13668 — Created March 25, 2024 and submitted — Latest diff uploaded

Information

babel-plugin-django-gettext
master

Reviewers

This introduces TypeScript type hints that cover the functions and
tagged template literals processed by this plugin. It also includes a
shim for Underscore that helps merge the definitions for Underscore's
_ object and the _ gettext alias.

Consumers will want to reference the types in individual files or in a
global.d.ts by including the line:

/// <reference types="babel-plugin-django-gettext"/>

Made use of these new definitions in Djblets and Review Board.

Unit tests pass.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Add type hints for the gettext functions and Underscore compatibility.
This introduces TypeScript type hints that cover the functions and tagged template literals processed by this plugin. It also includes a shim for Underscore that helps merge the definitions for Underscore's `_` object and the `_` gettext alias. Consumer will want to reference the types in individual files or in a `global.d.ts` by including the line: ``` /// <reference types="babel-plugin-django-gettext"/> ```
9c1bf166c4919a5fd6803bf3f8802f4a9d9a1e34 Christian Hammond
README.md
package.json
bin/build.js
src/index.d.ts
Loading...