summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/dull-taxis-warn.md5
-rw-r--r--packages/astro/templates/content/types.d.ts2
2 files changed, 7 insertions, 0 deletions
diff --git a/.changeset/dull-taxis-warn.md b/.changeset/dull-taxis-warn.md
new file mode 100644
index 000000000..49129685a
--- /dev/null
+++ b/.changeset/dull-taxis-warn.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Deprecates `getEntryBySlug` and `getDataEntryById` functions exported by `astro:content` in favor of `getEntry`.
diff --git a/packages/astro/templates/content/types.d.ts b/packages/astro/templates/content/types.d.ts
index 9ac20a7f1..23c5eb984 100644
--- a/packages/astro/templates/content/types.d.ts
+++ b/packages/astro/templates/content/types.d.ts
@@ -22,6 +22,7 @@ declare module 'astro:content' {
ContentEntryMap[C]
>['slug'];
+ /** @deprecated Use `getEntry` instead. */
export function getEntryBySlug<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
@@ -33,6 +34,7 @@ declare module 'astro:content' {
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
+ /** @deprecated Use `getEntry` instead. */
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
collection: C,
entryId: E