Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and astrobot-houston committed Jun 19, 2024
1 parent 5a9c9a6 commit 42a6ece
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packages/astro/src/content/types-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ type DataEntryMetadata = Record<string, never>;
type ContentEntryMetadata = { slug: string };
type CollectionEntryMap = {
[collection: string]:
| {
type: 'unknown';
entries: Record<string, never>;
}
| {
type: 'content';
entries: Record<string, ContentEntryMetadata>;
}
| {
type: 'data';
entries: Record<string, DataEntryMetadata>;
};
| {
type: 'unknown';
entries: Record<string, never>;
}
| {
type: 'content';
entries: Record<string, ContentEntryMetadata>;
}
| {
type: 'data';
entries: Record<string, DataEntryMetadata>;
};
};

type CreateContentGeneratorParams = {
Expand Down Expand Up @@ -425,8 +425,8 @@ async function writeContentFiles({
const resolvedType: 'content' | 'data' =
collection.type === 'unknown'
? // Add empty / unknown collections to the data type map by default
// This ensures `getCollection('empty-collection')` doesn't raise a type error
collectionConfig?.type ?? 'data'
// This ensures `getCollection('empty-collection')` doesn't raise a type error
collectionConfig?.type ?? 'data'
: collection.type;

const collectionEntryKeys = Object.keys(collection.entries).sort();
Expand Down

0 comments on commit 42a6ece

Please sign in to comment.