0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] format

This commit is contained in:
Luiz Ferraz 2024-06-19 15:53:24 +00:00 committed by astrobot-houston
parent 5a9c9a60e7
commit 42a6eceab6

View file

@ -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 = {
@ -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();