Skip to content

Commit

Permalink
fix: non localised entry type (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolink authored Apr 29, 2024
1 parent a1fcc36 commit 6fd778c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/renderer/type/v10-content-type-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class V10ContentTypeRenderer extends BaseContentTypeRenderer {
name: renderTypeGeneric(
context.moduleName(contentType.sys.id),
'Modifiers extends ChainModifiers',
'Locales extends LocaleCode',
'Locales extends LocaleCode = LocaleCode',
),
isExported: true,
type: this.renderEntryType(contentType, context),
Expand Down
2 changes: 1 addition & 1 deletion test/renderer/type/js-doc-renderer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('A JSDoc content type renderer class', () => {
* @name TypeAnimal
* @type {TypeAnimal}
*/
export type TypeAnimal<Modifiers extends ChainModifiers, Locales extends LocaleCode> = Entry<TypeAnimalSkeleton, Modifiers, Locales>;
export type TypeAnimal<Modifiers extends ChainModifiers, Locales extends LocaleCode = LocaleCode> = Entry<TypeAnimalSkeleton, Modifiers, Locales>;
`),
);
});
Expand Down
6 changes: 3 additions & 3 deletions test/renderer/type/v10-content-type-renderer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('The v10 content type renderer', () => {
}
export type TypeTestSkeleton = EntrySkeletonType<TypeTestFields, "test">;
export type TypeTest<Modifiers extends ChainModifiers, Locales extends LocaleCode> = Entry<TypeTestSkeleton, Modifiers, Locales>;
export type TypeTest<Modifiers extends ChainModifiers, Locales extends LocaleCode = LocaleCode> = Entry<TypeTestSkeleton, Modifiers, Locales>;
`),
);
});
Expand Down Expand Up @@ -147,7 +147,7 @@ describe('A derived content type renderer class', () => {
}
export type TypeTestSkeleton = EntrySkeletonType<TypeTestFields, "test">;
export type TypeTest<Modifiers extends ChainModifiers, Locales extends LocaleCode> = Entry<TypeTestSkeleton, Modifiers, Locales>;
export type TypeTest<Modifiers extends ChainModifiers, Locales extends LocaleCode = LocaleCode> = Entry<TypeTestSkeleton, Modifiers, Locales>;
`),
);
});
Expand Down Expand Up @@ -268,7 +268,7 @@ describe('A derived content type renderer class', () => {
}
export type TypeTestSkeleton = EntrySkeletonType<TypeTestFields, "test">;
export type TypeTest<Modifiers extends ChainModifiers, Locales extends LocaleCode> = CustomEntry<TypeTestSkeleton, Modifiers, Locales>;
export type TypeTest<Modifiers extends ChainModifiers, Locales extends LocaleCode = LocaleCode> = CustomEntry<TypeTestSkeleton, Modifiers, Locales>;
`),
);
});
Expand Down

0 comments on commit 6fd778c

Please sign in to comment.