diff --git a/src/components/patterns/Signature/Param.astro b/src/components/patterns/Signature/Param.astro
index a952c29402..12e8de9526 100644
--- a/src/components/patterns/Signature/Param.astro
+++ b/src/components/patterns/Signature/Param.astro
@@ -40,9 +40,11 @@ interface Props {
optional?: boolean;
/** Version the parameter was added in, e.g. `"v4.20.0"`. */
since?: string;
+ /** Version the parameter was deprecated in, e.g. `"v4.11.0"`. */
+ deprecated?: string;
}
-const { name, type, default: defaultValue, optional = false, since } = Astro.props;
+const { name, type, default: defaultValue, optional = false, since, deprecated } = Astro.props;
const hasProperties = Astro.slots.has('properties');
@@ -57,7 +59,7 @@ const displayType = optional && type ? `${type} | undefined` : type;
{
- (displayType || defaultValue !== undefined || since) && (
+ (displayType || defaultValue !== undefined || since || deprecated) && (
{displayType && (
@@ -77,6 +79,12 @@ const displayType = optional && type ? `${type} | undefined` : type;
{since}
)}
+ {deprecated && (
+
+ Deprecated in:
+ {deprecated}
+
+ )}
)
}
diff --git a/src/components/patterns/Signature/Signature.astro b/src/components/patterns/Signature/Signature.astro
index 0acf459310..028a0df229 100644
--- a/src/components/patterns/Signature/Signature.astro
+++ b/src/components/patterns/Signature/Signature.astro
@@ -17,6 +17,8 @@
*
*
*
+ *
+ *
*/
import './Signature.css';
@@ -27,16 +29,18 @@ interface Props {
type?: string;
/** Version the member was added in, e.g. `"v4.16.0"`. */
since?: string;
+ /** Version the member was deprecated in, e.g. `"v4.11.0"`. */
+ deprecated?: string;
/** Heading text for the arguments section. */
attributesTitle?: string;
}
-const { returns, type, since, attributesTitle = 'Arguments' } = Astro.props;
+const { returns, type, since, deprecated, attributesTitle = 'Arguments' } = Astro.props;
const hasReturnsSlot = Astro.slots.has('returns');
const hasReturns = hasReturnsSlot || Boolean(returns);
const hasAttributes = Astro.slots.has('attributes');
-const hasFooter = Boolean(type) || hasReturns || Boolean(since);
+const hasFooter = Boolean(type) || hasReturns || Boolean(since) || Boolean(deprecated);
---
@@ -75,6 +79,12 @@ const hasFooter = Boolean(type) || hasReturns || Boolean(since);
{since}
)}
+ {deprecated && (
+
+ Deprecated in:
+ {deprecated}
+
+ )}
)
}
diff --git a/src/components/patterns/Signature/Signature.css b/src/components/patterns/Signature/Signature.css
index 4fe9ebf9e0..3a0ed97ad4 100644
--- a/src/components/patterns/Signature/Signature.css
+++ b/src/components/patterns/Signature/Signature.css
@@ -58,6 +58,16 @@
font-weight: var(--font-weight-medium);
}
+ .type-tag--deprecated {
+ border-color: var(--color-border-error);
+ background-color: var(--color-bg-error);
+ color: var(--color-text-error);
+ }
+
+ .signature__line--deprecated .signature__line-label {
+ color: var(--color-text-error);
+ }
+
.signature__params {
display: grid;
grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr);
@@ -148,6 +158,11 @@
color: var(--color-text-primary);
}
+ .param__meta-item--deprecated .param__label,
+ .param__meta-item--deprecated .param__value {
+ color: var(--color-text-error);
+ }
+
.param__desc {
color: var(--color-text-secondary);
diff --git a/src/content/api/4x/api/application/index.mdx b/src/content/api/4x/api/application/index.mdx
index 3be84862c7..c0c557de89 100644
--- a/src/content/api/4x/api/application/index.mdx
+++ b/src/content/api/4x/api/application/index.mdx
@@ -6,6 +6,7 @@ description: Learn about the properties of the Express application object.
import Alert from '@components/primitives/Alert/Alert.astro';
import Signature from '@components/patterns/Signature/Signature.astro';
import Param from '@components/patterns/Signature/Param.astro';
+import PackageManagerCommand from '@components/patterns/PackageManagerCommand/PackageManagerCommand.astro';
The `app` object conventionally denotes the Express application.
Create it by calling the top-level `express()` function exported by the Express module:
@@ -293,6 +294,29 @@ app.delete('/', function (req, res) {
});
```
+### app.del()
+
+