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 2 (Latest)

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"/> ```
ce8476998da0b15f991f1a89700bc6802c343942 Christian Hammond
README.md
package.json
bin/build.js
src/index.d.ts
Loading...