mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* add types for 'parse-link-header' module * updated return type has possibility of returning null if input is falsy. * Update parse-link-header-tests.ts updated test to include null type.
20 lines
544 B
TypeScript
20 lines
544 B
TypeScript
// Type definitions for parse-link-header 1.0
|
|
// Project: https://github.com/thlorenz/parse-link-header
|
|
// Definitions by: Nick Zelei <https://github.com/zelein>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace parseLinkHeader {
|
|
interface Link {
|
|
url: string;
|
|
rel: string;
|
|
[queryParam: string]: string;
|
|
}
|
|
|
|
interface Links {
|
|
[rel: string]: Link;
|
|
}
|
|
}
|
|
|
|
declare function parseLinkHeader(linkHeader: string): parseLinkHeader.Links | null;
|
|
export = parseLinkHeader;
|