@types/langs
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

Installation

npm install --save @types/langs

Summary

This package contains type definitions for langs (https://github.com/adlawson/langs.js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/langs.

index.d.ts

declare namespace langs {
    type Type = 1 | 2 | 3 | "1" | "2" | "2T" | "2B" | "3" | "name" | "local";

    interface Language {
        name: string;
        local: string;
        "1": string;
        "2": string;
        "2T": string;
        "2B": string;
        "3": string;
    }

    interface Langs {
        all: () => Language[];
        has: (type: Type, val: string) => boolean;
        codes: (type: Exclude<Type, "name" | "local">) => string[];
        names: (local?: boolean) => string[];
        where: (type: Type, val: string) => Language | undefined;
    }
}

declare const langs: langs.Langs;
export = langs;

Additional Details

  • Last updated: Wed, 07 Feb 2024 06:35:28 GMT
  • Dependencies: none

Credits

These definitions were written by Orgad Shaneh.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/langs

Weekly Downloads

6,236

Version

2.0.5

License

MIT

Unpacked Size

3.77 kB

Total Files

5

Last publish

Collaborators

  • types