Skip to content

Commit f68422d

Browse files
committed
ver 0.0.6 revise encryptedext.d.ts
1 parent 10bb67a commit f68422d

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tls/param",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"exports": "./src/mod.ts",
55
"publish": {
66
"exclude": ["dist/"]

src/encryptedext.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//@ts-self-types="../type/encryptedext.d.ts
2-
//
1+
// @ts-self-types="../type/encryptedext.d.ts
32
import { Uint16, Extension, Constrained } from "./dep.ts";
43

54
/**

type/encryptedext.d.ts

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1+
// encrypted_extensions.d.ts
2+
13
import { Constrained, Extension } from "../src/dep.ts";
4+
25
/**
3-
* Represents the EncryptedExtensions in a TLS handshake, as described in
4-
* [RFC 8446 Section 4.3.1](https://datatracker.ietf.org/doc/html/rfc8446#section-4.3.1).
5-
*
6-
* EncryptedExtensions is used to carry extensions from the server in a secure context.
6+
* Represents the EncryptedExtensions structure as defined in RFC 8446, Section 4.3.1.
7+
* Contains a set of extensions used during the TLS handshake.
8+
* @see https://datatracker.ietf.org/doc/html/rfc8446#section-4.3.1
79
*/
810
export class EncryptedExtensions extends Constrained {
9-
/**
10-
* Creates a new instance of `EncryptedExtensions` from an array of bytes.
11-
*
12-
* @param array - A `Uint8Array` containing the serialized representation of the extensions.
13-
* @returns A new `EncryptedExtensions` instance with parsed extensions.
14-
* @throws {Error} If parsing fails due to invalid structure or data.
15-
*/
16-
static from(array: Uint8Array): EncryptedExtensions;
17-
18-
/**
19-
* Constructs a new `EncryptedExtensions` instance.
20-
*
21-
* @param extension - A variable number of extensions to be included in the encrypted extensions.
22-
*/
23-
constructor(...extension: Extension[]);
24-
}
25-
11+
/**
12+
* Creates an `EncryptedExtensions` instance from a list of extensions.
13+
* @param {...Extension} extensions - List of extensions.
14+
* @returns {EncryptedExtensions} - The constructed EncryptedExtensions instance.
15+
*/
16+
static fromExtensions(...extensions: Extension[]): EncryptedExtensions;
17+
18+
/**
19+
* Creates an `EncryptedExtensions` instance from a Uint8Array.
20+
* @param {Uint8Array} array - The array to parse.
21+
* @returns {EncryptedExtensions} - Parsed EncryptedExtensions instance.
22+
*/
23+
static from(array: Uint8Array): EncryptedExtensions;
24+
25+
/**
26+
* Constructs a new `EncryptedExtensions` instance.
27+
* @param {...Extension} extension - List of extensions.
28+
*/
29+
constructor(...extension: Extension[]);
30+
}

0 commit comments

Comments
 (0)