mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-12 22:36:10 +08:00
This commit adds initial support for the accept-language-parser module which is currently at version 1.4.1 I am not in any way related to the module.
17 lines
606 B
TypeScript
17 lines
606 B
TypeScript
// Type definitions for accept-language-parser 1.4
|
|
// Project: https://github.com/opentable/accept-language-parser
|
|
// Definitions by: Niklas Wulf <https://github.com/kampfgnom>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
// https://github.com/opentable/accept-language-parser/blob/v1.4.1/index.js
|
|
|
|
export function parse(acceptLanguage: string): Language[];
|
|
export function pick(supportedLanguages: string[], acceptLanguage: string | Language[]): Language | null;
|
|
|
|
export interface Language {
|
|
code: string;
|
|
script?: string | null;
|
|
region?: string;
|
|
quality: number;
|
|
}
|