Skip to content

Commit f085ffa

Browse files
authored
fix: add deprecation tag for h3 and hono JSDoc (#71)
1 parent d56b3d4 commit f085ffa

30 files changed

+208
-52
lines changed

docs/h3/functions/getCookieLocale.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / getCookieLocale
66

7-
# Function: getCookieLocale()
7+
# ~~Function: getCookieLocale()~~
88

99
```ts
1010
function getCookieLocale(event, options): Locale;
@@ -43,3 +43,7 @@ app.use(eventHandler(event) => {
4343
## Throws
4444

4545
Throws a `RangeError` if `lang` option or cookie name value are not a well-formed BCP 47 language tag.
46+
47+
## Deprecated
48+
49+
since v2. Use `getCookieLocale` of `@intlify/utils` instead.

docs/h3/functions/getHeaderLanguage.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / getHeaderLanguage
66

7-
# Function: getHeaderLanguage()
7+
# ~~Function: getHeaderLanguage()~~
88

99
```ts
1010
function getHeaderLanguage(event, options): string;
@@ -44,3 +44,7 @@ app.use(eventHandler(event) => {
4444
return `accepted language: ${langTag}`
4545
})
4646
```
47+
48+
## Deprecated
49+
50+
since v2. Use `getHeaderLanguage` of `@intlify/utils` instead.

docs/h3/functions/getHeaderLanguages.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / getHeaderLanguages
66

7-
# Function: getHeaderLanguages()
7+
# ~~Function: getHeaderLanguages()~~
88

99
```ts
1010
function getHeaderLanguages(event, options): string[];
@@ -44,3 +44,7 @@ app.use(eventHandler(event) => {
4444
return `accepted languages: ${acceptLanguages.join(', ')}`
4545
})
4646
```
47+
48+
## Deprecated
49+
50+
since v2. Use `getHeaderLanguages` of `@intlify/utils` instead.

docs/h3/functions/getHeaderLocale.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / getHeaderLocale
66

7-
# Function: getHeaderLocale()
7+
# ~~Function: getHeaderLocale()~~
88

99
```ts
1010
function getHeaderLocale(event, options): Locale;
@@ -47,3 +47,7 @@ app.use(eventHandler(event) => {
4747
## Throws
4848

4949
Throws the `RangeError` if `lang` option or header are not a well-formed BCP 47 language tag.
50+
51+
## Deprecated
52+
53+
since v2. Use `getHeaderLocale` of `@intlify/utils` instead.

docs/h3/functions/getHeaderLocales.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / getHeaderLocales
66

7-
# Function: getHeaderLocales()
7+
# ~~Function: getHeaderLocales()~~
88

99
```ts
1010
function getHeaderLocales(event, options): Locale[];
@@ -47,3 +47,7 @@ app.use(eventHandler(event) => {
4747
## Throws
4848

4949
Throws the `RangeError` if header are not a well-formed BCP 47 language tag.
50+
51+
## Deprecated
52+
53+
since v2. Use `getHeaderLocales` of `@intlify/utils` instead.

docs/h3/functions/getPathLocale.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / getPathLocale
66

7-
# Function: getPathLocale()
7+
# ~~Function: getPathLocale()~~
88

99
```ts
1010
function getPathLocale(event, options): Locale;
@@ -28,3 +28,7 @@ The locale that resolved from path
2828
## Throws
2929

3030
Throws the `RangeError` if the language in the path, that is not a well-formed BCP 47 language tag.
31+
32+
## Deprecated
33+
34+
since v2. Use `getPathLocale` of `@intlify/utils` instead.

docs/h3/functions/getQueryLocale.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / getQueryLocale
66

7-
# Function: getQueryLocale()
7+
# ~~Function: getQueryLocale()~~
88

99
```ts
1010
function getQueryLocale(event, options): Locale;
@@ -28,3 +28,7 @@ The locale that resolved from query
2828
## Throws
2929

3030
Throws the `RangeError` if the language in the query, that is not a well-formed BCP 47 language tag.
31+
32+
## Deprecated
33+
34+
since v2. Use `getQueryLocale` of `@intlify/utils` instead.

docs/h3/functions/setCookieLocale.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / setCookieLocale
66

7-
# Function: setCookieLocale()
7+
# ~~Function: setCookieLocale()~~
88

99
```ts
1010
function setCookieLocale(
@@ -44,3 +44,7 @@ app.use(eventHandler(event) => {
4444
## Throws
4545

4646
Throws the `SyntaxError` if `locale` is invalid.
47+
48+
## Deprecated
49+
50+
since v2. Use `setCookieLocale` of `@intlify/utils` instead.

docs/h3/functions/tryCookieLocale.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / tryCookieLocale
66

7-
# Function: tryCookieLocale()
7+
# ~~Function: tryCookieLocale()~~
88

99
```ts
1010
function tryCookieLocale(event, options): Locale | null;
@@ -28,3 +28,7 @@ The locale that resolved from cookie. if `lang` option or cookie name value are
2828
## Description
2929

3030
Unlike [`getCookieLocale`](getCookieLocale.md), this function does not throw an error if the locale cannot be obtained, this function returns `null`.
31+
32+
## Deprecated
33+
34+
since v2. Use `tryCookieLocale` of `@intlify/utils` instead.

docs/h3/functions/tryHeaderLocale.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[@intlify/utils](../../index.md) / [h3](../index.md) / tryHeaderLocale
66

7-
# Function: tryHeaderLocale()
7+
# ~~Function: tryHeaderLocale()~~
88

99
```ts
1010
function tryHeaderLocale(event, options): Locale | null;
@@ -28,3 +28,7 @@ The first locale that resolved from header string. if you use `accept-language`
2828
## Description
2929

3030
wrap language tag with Intl.Locale \| locale, languages tags will be parsed from `accept-language` header as default. Unlike [getHeaderLocale](getHeaderLocale.md), this function does not throw an error if the locale cannot be obtained, this function returns `null`.
31+
32+
## Deprecated
33+
34+
since v2. Use `tryHeaderLocale` of `@intlify/utils` instead.

0 commit comments

Comments
 (0)