0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -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 ContentEntryMetadata = { slug: string };
type CollectionEntryMap = { type CollectionEntryMap = {
[collection: string]: [collection: string]:
| { | {
type: 'unknown'; type: 'unknown';
entries: Record<string, never>; entries: Record<string, never>;
} }
| { | {
type: 'content'; type: 'content';
entries: Record<string, ContentEntryMetadata>; entries: Record<string, ContentEntryMetadata>;
} }
| { | {
type: 'data'; type: 'data';
entries: Record<string, DataEntryMetadata>; entries: Record<string, DataEntryMetadata>;
}; };
}; };
type CreateContentGeneratorParams = { type CreateContentGeneratorParams = {
@ -425,8 +425,8 @@ async function writeContentFiles({
const resolvedType: 'content' | 'data' = const resolvedType: 'content' | 'data' =
collection.type === 'unknown' collection.type === 'unknown'
? // Add empty / unknown collections to the data type map by default ? // Add empty / unknown collections to the data type map by default
// This ensures `getCollection('empty-collection')` doesn't raise a type error // This ensures `getCollection('empty-collection')` doesn't raise a type error
collectionConfig?.type ?? 'data' collectionConfig?.type ?? 'data'
: collection.type; : collection.type;
const collectionEntryKeys = Object.keys(collection.entries).sort(); const collectionEntryKeys = Object.keys(collection.entries).sort();