Add type hints for the gettext functions and Underscore compatibility.
Review Request #13668 — Created March 25, 2024 and submitted — Latest diff uploaded
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.