mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00: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.
26 lines
536 B
TypeScript
26 lines
536 B
TypeScript
// https://github.com/opentable/accept-language-parser/blob/v1.4.1/index.js
|
|
|
|
import * as AcceptLanguageParser from '.';
|
|
|
|
const l1: AcceptLanguageParser.Language = {
|
|
code: 'en',
|
|
script: 'Latn',
|
|
region: 'GB',
|
|
quality: 0.9
|
|
};
|
|
|
|
const l2: AcceptLanguageParser.Language = {
|
|
code: 'en',
|
|
quality: 0.9
|
|
};
|
|
|
|
const l3: AcceptLanguageParser.Language = {
|
|
code: 'en',
|
|
script: null,
|
|
quality: 0.9
|
|
};
|
|
|
|
AcceptLanguageParser.parse('');
|
|
AcceptLanguageParser.pick([''], '');
|
|
AcceptLanguageParser.pick([''], [l1, l2, l3]);
|