Socket
Socket
Sign inDemoInstall

@lingui/macro

Package Overview
Dependencies
72
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.8.0-next.1 to 4.8.0

8

dist/index.d.ts

@@ -0,3 +1,9 @@

import { LinguiConfigNormalized } from '@lingui/conf';
type LinguiMacroOpts = {
extract?: boolean;
linguiConfig?: LinguiConfigNormalized;
};
declare const _default: any;
export { _default as default };
export { type LinguiMacroOpts, _default as default };

35

index.d.ts
// eslint-disable-next-line import/no-extraneous-dependencies
import type { ReactNode, VFC, FC } from "react"
import type { I18n, MessageDescriptor } from "@lingui/core"
import type { TransRenderCallbackOrComponent, I18nContext } from "@lingui/react"
import type { TransRenderCallbackOrComponent } from "@lingui/react"

@@ -319,34 +319,1 @@ export type ChoiceOptions = {

export const Select: VFC<SelectChoiceProps>
export function _t(descriptor: MacroMessageDescriptor): string
export function _t(
literals: TemplateStringsArray,
...placeholders: any[]
): string
/**
*
* Macro version of useLingui replaces _ function with `t` macro function which is bound to i18n passed from React.Context
*
* Returned `t` macro function has all the same signatures as global `t`
*
* @example
* ```
* const { t } = useLingui();
* const message = t`Text`;
* ```
*
* @example
* ```
* const { i18n, t } = useLingui();
* const locale = i18n.locale;
* const message = t({
* id: "msg.hello",
* comment: "Greetings at the homepage",
* message: `Hello ${name}`,
* });
* ```
*/
export function useLingui(): Omit<I18nContext, "_"> & {
t: typeof _t
}
{
"name": "@lingui/macro",
"version": "4.8.0-next.1",
"version": "4.8.0",
"description": "Macro for generating messages in ICU MessageFormat syntax",

@@ -57,12 +57,2 @@ "main": "./dist/index.cjs",

}
},
"./plugin": {
"require": {
"types": "./dist/plugin.d.ts",
"default": "./dist/plugin.cjs"
},
"import": {
"types": "./dist/plugin.d.ts",
"default": "./dist/index.mjs"
}
}

@@ -77,8 +67,7 @@ },

"dependencies": {
"@babel/core": "7.20.12",
"@babel/runtime": "^7.20.13",
"@babel/types": "^7.20.7",
"@lingui/conf": "^4.8.0-next.1",
"@lingui/core": "^4.8.0-next.1",
"@lingui/message-utils": "^4.8.0-next.1"
"@lingui/conf": "4.8.0",
"@lingui/core": "4.8.0",
"@lingui/message-utils": "4.8.0"
},

@@ -89,8 +78,4 @@ "peerDependencies": {

},
"peerDependenciesMeta": {
"babel-plugin-macros": {
"optional": true
}
},
"devDependencies": {
"@babel/core": "7.20.12",
"@babel/parser": "7.20.15",

@@ -103,3 +88,3 @@ "@babel/traverse": "7.20.12",

},
"gitHead": "62a736f74796c6c3e5bfd23d2e95154fc7f3ff42"
"gitHead": "1b3a1209b06e9a6b6820ce54064da87052c21fa5"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc