Skip to content

Commit 5e7b45c

Browse files
committed
docs(types): add code description
1 parent adede32 commit 5e7b45c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

types.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
// Copyright 2023-latest the httpland authors. All rights reserved. MIT license.
22
// This module is browser compatible.
33

4+
/** Authorization API. */
45
export interface Authorization {
6+
/** Authentication scheme. */
57
readonly authScheme: string;
6-
readonly token: string | Record<string, string> | null;
8+
9+
/** token68 or auth-param. */
10+
readonly token: Token68 | AuthParam | null;
711
}
812

13+
/** Representation of [token68](https://www.rfc-editor.org/rfc/rfc9110.html#auth.params). */
14+
export type Token68 = string;
15+
16+
/** Pair of name and value.
17+
* Representation of [auth-param](https://www.rfc-editor.org/rfc/rfc9110.html#section-11.2-5).
18+
*/
919
export interface AuthParam {
1020
readonly [k: string]: string;
1121
}

0 commit comments

Comments
 (0)