mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
5a9c9a60e7
commit
42a6eceab6
1 changed files with 14 additions and 14 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue