Skip to content

Commit

Permalink
docs: update JSDoc to use more link syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Sep 15, 2024
1 parent 4ad9374 commit d78f090
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/functions/generateKeyPair.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Support from the community to continue maintaining and improving this module is

***

**generateKeyPair**(`alg`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`CryptoKeyPair`\>
**generateKeyPair**(`alg`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKeyPair`](https://developer.mozilla.org/docs/Web/API/CryptoKeyPair)\>

Generates a CryptoKeyPair for a given JWS `alg` Algorithm identifier.
Generates a [CryptoKeyPair](https://developer.mozilla.org/docs/Web/API/CryptoKeyPair) for a given JWS `alg` Algorithm identifier.

## Parameters

Expand All @@ -19,4 +19,4 @@ Generates a CryptoKeyPair for a given JWS `alg` Algorithm identifier.

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`CryptoKeyPair`\>
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKeyPair`](https://developer.mozilla.org/docs/Web/API/CryptoKeyPair)\>
8 changes: 4 additions & 4 deletions docs/type-aliases/JWSAlgorithm.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Supported JWS `alg` Algorithm identifiers.

## Examples

CryptoKey algorithm for the `PS256`, `PS384`, or `PS512` JWS Algorithm Identifiers
[CryptoKey.algorithm](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) for the `PS256`, `PS384`, or `PS512` JWS Algorithm Identifiers

```ts
interface PS256 extends RsaHashedKeyAlgorithm {
Expand All @@ -31,7 +31,7 @@ interface PS512 extends RsaHashedKeyAlgorithm {
}
```

CryptoKey algorithm for the `ES256`, `ES384`, or `ES512` JWS Algorithm Identifiers
[CryptoKey.algorithm](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) for the `ES256`, `ES384`, or `ES512` JWS Algorithm Identifiers

```ts
interface ES256 extends EcKeyAlgorithm {
Expand All @@ -50,7 +50,7 @@ interface ES512 extends EcKeyAlgorithm {
}
```

CryptoKey algorithm for the `RS256`, `RS384`, or `RS512` JWS Algorithm Identifiers
[CryptoKey.algorithm](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) for the `RS256`, `RS384`, or `RS512` JWS Algorithm Identifiers

```ts
interface RS256 extends RsaHashedKeyAlgorithm {
Expand All @@ -69,7 +69,7 @@ interface RS512 extends RsaHashedKeyAlgorithm {
}
```

CryptoKey algorithm for the `EdDSA` JWS Algorithm Identifier (Experimental)
[CryptoKey.algorithm](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) for the `EdDSA` JWS Algorithm Identifier (Experimental)

Runtime support for this algorithm is limited, it depends on the [Secure Curves in the Web
Cryptography API](https://wicg.github.io/webcrypto-secure-curves/) proposal which is yet to be
Expand Down
14 changes: 14 additions & 0 deletions patches/typedoc-plugin-mdn-links+3.2.12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/node_modules/typedoc-plugin-mdn-links/data/web-api.json b/node_modules/typedoc-plugin-mdn-links/data/web-api.json
index 3e76956..5751271 100644
--- a/node_modules/typedoc-plugin-mdn-links/data/web-api.json
+++ b/node_modules/typedoc-plugin-mdn-links/data/web-api.json
@@ -1645,6 +1645,9 @@
"usages": "https://developer.mozilla.org/docs/Web/API/CryptoKey/usages"
}
},
+ "CryptoKeyPair": {
+ "url": "https://developer.mozilla.org/docs/Web/API/CryptoKeyPair"
+ },
"CustomElementRegistry": {
"url": "https://developer.mozilla.org/docs/Web/API/CustomElementRegistry",
"inst": {
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export type ClientAuthenticationMethod =
*
* @example
*
* CryptoKey algorithm for the `PS256`, `PS384`, or `PS512` JWS Algorithm Identifiers
* {@link !CryptoKey.algorithm} for the `PS256`, `PS384`, or `PS512` JWS Algorithm Identifiers
*
* ```ts
* interface PS256 extends RsaHashedKeyAlgorithm {
Expand All @@ -111,7 +111,7 @@ export type ClientAuthenticationMethod =
*
* @example
*
* CryptoKey algorithm for the `ES256`, `ES384`, or `ES512` JWS Algorithm Identifiers
* {@link !CryptoKey.algorithm} for the `ES256`, `ES384`, or `ES512` JWS Algorithm Identifiers
*
* ```ts
* interface ES256 extends EcKeyAlgorithm {
Expand All @@ -132,7 +132,7 @@ export type ClientAuthenticationMethod =
*
* @example
*
* CryptoKey algorithm for the `RS256`, `RS384`, or `RS512` JWS Algorithm Identifiers
* {@link !CryptoKey.algorithm} for the `RS256`, `RS384`, or `RS512` JWS Algorithm Identifiers
*
* ```ts
* interface RS256 extends RsaHashedKeyAlgorithm {
Expand All @@ -153,7 +153,7 @@ export type ClientAuthenticationMethod =
*
* @example
*
* CryptoKey algorithm for the `EdDSA` JWS Algorithm Identifier (Experimental)
* {@link !CryptoKey.algorithm} for the `EdDSA` JWS Algorithm Identifier (Experimental)
*
* Runtime support for this algorithm is limited, it depends on the [Secure Curves in the Web
* Cryptography API](https://wicg.github.io/webcrypto-secure-curves/) proposal which is yet to be
Expand Down Expand Up @@ -4376,7 +4376,7 @@ export interface GenerateKeyPairOptions {
}

/**
* Generates a CryptoKeyPair for a given JWS `alg` Algorithm identifier.
* Generates a {@link !CryptoKeyPair} for a given JWS `alg` Algorithm identifier.
*
* @param alg Supported JWS `alg` Algorithm identifier.
*
Expand Down

0 comments on commit d78f090

Please sign in to comment.