New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

international-types

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

international-types - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

4

dist/index.d.ts
export declare type LocaleValue = string | number | boolean | null | undefined | Date;
export declare type BaseLocale = Record<string, LocaleValue>;
export declare type LocaleKeys<Locale extends BaseLocale, Scope extends Scopes<Locale> | undefined, Key extends string = Extract<keyof Locale, string>> = Scope extends undefined ? Key : Key extends `${Scope}.${infer Test}` ? Test : never;
export declare type Params<Value extends LocaleValue> = Value extends '' ? [] : Value extends `{${infer Param}, ${string}, ${string}}` ? [Param] : Value extends `${string}{${infer Param}}${infer Tail}` ? [Param, ...Params<Tail>] : [];
declare type Delimiter = '=0' | '=1' | 'other';
declare type ExtractSentence<Value extends string> = Value extends `${Delimiter} {${infer Content}} ${Delimiter} ${infer Tail}` ? Content | ExtractSentence<Tail> : never;
export declare type Params<Value extends LocaleValue> = Value extends '' ? [] : Value extends `{${infer Param}, ${string}, ${infer Tail}}` ? [Param, ...Params<ExtractSentence<Tail>>] : Value extends `${string}{${infer Param}}${infer Tail}` ? [Param, ...Params<Tail>] : [];
export declare type ParamsObject<Value extends LocaleValue> = Record<Params<Value>[number], LocaleValue>;

@@ -6,0 +8,0 @@ declare type ExtractScopes<Value extends string, Prev extends string | undefined = undefined> = Value extends `${infer Head}.${infer Tail}` ? [

{
"name": "international-types",
"version": "0.3.3",
"version": "0.3.4",
"description": "Type-safe internationalization (i18n) utility types",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc